1 2009-09-10 Doug Evans <dje@sebabeach.org>
3 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
4 (/insn-parse): Don't verify iformat for virtual insns.
6 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
8 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
9 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
10 * sid.scm (pbb-engine-insns): Ditto.
11 * sim-decode.scm (cgen-decode.c): Ditto.
13 2009-09-09 Doug Evans <dje@sebabeach.org>
15 * rtl-traverse.scm: Comment tweaks.
16 * rtl-xform.scm: Comment and reformatting tweaks.
17 * doc/rtl.texi: Add text to docs on ifield-assertions.
19 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
22 Add support for controlling warnings/errors.
23 Add tests for iformat description errors.
24 * dev.scm (cload): New option #:diag.
25 * read.scm (<reader>): New member verify-iformat?.
26 (/parse-diagnostic, parse-warning): New functions.
27 (parse-error): Guts moved to /parse-diagnostic.
28 (/set-diagnostic-options!): New function.
29 (cpu-load): New arg diagnostic-options, all callers updated.
30 Recognize -w diagnostic-option-list.
31 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
32 (ifld-simple-ifields, ifields-simple-ifields): New function.
33 * insn.scm (/parse-insn-format-iflds): New function.
34 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
35 New arg isa, all callers updated. Do some basic validation of the
36 ifield list if requested.
37 * mach.scm (/sanity-check-insns): Improve error message text.
38 * doc/running.texi: Document -w option.
39 * doc/porting.texi: Document #:trace, #:diag options to cload.
41 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
43 * dev.scm (*): Change default verbosity level to 2.
45 * ifield.scm (<ifield> pretty-print): New method.
46 (ifld-pretty-print): New function.
47 (<multi-ifield> pretty-print): New method.
49 * ifield.scm (<ifield> field-start): Delete word-len arg.
52 (<multi-ifield> field-start): Ditto.
53 * operand.scm (<hw-index> field-start): Ditto.
55 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
56 total-bitsize. All callers updated.
57 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
58 New member /insn-base-value.
59 (insn-base-value): New function.
60 * mach.scm (/sanity-check-insns): New function.
61 (arch-analyze-insns!): Call it.
63 2009-09-08 Doug Evans <dje@sebabeach.org>
65 * iformat.scm (ifields-base-ifields): Simplify.
66 (compute-insn-length): Simplify, call ifields-base-ifields.
67 (compute-insn-base-mask): Ditto.
68 * ifield.scm (ifld-known-values): Ditto.
69 (ifld-base-ifields): Ditto.
70 * insn.scm (insn-value): Ditto.
71 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
73 2009-09-08 DJ Delorie <dj@redhat.com>
75 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
76 preprocessor macro, not an enum.
78 2009-09-08 Doug Evans <dje@sebabeach.org>
80 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
82 (*): Remove trailing ":" from error messages passed to estate-error.
84 2009-09-07 Doug Evans <dje@sebabeach.org>
86 * types.scm (<struct>): Delete.
88 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
90 (/pmacro-loc-error): New function.
92 * mach.scm (/isa-parse-decode-assist): New function.
93 (/isa-parse): Call it.
95 * decode.scm (/get-subopcode-value): New function.
96 (/opcode-slots): Call it.
97 (/fill-slot!): Add logging message.
99 * cos.scm (/object-error): Convert symbols to strings before passing
102 * read.scm (rtl-version-equal?): New function.
103 (rtl-version-at-least?, rtl-version-older?): New functions.
105 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
106 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
108 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
110 2009-09-03 Doug Evans <dje@sebabeach.org>
112 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
115 2009-09-01 DJ Delorie <dj@redhat.com>
117 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
118 (parse_unsigned16_range): Likewise.
119 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
122 2009-09-01 Doug Evans <dje@sebabeach.org>
124 Pmacro .equals -> .equal?
125 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
126 -pmacro-builtin-equals. All callers updated.
127 (pmacros-init!): Rename .equals to .equal?.
128 * doc/pmacros.texi: Update.
129 * testsuite/pmacros-1.test: Update.
131 * doc/porting.texi: Work around texi2html bug where it doesn't
132 properly escape <> inside double-quotes inside @code.
134 * doc/porting.texi (Doing an opcodes port): Add step to specify
137 2009-08-29 Doug Evans <dje@sebabeach.org>
139 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
141 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
143 2009-08-27 Doug Evans <dje@sebabeach.org>
145 Add do-count rtl function.
146 * rtl-c.scm (s-do-count): New function.
147 (do-count): New rtl handler.
148 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
149 (-rtx-make-traverser-table): Add ITERATION.
150 * rtl.scm (rtx-make-iteration-limit-var): New function.
151 (rtx-env-make-iteration-locals): New function.
152 * rtx-funcs.scm (do-count): New rtl function.
153 * cpu/play.cpu: Add do-count-test insn.
154 * doc/rtl.texi: Add docs on do-count.
156 2009-08-26 Doug Evans <dje@sebabeach.org>
158 * read.scm (parse-error): Change error message output format
159 to match context-owner-error.
160 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
161 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
162 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
163 (operand): Call estate-error instead of context-error.
164 (local, delay): Ditto.
165 (ref, attr): Call estate-error instead of error.
166 * rtl-traverse.scm (tstate-error): New function.
167 (-rtx-traverse-error): Call tstate-error instead of context-error.
168 (-rtx-traverse-operands, -rtx-traverse): Ditto.
169 (estate-error): New function.
170 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
172 (e-if): Call estate-error instead of error.
173 * rtx-funcs.scm (error): Call estate-error instead of context-error.
175 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
176 Rewrite to call context-owner-error.
177 (context-owner-error): New function.
179 * ifield.scm (<ifield> constructor): New arg `location',
181 * insn.scm (<insn> constructor): Ditto.
182 (<multi-insn> constructor): Ditto.
183 * minsn.scm (<macro-insn> constructor): Ditto.
184 * operand.scm (<operand> constructor): Ditto.
185 * utils-cgen.scm (builtin-location): New function.
186 (<source-ident>): Fix default value of member `location'.
187 (source-ident?): New function.
189 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
190 (estate-push-env, estate-with-modifiers): Ditto.
191 (estate-deepen): New function.
193 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
195 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
196 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
199 2009-08-25 Doug Evans <dje@sebabeach.org>
201 * doc/pmacros.texi (pmacro default argument values): Add text.
203 2009-08-23 Doug Evans <dje@sebabeach.org>
205 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
206 Rename member prefix -> name-prefix.
207 (<keyword> getters): Update.
208 (-keyword-parse): Update. Default enum-prefix to NAME-.
209 (-keyword-read): Update. Don't compute default value for
211 (define-keyword): Update.
212 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
213 * read.scm (cgen-rtl-version): New function.
214 (-supported-rtl-versions): Add (0 8).
215 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
216 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
217 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
218 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
219 Update, print-name -> enum-prefix, make uppercase.
220 Remove unnecessary name-prefix spec.
221 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
222 * cpu/ip2k.cpu (register-names): Ditto.
223 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
224 * cpu/sparc.cpu (gr-names): Ditto.
225 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
226 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
227 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
228 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
229 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
230 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
231 prefix -> name-prefix.
232 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
233 Update, print-name -> enum-prefix, make uppercase.
234 (drc-names, xf-names): Ditto.
235 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
236 * doc/rtl.texi (Keywords): New section.
237 (hardware indices): Update text.
238 (rtl versions): Add 0.8.
240 Add define-rtl-version.
241 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
242 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
243 (cgen-lang-fixlevel): Delete.
244 (-supported-rtl-versions): New variable.
245 (-cmd-define-rtl-version): New function.
246 (init-reader!): New command define-rtl-version.
247 (-cgen): Add rtl version to --version output.
248 * doc/rtl.texi: Document rtl version support.
249 * cpu/play.cpu: Add define-rtl-version.
251 2009-08-22 Doug Evans <dje@sebabeach.org>
253 * Makefile.am (OPTIONS): Define.
254 (desc): Just generate <arch>-desc.[ch] files.
255 * Makefile.in: Regenerate.
256 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
258 (cgen-desc.c): Similarly.
259 * gen-all-desc: New file.
260 * opcodes.scm (opc-file-provided?): New function.
262 * mach.scm (current-*-add!): Update calls to parse-error.
263 * operand.scm (op:new-mode): Update call to parse-error.
264 * utils-cgen.scm (make-obj-context): New function.
266 * NEWS: Copy over entries from 1.1 branch.
268 2009-08-20 Doug Evans <dje@sebabeach.org>
270 * gas-test.scm (<keyword> test-data): Catch invalid requests,
271 flag a warning and compensate.
272 (<hw-address test-data): Tweak for readability.
273 (<hw-iaddress test-data): Ditto.
274 (cgen-build.sh): Convert symbols to strings before passing to
276 (cgen-allinsn.exp): Ditto.
278 * doc/pmacros.texi (.splice): Add more text.
280 2009-08-19 Doug Evans <dje@sebabeach.org>
282 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
283 distinguish from 1.1.
284 * configure: Regenerate.
285 * read.scm (-CGEN-VERSION): Update.
286 * doc/version.texi: Update.
288 New builtin .pmacro?.
289 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
290 (pmacros-init!): Add .pmacro?.
291 * doc/pmacros.text: Document .pmacro?.
292 * testsuite/pmacros-1.test: Test .pmacro?.
294 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
295 of a pmacro begins before its arguments are evaluated, improves
298 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
299 * testsuite/pmacros-1.test: Ditto. Add better tests.
301 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
303 (Operands): Similarly.
305 2009-08-18 Doug Evans <dje@sebabeach.org>
307 * ifield.scm (ifld-encode-mode): Add FIXME.
308 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
310 (<ifield> gen-extract): Similarly.
312 * read.scm (parse-error): Handle #f for context-location.
313 * utils-cgen.scm (unspecified-location): Fix building of
316 * doc/rtl.texi: Document how to write hex and boolean values.
318 * gas-test.scm (<hw-asm> test-data): Handle () values.
319 (<keyword> test-data): Convert symbols to strings before passing
321 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
324 * operand.scm (hw-index-scalar): Set `name'.
325 (hw-index-anyof, hw-index-derived): Ditto.
327 2009-08-17 Doug Evans <dje@sebabeach.org>
329 * pmacros.scm (-pmacro-builtin-internal-test): New function.
330 (pmacros-init!): Add .internal-test.
331 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
332 * testsuite/testsuite.cpu (internal-verify): New pmacro.
333 * doc/pmacros.text: Document .internal-test.
335 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
336 (parse-comment): Allow numbers.
337 * doc/porting.texi: Document that names and comments may be lists.
339 * insn.scm (-insn-parse): Fix typo.
341 Rename .eval -> .exec. Add new .eval.
342 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
343 (-pmacro-builtin-eval): New function.
344 (pmacros-init!): Add .exec.
345 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
346 * testsuite/location-1.test: Update.
347 * testsuite/pmacros-1.test: Add test for .eval.
349 2009-08-16 Doug Evans <dje@sebabeach.org>
351 * doc/porting.texi: Remove support for Guile 1.4.
353 * read.scm (current-reader-location): Return unspecified location
354 if reader hasn't been initialized yet.
356 2009-08-13 Doug Evans <dje@sebabeach.org>
358 * dev.scm: Document tracing options.
360 * pmacros.scm (pmacro-dump): New function.
361 (check-pmacro): Tweak debugging output.
362 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
363 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
365 Add .let* pmacro builtin.
366 * pmacros.scm (-pmacro-builtin-let*): New function.
367 (pmacros-init!): Add .let*.
368 * doc/pmacros.texi: Document .let*.
369 * testsuite/pmacros-1.test: Test .let*.
371 2009-08-12 Doug Evans <dje@sebabeach.org>
373 Clean up cpu file parsing, pass context consistently instead of the
374 old "errtxt" argument.
375 NOTE: ACU == "All Callers Updated".
376 * attr.scm (-parse-simple-attribute): Renamed from
377 parse-simple-attribute, ACU.
378 (-attr-parse): Change errtxt argument to context, ACU.
380 (atlist-parse): Ditto. Put context arg first.
381 (attr-parse): Use parse-error instead of context-error.
382 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
383 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
384 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
385 `context' arg is now a <context> object. ACU.
386 (-keyword-read): `context' arg is now a <context> object. ACU.
387 (-hw-parse-indices): Change errtxt argument to context, ACU.
388 (-hw-parse-values, -hw-parse-handlers): Ditto.
389 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
390 (-hw-validate-layout, -hw-create-getter-from-layout,
391 -hw-create-setter-from-layout): Ditto.
392 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
393 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
394 (<hw-address>:parse!): Ditto.
395 * ifield.scm (-ifield-parse, ifield-read): Ditto.
396 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
397 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
398 (-multi-ifield-parse, -multi-ifield-read): Ditto.
399 * insn.scm (-insn-parse, -insn-read): Ditto.
400 (parse-syntax): Ditto. Put context arg first.
401 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
402 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
403 (-parse-insn-format): Ditto.
404 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
405 (-arch-parse-isas): Ditto.
406 (-isa-read): Add context arg, ACU.
407 (-cpu-parse, -cpu-read, -mach-read): Ditto.
408 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
410 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
411 (minsn-make-alias): Ditto.
412 * mode.scm (-mode-parse): Ditto.
413 (parse-mode-name): Ditto. Put context arg first.
414 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
415 errtxt argument to context, ACU.
416 (-unit-parse, -model-parse, -model-read): Ditto.
417 * operand.scm (-operand-parse-getter): Use parse-error instead of
419 (-operand-parse-setter): Ditto.
420 (-operand-parse): Change errtxt argument to context, ACU.
421 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
422 (-anyof-operand-parse, -anyof-operand-read): Ditto.
423 * read.scm (reader-error): Delete. Use parse-error instead.
424 (parse-error): Change errtxt argument to context, ACU. Split args
425 argument into expr and maybe-help-text.
426 (-reader-process-expanded-1!): Reorganize.
427 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
428 * types.scm (parse-type): Ditto.
429 * utils-cgen.scm (single-location->simple-string): New function.
430 (<context>): Replace members file,lineno with location.
431 (make-prefix-context): Renamed from context-make-prefix, ACU.
432 (make-current-context): New function.
433 (context-append, context-append-name): New functions.
434 (context-make-reader): Delete.
435 (parse-name): Change errtxt argument to context, ACU.
436 Put context arg first.
437 (parse-comment): Ditto.
438 (parse-number): Change errtxt argument to context, ACU.
439 (arg-list-validate-name, arg-list-check-no-args,
440 arg-list-symbol-arg): Ditto.
442 * read.scm (-cmd-if): Don't assume test is a list.
444 * html.scm (get-insn-properties): Delete errtxt, unused.
446 2009-08-11 Doug Evans <dje@sebabeach.org>
448 * doc/rtl.texi (hardware types): Add pc.
450 2009-08-07 Doug Evans <dje@sebabeach.org>
452 Add -t option for tracing things like commands, pmacro expansion.
453 * dev.scm (cload): New arg #:trace.
454 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
455 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
456 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
457 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
458 (-reader-process-expanded-1!): Trace commands if requested.
459 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
460 (-set-trace-options!): New function.
461 (-init-reader!): New function.
462 (cpu-load): New arg trace-options, all callers updated.
463 Call -init-reader! and -set-trace-options!.
464 (cgen-usage): Improve output formatting.
465 (common-arguments): New option -t.
467 * utils-cgen.scm (single-location->string): Renamed from
468 pretty-print-single-location. All callers updated.
469 (location->string): Renamed from pretty-print-location.
471 (source-properties-location->string): New function.
472 * doc/running.texi: Document -t.
474 2009-08-06 Doug Evans <dje@sebabeach.org>
476 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
477 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
478 * utils.scm: ... here.
480 2009-08-05 Doug Evans <dje@sebabeach.org>
482 Track source location better, for better error messages.
483 * pmacros.scm (-pmacro-eval): Delete, unused.
484 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
485 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
486 (scan-list, scan): Ditto.
487 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
488 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
489 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
490 (scan-list1): New function.
491 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
492 * read.scm (<reader>): New member `location'.
493 (-reader-lookup-command): Renamed from reader-lookup-command,
495 (reader-error): Rewrite to produce better source location info.
496 (current-reader-location): New function.
497 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
498 All callers updated. Record source location of expression.
499 (reader-process-expanded!): Renamed from reader-process-expanded.
501 (-reader-process!): Renamed from reader-process. New arg `loc'.
502 All callers updated. Record source location of define-pmacro.
503 * utils-cgen.scm (<location>): New class.
504 (single-location): New (pseudo) class.
505 (pretty-print-single-location, pretty-print-location): New functions.
506 (location-top, location-push-single, location-push): New functions.
507 (unspecified-location, current-input-location): New functions.
508 (location-property): New object property.
509 (location-property-set!): New function.
510 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
512 * testsuite/location-1.test: New testcase.
513 * testsuite/run-tests.sh: Fix fail count handling.
514 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
515 to expect cgen to fail.
517 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
519 * read.scm (-cmd-include): Renamed from include. All callers updated.
520 (-cmd-if): Renamed from cmd-if. All callers updated.
521 Use reader-process-expanded! on then/else clauses instead of eval1.
523 2009-07-22 Doug Evans <dje@sebabeach.org>
525 * modes.scm (TI,OI): New modes.
526 * types.scm (parse-type): Improve error checking. Don't hardwire
528 * utils.scm (non-negative-integer?): New function.
530 * pmacros.scm (-pmacro-builtin-find): New predicate.
531 (pmacros-init!): Add .find.
532 * doc/pmacros.tex: Document .find.
533 * testsuite/pmacros-1.test: Test .find.
535 2009-07-20 Doug Evans <dje@sebabeach.org>
537 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
538 commented out printfs.
539 * rtl.scm (rtl-finish!): Whitespace tweaks.
540 * model.scm (parse-insn-timing): Tweak logging message.
541 * operand.scm: Comment and whitespace tweaks.
542 (op:type): Tweak error message.
543 (op-ifield): Tweak logging message.
544 (-derived-operand-parse, anyof-merge-semantics): Ditto.
545 * read.scm: Whitespace cleanup.
546 * utils.scm: Whitespace cleanup.
548 2009-07-19 Doug Evans <dje@sebabeach.org>
550 Fix binding of nested pmacro parameters.
551 * pmacros.scm (-pmacro-env-make): New arg prev-env.
553 (-pmacro-bulid-lambda): Ditto.
554 * doc/pmacros.texi: Update.
555 * testsuite/pmacros-1.test: Add testcase.
557 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
559 (-multi-ifield-make-default-extract): Ditto.
561 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
562 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
563 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
565 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
566 * doc/rtl.texi: Update.
568 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
570 Rename builtin boolean pmacros, for consistency with rtl.
571 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
572 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
573 * doc/pmacros.texi: Update.
574 * testsuite/pmacros-1.test: Update.
576 2009-07-17 Doug Evans <dje@sebabeach.org>
578 Use hash tables to record ifields, operands, insns, macro-insns.
579 * attr.scm (attr-builtin!): Tweak some comments.
580 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
581 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
583 (<multi-ifield>): New constructor.
584 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
585 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
587 (-sub-insn-make!): Add hack to avoid differences in generated code.
588 (multi-insn-instantiate!): Add total number of multi-insns to
590 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
591 minsn-list to foo-table. New member next-ordinal.
592 Update getters/setters.
593 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
595 (-get-next-ordinal!, -get-lowest-ordinal): New function.
596 (-make-ident-object-table, -ident-object-table->list,
597 -ident-object-table-add!, -ident-object-table-lookup): New functions.
598 (current-ifld-list, current-ifld-add! current-ifld-lookup,
599 -ifld-already-defined?): Rewrite.
600 (current-op-list, current-op-add! current-op-lookup,
601 -op-already-defined?): Rewrite.
602 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
603 (current-insn-list, current-insn-add! current-insn-lookup,
604 -insn-already-defined?): Rewrite.
605 (current-minsn-list, current-minsn-add! current-minsn-lookup,
606 -minsn-already-defined?): Rewrite.
607 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
608 (MAX-VIRTUAL-INSNS): Define.
609 (arch-analyze-insns!): Add hack to avoid differences in generated code.
610 Update use of arch-insn-list.
611 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
612 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
614 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
615 <ident>. New constructor.
616 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
618 * sid.scm (-virtual-insn-add!): New function.
619 (-create-virtual-insns!): Call it.
620 (-fill-sim-insn-list!): Rewrite.
621 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
622 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
623 * utils-cgen.scm (<ordered-ident>): New class.
624 (obj-ordinal, obj-set-ordinal!): New functions.
625 (add-ident-methods!): Delete.
627 * model.scm (parse-insn-timing): Change logging message to level 3.
629 2009-07-16 Doug Evans <dje@sebabeach.org>
631 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
632 add a link to define-normal-insn-enum.
634 * doc/porting.texi (Conventions): Add docs on writing integers.
636 * cpu/simplify.inc (*): One line doc strings don't need \n.
637 (df): Invoke define-full-ifield instead of claiming it's an alias.
639 (dnop): Mark as deprecated.
641 * cpu/play.cpu: Add example of hardware `layout'.
642 * doc/porting.tex: Add docs on simplify.inc.
643 * doc/rtl.texi: Cleanup pass over "Simplification macros",
646 * ifield.scm: Whitespace/formatting cleanup.
648 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
650 * read.scm (parse-error): Don't print single entry args as a list.
651 (-reader-process-expanded-1): Convert symbol to string for
654 * insn.scm (multi-insn-instantiate!): Tweak logging message.
656 2009-07-15 Doug Evans <dje@sebabeach.org>
658 * cpu/simplify.inc (dno): New pmacro.
659 * doc/porting.texi: Add section on simplify.inc.
660 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
662 2009-07-15 Doug Evans <devans@sourceware.org>
664 * gen-all-doc: Generate index.html.
666 2009-07-13 Doug Evans <dje@sebabeach.org>
668 Extend pmacro language, add testsuite.
669 * Makefile.am (SUBDIRS): Add testsuite.
670 * Makefile.in: Regenerate.
671 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
672 testsuite/test-utils.sh.
673 * configure: Regenerate.
674 * dev.scm (cload): Handle testsuite app.
675 (load-testsuite): New function.
676 * pmacros.scm: (-pmacro-debug?): New global.
677 (-smacro-table): New global.
678 (-smacro-lookup, -smacro-set!): New functions.
679 (-pmacro-make): New argument `syntactic-form?', all callers updated.
680 (-pmacro-syntactic-form?): New function.
681 (-pmacro-expected-number, -pmacro-verify-number): New functions.
682 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
683 (-pmacro-expected-non-negative-integer): New function.
684 (-pmacro-verify-non-negative-integer): New function.
685 (-pmacro-expand-expr-list): New function.
686 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
687 (-pmacro-process-args): Renamed from -pmacro-invoke.
688 (-pmacro-apply, -smacro-apply): New functions.
689 (-pmacro-expand): Rewrite syntactic form processing.
690 (-pmacro-build-lambda): Reformat.
691 (define-pmacro): Watch for more errors in definition.
692 (pmacro-debug): New function.
693 (pmacro-trace): Set/reset -pmacro-debug?.
694 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
695 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
696 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
697 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
698 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
699 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
700 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
701 (pmacros-init!): Initialize -smacro-table.
702 Rewrite pmacro initialization.
703 * read.scm (reader-process-expanded): Renamed from
704 -reader-process-expanded. All callers updated.
705 Recognize () as a no-op.
706 (cpu-load): Tweak logging messages.
707 * utils.scm (message): Add comment.
708 * cpu/play.cpu: Add some instructions to play with .let.
709 * doc/cgenint.texi: Move some debugging related docs to here from
711 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
712 * testsuite/Makefile.am: New file.
713 * testsuite/Makefile.in: New file.
714 * testsuite/test-utils.sh.in: New file.
715 * testsuite/run-tests.sh: New file.
716 * testsuite/testsuite.cpu: New file.
717 * testsuite/pmacros-1.test: New file.
719 * decode.scm: Comment and formatting tweaks.
720 (-build-decode-table-guts): Add more data to logging message.
722 2009-07-12 Doug Evans <dje@sebabeach.org>
724 Delete files that now live in ../cpu.
725 * cpu/iq10.cpu: Delete.
726 * cpu/iq2000.cpu: Delete.
727 * cpu/iq2000.opc: Delete.
728 * cpu/iq2000m.cpu: Delete.
729 * cpu/m32r.cpu: Delete.
730 * cpu/m32r.opc: Delete.
732 2009-07-09 Doug Evans <dje@sebabeach.org>
734 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
735 All callers updated. Work around -ve shifts by referencing the
738 * utils.scm (message): Handle pairs.
740 2009-07-08 DJ Delorie <dj@redhat.com>
742 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
743 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
744 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
747 2009-07-07 Doug Evans <dje@sebabeach.org>
749 * cpu/play.cpu (add): Use (ifield enum) for one format element.
750 * cpu/play.opc: New file.
752 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
753 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
754 * doc/rtl.texi (Instructions): Update.
756 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
757 (opc-arguments, -OPC): Call set-opc-file-path!.
758 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
759 (set-opc-file-path!): New function.
760 * dev.scm: Mention set-opc-file-path!. Mention doc options.
762 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
763 before passing to gen-c-args.
765 2009-07-06 DJ Delorie <dj@redhat.com>
767 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
768 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
769 unspecified accesses to control registers.
771 2009-07-01 DJ Delorie <dj@redhat.com>
773 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
774 unspecified accesses to control registers.
776 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
777 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
779 2009-06-27 Doug Evans <dje@sebabeach.org>
781 * gen-all-intrinsics: New file.
783 2009-06-24 Doug Evans <dje@sebabeach.org>
785 * All *.scm files: Update copyright year.
786 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
788 2009-06-23 DJ Delorie <dj@redhat.com>
790 * intrinsics.scm: Updates to support IVC2.
791 (belongs-to-group?): Check IVC2 slots.
792 (-slots-attribute): New.
793 (targets::attributes): Add SLOTS.
794 (target:add-well-known-intrinsics): Add CPMOV.
795 (md-insn): Add CPTYPE and CRET?.
796 (add-md-insn): Likewise.
797 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
798 duplicate insns with different bit patterns.
799 (write-cgen-insn?): Add cret? support.
800 (intrinsics.h): Add vector types.
801 (runtime-op): Add vector support.
802 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
804 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
805 * cpu/mep-ivc2.cpu: Update all insns to include type information.
806 (h-cr-ivc2): Default to typeless.
807 (h-ccr-ivc2): Fix register width.
808 (SLOTS): Fix values and default.
809 (ivc2_*): Add control register names.
810 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
812 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
813 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
815 2009-06-22 Doug Evans <dje@sebabeach.org>
817 * semantics.scm (insn-build-known-values): Fix typo in comment.
819 2009-06-21 Doug Evans <dje@sebabeach.org>
821 * rtl-xform.scm (rtx-simplify-insn): New function.
822 * html.scm (gen-insn-docs): Call it.
823 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
824 * iformat.scm (ifmt-analyze): Minor simplification.
826 * semantics.scm (semantic-compile): Change arg sem-code-list to
828 (semantic-attrs): Ditto.
829 * iformat.scm (ifmt-analyze): Update.
830 (ifmt-compute!): Update.
831 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
833 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
834 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
835 * semantics.scm (rtx-simplify): Ditto.
836 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
837 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
838 (-simplify-expr-fn): Move to rtl-xform.scm.
839 (-solve-expr-fn, rtx-solve): Ditto.
840 * rtl-xform.c: New file.
843 * rtl-c.scm (delay): Add FIXME, tweak formatting.
844 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
845 (-rtx-traverse, rtx-traverse): Ditto.
847 2009-06-20 Doug Evans <dje@sebabeach.org>
849 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
851 * configure.in: Update version to 1.1.
852 * configure: Regenerate.
853 * read.scm (-CGEN-VERSION): Update to 1.1.0.
855 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
856 Doug Evans <dje@sebabeach.org>
858 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
859 (cgen-desc.c): Ditto.
860 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
861 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
862 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
863 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
864 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
865 (cgen-cpuall.h, cgen-ops.c): Ditto.
866 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
867 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
868 (cgen-sem-switch.c): Ditto.
869 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
870 * sim-model.c (cgen-model.c): Ditto.
872 2009-06-18 Doug Evans <dje@sebabeach.org>
874 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
876 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
878 * dev.scm (cload): Change #:arch argument to take the path to the
879 .cpu file instead of just the name of the architecture.
880 * read.scm (arch-path): Remove trailing '/'.
881 (cpu-load): Set `arch-path' to directory of .cpu file.
882 (-cgen): Don't set `arch-path' here.
884 * doc/porting.texi: Update.
886 2009-06-14 Doug Evans <dje@sebabeach.org>
888 * gen-all-doc: Use files in ../cpu where possible.
890 * Makefile.am (ARCHFILE): Fix path.
891 * Makefile.in: Regenerate.
892 * html.scm: Use "pre" instead of "plaintext".
894 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
895 * doc/app.texi: Cleanup pass.
896 * doc/cgen.texi: Cleanup pass.
897 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
898 * doc/intro.texi: Cleanup pass.
899 * doc/mdate-sh: New file.
900 * doc/opcodes.texi: Cleanup pass.
901 * doc/pmacros.texi: Cleanup pass.
902 * doc/porting.texi: Cleanup pass.
903 * doc/rtl.texi: Cleanup pass.
904 * doc/running.texi: Cleanup pass. Document more runtime options.
905 * doc/stamp-vti: Update.
906 * doc/version.texi: Update.
908 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
909 (GUILE): Fix definition.
910 * Makefile.in: Regenerate with automake 1.9.6.
911 * aclocal.m4: Regenerate with aclocal 1.9.6.
912 * configure.in (AC_PREREQ): Set to 2.59.
913 (GENINSRC_NEVER): Define.
914 * configure: Regenerate with autoconf 2.59.
915 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
916 (cgen.info,cgen.dvi): Delete.
917 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
918 (noinst_TEXINFOS): Add cgenint.texi.
919 (DOCFILES): Add missing files.
920 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
921 * doc/Makefile.in: Regenerate with automake 1.9.6.
923 * guile.scm: Add "." to %load-path if >= guile version 1.8.
925 * attr.scm: Removing trailing whitespace.
926 * cgen-intrinsics.scm: Ditto.
927 * cgen-sim.scm: Ditto.
933 2009-05-28 DJ Delorie <dj@redhat.com>
935 * cpu/mep.opc (parse_signed16_range): New.
936 (parse_unsigned16_range): New.
937 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
939 2009-05-26 DJ Delorie <dj@redhat.com>
941 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
943 (f-ivc2-ccrn-c3hi): New.
944 (f-ivc2-ccrn-c3lo): New.
945 (f-ivc2-ccrn-c3): New.
946 (ivc2c3ccrn): Use it.
948 2009-05-22 DJ Delorie <dj@redhat.com>
950 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
951 (mep_config_map): Regenerate.
953 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
956 (cmovc): move to after field definitions, use ivc2-specific
958 (cpmovi_b_P0S_P1): New.
960 2009-05-19 DJ Delorie <dj@redhat.com>
962 * cpu/mep.opc: Regenerate configuration.
963 (parse_cdisp10): Only check CPU flags, not COP flags.
964 (check_configured_mach): Likewise.
966 2009-05-13 DJ Delorie <dj@redhat.com>
968 * intrinsics.scm (insns.md): Add RTL predicates.
969 (intrinsics.h): Remove old C intrinsics.
971 2009-04-29 DJ Delorie <dj@redhat.com>
974 * mep-core.cpu: Regenerated. Add support for deferred register
976 (SLOT): Add IVC2 slot types.
977 (sim-syscall): Rename to something more appropriate.
978 * mep-ext-cop.cpu: Regenerate.
979 * mep.opc: Regenerate. Add "coprocessor supported" define area.
980 (print_slot_insn): New.
981 (mep_examine_ivc2_insns): New.
982 (mep_print_insn_set_ivc2_mode): New.
983 (mep_print_insn): Support IVC2 slotting.
985 2009-04-20 DJ Delorie <dj@redhat.com>
987 * intrinsics.scm (intrinsics-analyze!): Include aliases.
988 (guess-mode): Drop COP* syntax.
989 (need-insn): Add "--syscall--" to the list.
990 (enum-type): Drop COP* syntax.
991 (intrinsics.h): Likewise.
992 (intrinsic-protos.h): Change file header to allow it to be
995 2009-04-17 DJ Delorie <dj@redhat.com>
997 * cpu/mep-c5.cpu (f-12s20): Change to signed.
998 (lhucpm1): Limit to C5 mach.
999 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1000 * cpu/mep-core.cpu (extend-cdisp10): New.
1001 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1003 2009-04-08 DJ Delorie <dj@redhat.com>
1005 * cpu/mep-c5.cpu: New.
1006 * cpu/mep-core.cpu: Add C5 support.
1007 * cpu/mep.opc: Likewise.
1009 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1011 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1012 about calling memset with a zero length.
1014 2009-02-03 DJ Delorie <dj@redhat.com>
1016 * cpu/mep-core.cpu: Update to new MeP configuration.
1017 * cpu/mep-ext-cop.cpu: Likewise.
1018 * cpu/mep.opc: Likewise.
1020 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1022 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1024 2008-06-17 Dave Brolley <brolley@redhat.com>
1026 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1029 2007-11-13 Dave Brolley <brolley@redhat.com>
1031 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1033 2007-11-05 Dave Brolley <brolley@redhat.com>
1035 * intrinsics.scm,cgen-intrinsics.scm: New application which
1036 generates code to support intrinsic functions for insns in the
1037 mep architecture in gcc.
1039 2007-09-21 Dave Brolley <brolley@redhat.com>
1041 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1042 (rn3us): CDATA attribute now LONG.
1044 2007-08-21 Dave Brolley <brolley@redhat.com>
1046 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1049 2007-07-05 Nick Clifton <nickc@redhat.com>
1051 * utils.scm (copyright-fsf): Update copyright notice to refer to
1054 2007-05-22 Nick Clifton <nickc@redhat.com>
1056 * doc/cgen.texi: Use @copying around the copyright notice.
1057 * doc/internals.texi: Likewise.
1059 2007-02-05 Dave Brolley <brolley@redhat.com>
1061 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1063 2007-02-05 Dave Brolley <brolley@redhat.com>
1065 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1066 in the generated code for @arch@_cgen_init_asm if it is defined.
1068 * Contribute the following changes:
1069 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1071 * attr.scm (<string-attribute>): New attribute class.
1072 (attr-kind): Handle <string-attribute>.
1073 (parse-simple-attribute): New function.
1074 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1075 (<bitset-attribute> 'parse-value): Likewise.
1076 (<boolean-attribute> 'parse-value): Likewise.
1077 (<enum-attribute> 'parse-value): Likewise.
1078 (<string-attribute> 'parse-value): New function.
1079 (-attr-parse): Handle <string-attribute>.
1080 (-attr-read): Likewise.
1081 (<string-attribute> 'gen-value-for-defn-raw): New function.
1082 (<string-attribute> 'gen-value-for-defn): New function.
1084 2006-11-07 Dave Brolley <brolley@redhat.com>
1086 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1089 2006-10-18 Dave Brolley <brolley@redhat.com>
1091 * Contribute the following changes:
1093 2006-07-11 Dave Brolley <brolley@redhat.com>
1095 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1097 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1098 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1099 hardware or memory mode which was used.
1100 * sid-cpu.scm (hw-need-write-stack?): New function.
1101 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1102 identify hardware which uses write stacks.
1103 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1104 Initialized to an empty list.
1105 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1106 hw-need-write-stack?.
1107 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1108 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1109 (used-in-delay-rtl?): New method of <hardware-base>.
1110 (hw-used-in-delay-rtl?): New function.
1112 2006-06-20 Dave Brolley <brolley@redhat.com>
1114 * sid.scm (gen-attr-type): Removed.
1115 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1116 (SH2a-MACH): Add sh5.
1117 (sh2a-nofpu-models): Add units for sh5.
1118 (sh2a-fpu-models): Likewise.
1120 2006-06-15 Dave Brolley <brolley@redhat.com>
1122 * cpu/sh-sim.cpu: New file.
1123 * cpu/sh-sid.cpu: New file.
1124 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1125 (All fields): Remap for (insn-lsb0? #f)
1126 (All insns): Add timing specs.
1127 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1128 'xattrs' and .splice it in.
1129 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1130 (h-frc,h-drc): Add PROFILE attribute.
1132 (h-vbr): New hardware.
1133 (All fields): Remap for (insn-lsb0? #f)
1134 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1135 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1136 (fpscr): Use h-fpscr.
1137 (fsdm,fsdn): Use h-fsd.
1138 (dshci): Add xtiming argument and splice it in.
1139 (dr,xd): pmacros removed.
1140 (All insns): Add timing specs, *-MACH attribibutes,
1141 SH4{A}-GROUP attributes.
1142 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1143 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1144 we're being processed for sim or sid.
1145 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1146 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1147 (define-isa compact): Add (isa-parallel-insns 2).
1148 (define-isa media): Add (isa-parallel-insns 2). Add
1149 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1150 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1152 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1153 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1154 (SH4al-MACH, SH5-MACH): New pmacros.
1155 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1156 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1157 (sh5-media-fp-units, common-model, common-model-with-fp)
1158 (sh3-model, sh3e-model): New pmacros.
1159 (define-model sh2): New model.
1160 (define-model sh2e): New model.
1161 (define-model sh3): New model.
1162 (define-model sh3e): New model.
1163 (define-model sh2a-nofpu): New model.
1164 (define-model sh2a-fpu): New model.
1165 (define-model sh4-nofpu): New model.
1166 (define-model sh4): New model.
1167 (define-model sh4a-nofpu): New model.
1168 (define-model sh4a): New model.
1169 (define-model sh4al): New model.
1170 (define-model sh5-media): New model.
1171 (define-model sh5): Add all units.
1172 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1173 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1174 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1175 (h-pc): Add PROFILE attribute.
1178 (h-gr,h-grc): Likewise.
1179 (h-cr): Set h-sr in setter.
1180 (h-frbit): Get/Set h-fpscr.
1181 (h-szbit,h-prbit): Likewise.
1182 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1183 Add getter and setter.
1184 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1185 Adjust getter and setter.
1186 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1187 Adjust getter and setter.
1188 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1189 (h-fsd,h-fmov): New hardware.
1191 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1193 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1194 doc/notes.texi, doc/porting.texi, doc/running.texi,
1195 doc/sim.texi: Fix some typos.
1197 2006-07-14 Dave Brolley <brolley@redhat.com>
1199 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1200 hardware or memory mode which was used.
1201 * sid-cpu.scm (hw-need-write-stack?): New function.
1202 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1203 identify hardware which uses write stacks.
1204 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1205 Initialized to an empty list.
1206 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1207 hw-need-write-stack?.
1208 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1209 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1210 (used-in-delay-rtl?): New method of <hardware-base>.
1211 (hw-used-in-delay-rtl?): New function.
1213 2006-06-20 Dave Brolley <brolley@redhat.com>
1215 * sid.scm (gen-attr-type): Removed.
1217 2006-05-10 Dave Brolley <brolley@redhat.com>
1219 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1220 support for (if (application-is? <appname>) (...) (...)).
1221 (-cgen): Add trailing "/" to arch-path.
1222 * utils.scm (dirname): Removed. dirname is a primitive function.
1224 2006-05-09 Dave Brolley <brolley@redhat.com>
1226 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1227 'entire_insn' not 'base_insn'.
1228 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1230 * sim.scm (-gen-arch-model-decls): Likewise.
1231 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1232 abuf->written if profiling.
1233 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1234 object->string om the mode.
1235 (-hw-gen-write-stack-decl): Likewise.
1236 * read.scm (include): Use arch-path as file location.
1237 (arch-path): Define it with a default setting.
1238 (-cgen): Update arch-path when "-a" option is specified.
1239 * utils.scm (dirname): New function.
1241 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1243 * configure.in: Remove AC_ARG_PROGRAM.
1244 * configure: Regenerate with autoconf 2.59.
1246 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1248 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1251 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1253 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1254 or an error message otherwise.
1255 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1256 Fix up comments to correctly describe the functions.
1258 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1259 Anil Paranjape <anilp1@kpitcummins.com>
1260 Shilin Shakti <shilins@kpitcummins.com>
1262 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1264 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1266 2006-02-10 Nick Clifton <nickc@redhat.com>
1268 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1270 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1272 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1274 (-hw-gen-write-stack-decl): Likewise.
1276 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1278 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1279 non-(adata-integral-insn? CURRENT-ARCH) case.
1281 2005-10-28 Dave Brolley <brolley@redhat.com>
1283 Contribute the following changes:
1284 2005-09-19 Dave Brolley <brolley@redhat.com>
1286 * attr.scm (gen-value-for-defn-raw): New methods.
1287 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1288 gen-value-for-defn-raw.
1289 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1291 2002-12-13 Dave Brolley <brolley@redhat.com>
1293 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1294 (-gen-attr-accessors): New function.
1295 (gen-obj-attr-defn): Update terminating initializer.
1296 (gen-obj-attr-end-defn): New function.
1297 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1298 * sid-cpu.scm (cgen-desc.h): Generate code to include
1299 "opcode/cgen-bitset.h"
1300 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1302 * desc.scm ('gen-defn): Update terminating initializer.
1303 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1304 terminatinig initializer.
1305 (gen-hw-decls): Ditto.
1306 (gen-operand-decls): Ditto.
1307 (gen-insn-decls): Ditto.
1308 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1309 (gen-insn-table): Update terminating initializer.
1310 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1311 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1312 * attr.scm (charmask-bytes): New function.
1313 (bitset-attr->charmask): New function.
1314 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1315 differences for SID-SIMULATOR.
1316 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1317 (<enum-attribute>): Ditto.
1319 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1321 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1323 2005-10-24 DJ Delorie <dj@redhat.com>
1325 * operand.scm (-anyof-merge-syntax): Print a more useful error
1328 2005-10-19 Nick Clifton <nickc@redhat.com>
1330 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1333 2005-10-18 Andreas Schwab <schwab@suse.de>
1335 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1337 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1339 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1342 2005-08-02 Dave Brolley <brolley@redhat.com>
1344 * rtl-c.scm (s-unop): Don't dereference
1345 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1346 (s-binop, s-convop, s-cmpop): Likewise.
1348 2005-07-29 Dave Brolley <brolley@redhat.com>
1350 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1351 if with-profile or with-parallel-write.
1352 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1353 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1356 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1358 * cpu/fr30.opc (print_register_list): Correct format strings.
1359 * cpu/ip2k.opc: Likewise.
1361 2005-07-05 Nick Clifton <nickc@redhat.com>
1363 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1364 unsigned in order to avoid compile time warnings about sign
1367 2005-07-01 Nick Clifton <nickc@redhat.com>
1369 * desc-cpu.scm: Update to ISO C90 function declaration style.
1370 * opc-asmdis.scm: Likewise.
1371 * opc-ibld.scm: Likewise.
1372 * opc-itab.scm: Likewise.
1373 * cpu/fr30.opc: Likewise.
1374 * cpu/i960.opc: Likewise.
1375 * cpu/ip2k.opc: Likewise.
1376 * cpu/iq2000.opc: Likewise.
1377 * cpu/m32r.opc: Likewise.
1378 * cpu/openrisc.opc: Likewise.
1379 * cpu/sh.opc: Likewise.
1380 * cpu/sparc.opc: Likewise.
1381 * cpu/xstormy16.opc: Likewise.
1383 2005-06-15 Dave Brolley <brolley@redhat.com>
1385 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1386 (cgen-cpu.h): Call it.
1388 Contributed on behalf of Graydon Hoare
1389 2001-06-05 graydon hoare <graydon@redhat.com>
1391 * utils.scm (foldl): Define.
1395 (intersection): Simplify.
1396 * sid.scm : Set APPLICATION to SID-SIMULATOR.
1397 (-op-gen-delayed-set-maybe-trace): Define.
1398 (<operand> 'gen-set-{quiet,trace}): Delegate to
1399 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1400 up and needs cleaning.
1401 (-with-parallel?): Hardwire with-parallel to #t.
1402 (<operand> 'cxmake-get): Replace with lookahead-aware code
1403 * sid-decode.scm: Remove per-insn writeback fns.
1404 (-gen-idesc-decls): Redefine sem_fn type.
1405 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1406 with write stack stuff.
1407 (cgen-write.cxx): Replace per-insn writebacks with single write
1408 stack writeback. Add write stack reset function.
1409 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1411 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1412 estate attribute set.
1413 (delay): Set #:delayed attribute to calculated delay, update
1414 maximum delay of cpu, check (delay ...) usage.
1415 * operand.scm (<operand>): Add delayed slot to <operand>.
1416 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1417 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1418 * doc/rtl.texi (Expressions): Add section on (delay ...).
1420 2005-06-13 Jim Blandy <jimb@redhat.com>
1422 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1425 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1427 * doc/porting.texi: Change all mention of md_apply_fix3 and
1428 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1431 2005-05-18 Dave Brolley <brolley@redhat.com>
1433 * utils-sim.scm (-gen-decode-default-entry): New function.
1434 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1435 code to check that all opcodes bits match.
1436 (-gen-decoder-switch): Use -gen-decode-default-entry.
1438 2005-05-16 Jim Blandy <jimb@redhat.com>
1440 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1441 fetched by one of our GETIMEM* methods.
1442 * utils-gen.scm (-extract-chunk-specs): Always fetch full
1443 base-insn-sized chunks.
1445 2005-05-10 Nick Clifton <nickc@redhat.com>
1447 * Update the address and phone number of the FSF organization in
1448 the GPL notices in the following files:
1449 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1450 cpu/powerpc.cpu, slib/random.scm
1452 2005-05-06 Jim Blandy <jimb@redhat.com>
1454 * pprint.scm, cos-pprint.scm: Add documentation.
1456 * pprint.scm (pprint): Don't wipe out elide-table after each call.
1458 * pprint.scm, cos-pprint.scm: New files.
1460 2005-04-04 Nick Clifton <nickc@redhat.com>
1462 * opcodes.scm (-gen-parse-address): Initialise value to zero to
1463 avoid a compile time warning.
1465 2005-03-18 Nick Clifton <nickc@redhat.com>
1467 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1468 "percent-operand" from "%operand" as the latter confuses xgettext
1469 into thinking that it is a C printf formating directive, which
1470 prevents proper translation.
1472 2005-02-23 Nick Clifton <nickc@redhat.com>
1474 * opcodes.scm (gen-parse-number): Add a cast to the desired
1475 pointer signed'ness in order to prevent compile time warnings.
1476 * cpu/ip2k.opc: Fixed compile time warnings about differing
1477 signed'ness of pointers passed to functions.
1478 * cpu/iq2000.opc: Likewise.
1479 * cpu/m32r.opc: Likewise.
1480 * cpu/openrisc.opc: Likewise.
1481 * cpu/xstormy16.opc: Likewise.
1483 2005-02-22 Alan Modra <amodra@bigpond.net.au>
1485 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1486 (cgen-desc.h): ..to here, after opcode/cgen.h include.
1488 2005-02-16 Dave Brolley <brolley@redhat.com>
1490 * utils.scm: Update copyright years.
1491 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1492 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1493 * operand.scm (-derived-operand-parse): Move logit message from level 1
1496 2005-02-15 Nick Clifton <nickc@redhat.com>
1498 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1499 prevent compile time warning messages.
1500 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1501 * utils-gen.scm (attr-int-gen-defn): Likewise.
1502 (attr-gen-defn): Likewise.
1503 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1504 (print_dollarhex16): Remove unused function.
1506 2005-02-15 Jim Blandy <jimb@redhat.com>
1508 * guile.scm (cgen-call-with-debugging): Doc fix.
1510 Make backtraces work more reliably.
1511 * guile.scm: Set up debugging parameters, and enable debugging and
1512 source positions while loading.
1513 (cgen-call-with-debugging, cgen-debugging-stack-start): New
1515 * read.scm: Don't set debugging parameters here.
1516 (catch-with-backtrace): Function deleted.
1517 (-cgen): Simply note the presence or absence of the -b option.
1518 Pass the flag to cgen-call-with-debugging, so debugging is turned
1519 off here if the user didn't request it, for faster computation.
1520 (cgen): Call cgen-debugging-stack-start here, instead of
1521 catch-with-backtrace.
1523 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1525 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1526 Don't write out the trailing -s here.
1527 * Makefile.in: Regenerated.
1528 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1529 fixup.scm here; let the caller decide which Scheme's customization
1531 * dev.scm: Load guile.scm, not fixup.scm.
1532 * fixup.scm: Deleted; contents have all moved to guile.scm.
1535 * guile.scm (debug-write): New function.
1537 2005-02-14 Jim Blandy <jimb@redhat.com>
1539 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1540 transformer procedure, not eval. Transformer procedures take one
1543 2005-02-11 Nick Clifton <nickc@redhat.com>
1545 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1546 to 'bfd_vma *' in order avoid compile time warning message.
1548 2005-02-09 Jim Blandy <jimb@redhat.com>
1550 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
1551 corresponding change in the sim/common directory.)
1553 2005-02-07 Jim Blandy <jimb@redhat.com>
1555 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
1556 changes in the opcodes directory.)
1558 * guile.scm: New file, containing Guile-specific definitions and
1559 adaptations. This is loaded by the app-specific shell scripts.
1560 Initially identical to fixup.scm.
1561 * cgen-sid.scm: Don't load fixup.scm here.
1563 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1566 2005-01-27 Jim Blandy <jimb@redhat.com>
1568 * utils.scm (string/symbol->append): Renamed from 'concat'.
1569 * opcodes.scm (gen-switch): Use new name.
1570 * insn.scm (-sub-insn-make!): Same.
1571 * rtl.scm (rtx-dump): Same.
1572 * semantics.scm (semantic-compile): Same.
1574 2005-01-20 Jim Blandy <jimb@redhat.com>
1576 * opcodes.scm (gen-switch): Use concat instead of string-map.
1578 * utils.scm (concat): New function.
1579 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1580 * rtl.scm (rtx-dump): Same.
1581 * semantics.scm (semantic-compile): Same.
1583 2004-12-16 Jim Blandy <jimb@redhat.com>
1585 * utils-cgen.scm (parse-name): Don't assume that string-map can be
1586 applied to symbols. Process everything as strings, and then
1587 convert to a symbol at the end.
1589 * read.scm (debug-repl): Temporarily redirect input and output to
1590 /dev/tty while we debug, so we don't interfere with whatever CGEN
1591 is reading or writing.
1592 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1595 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
1597 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1598 will work with newer versions of guile.
1600 2004-10-27 Nick Clifton <nickc@redhat.com>
1602 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1603 * cpu/iq2000.cpu: Likewise.
1605 2004-07-21 DJ Delorie <dj@redhat.com>
1607 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1609 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
1611 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1612 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1614 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1616 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1618 2004-03-22 Dave Brolley <brolley@redhat.com>
1620 * utils.scm (copyright-fsf): Update copyright years.
1621 (copyright-red-hat): Ditto.
1622 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1624 (-op-gen-set-trace-parallel): Ditto.
1626 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
1628 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1629 disassembling codes for 0x*2 addresses.
1631 2004-01-29 Dave Brolley <brolley@redhat.com>
1633 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1634 zeroes in the extra bit positions and generate 'opcode-mask' with ones
1635 in the extra bit positions.
1637 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1639 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1641 2003-12-04 Alan Modra <amodra@bigpond.net.au>
1643 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1644 "short" being 16 bit.
1645 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
1646 internationalize error message.
1647 (parse_lo16): Likewise. Remove useless code.
1649 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1651 * cpu/m32r.cpu : Add new model m32r2.
1652 Add new instructions.
1653 Replace occurrances of 'Mitsubishi' with 'Renesas'.
1654 Changed PIPE attr of push from O to OS.
1655 Care for Little-endian of M32R.
1656 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1657 Care for Little-endian of M32R.
1658 (parse_slo16): signed extension for value.
1660 2003-10-26 Dave Brolley <brolley@redhat.com>
1662 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1663 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1664 (-gen-extract-fn): Call -gen-record-profile-args.
1666 2003-10-21 Dave Brolley <brolley@redhat.com>
1668 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1670 * decode.scm (-opcode-slots): Correct typo in logit call.
1672 2003-10-09 Jim Blandy <jimb@redhat.com>
1674 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1675 for @arch@_cgen_hw_table. GDB needs to be able to find this.
1677 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1679 2003-10-06 Dave Brolley <brolley@redhat.com>
1681 * gen-all-doc: Add fr550.
1683 2003-09-11 Doug Evans <dje@sebabeach.org>
1685 * Makefile.am (ARCHFILE): New var.
1686 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1687 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1688 * Makefile.in: Regenerate.
1690 2003-09-08 Dave Brolley <brolley@redhat.com>
1692 On behalf of Doug Evans <dje@sebabeach.org>
1693 Pass in paths to input files, instead of assuming they live in
1694 $srcdir/cpu. Plus misc. option processing cleanup.
1695 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1696 Add pre-process pass to all options.
1697 * cgen-gas.scm (gas-arguments): Ditto.
1698 * cgen-sid.scm (sim-arguments): Ditto.
1699 * cgen-sim.scm (sim-arguments): Ditto.
1700 * cgen-stest.scm (stest-arguments): Ditto.
1701 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
1702 (-opc-file-path): New global.
1703 (opc-file-path): New fn.
1704 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1705 All callers updated.
1706 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1707 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1708 Replace srcdir arg with opc-file. All callers updated.
1709 * read.scm (-opt-spec-update): Delete.
1710 (opt-get-first-pass,opt-get-second-pass): New fns.
1711 (-cgen): Process application-specific arguments in two passes.
1713 2003-08-29 Dave Brolley <brolley@redhat.com>
1715 * cpu/frv.cpu: Removed.
1716 * cpu/frv.opc: Removed.
1718 2003-08-21 Nick Clifton <nickc@redhat.com>
1720 * cpu/frv.cpu (mbtoh): Replace input parameter to
1721 u-media-dual-expand and u-media-dual-btoh with output parameter.
1722 (cmbtoh): Add profiling hack.
1724 2003-08-19 Michael Snyder <msnyder@redhat.com>
1726 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1728 2003-08-07 Michael Meissner <gnu@the-meissners.org>
1730 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1731 the elements for the END record of CGEN_OPINST, silencing warnings.
1733 2003-07-15 Doug Evans <dje@sebabeach.org>
1735 Add guile 1.6.4 support.
1736 - empty list must be quoted
1737 - string functions have stricter type checking
1738 - eval now takes a second argument
1739 - symbol-bound? is deprecated
1740 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1741 (bitset-attr->list): Ensure arg to string-cut is a string.
1742 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1743 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1744 * cos.scm (-class-list): Must quote empty list.
1745 (-class-parent-classes,-class-compute-class-desc): Ditto.
1746 (class-make,make,object-reset!): Ditto.
1747 (method-make-make!): Call eval1 instead of eval.
1748 (method-make-forward!,method-make-virtual-forward!): Ditto.
1749 * decode.scm (subdtable-add): Use stringsym-append instead of
1751 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1752 (-build-decode-table-entry): Fetch string name of insn.
1753 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1754 (-gen-mach-table-defns): Ditto for mach.
1755 (gen-ifld-defns): Ditto for ifld.
1756 (gen-hw-table-defns): Ditto for hw.
1757 (gen-operand-table): Ditto for op.
1758 (gen-insn-table-entry): Ditto for insn.
1759 * desc.scm (gen-attr-table-defn): Ditto for attr.
1760 (<keyword>,gen-defn): Don't pass symbols to string-append.
1761 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1763 (enum-vals-upcase): Use symbol-upcase to build result.
1764 (-enum-parse): Use stringsym-append to build errtxt.
1765 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1766 (eval1): New function.
1767 (symbol-bound?): Provide own version if >= guile 1.6.
1768 * hardware.scm (define-keyword): Use string-append instead of
1770 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
1771 cgen.html,cgen-insn.html): Convert current-arch-name to a string
1773 (gen-list-entry): Handle either symbol or string `name' arg.
1774 (gen-obj-doc-header): Fetch string name of `o' arg.
1775 (define-cpu-intro): Ditto for cpu.
1776 (gen-mach-intro): Ditto for mach.
1777 (gen-model-intro): Ditto for model.
1778 (gen-isa-intro): Ditto for isa.
1779 (gen-machine-doc-1): Ditto for isa.
1780 (gen-reg-doc-1): Convert mach to string first.
1781 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
1782 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
1784 (gen-insn-categories): Fetch string name of mach. Convert
1785 enum-val-name to string first.
1786 (gen-insn-docs): Fetch string name of mach.
1787 * ifield.scm (ifld-ilk): Result is a string.
1788 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
1789 Fetch string name of ifld.
1790 (-sfmt-search-key): Similarily for ifld and op.
1791 * insn.scm (syntax-make): Fetch string name of syntax element.
1792 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
1793 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
1794 * mode.scm (mode:c-type): Result is a string.
1795 (mode:enum): Fetch string name of mode.
1796 (-mode-parse): Use stringsym-append to build errtxt.
1797 * model.scm (model:enum): Fetch string name of model.
1798 (-model-parse): Use stringsym-append to build errtxt.
1799 (parse-insn-timing): Must quote empty list.
1800 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
1801 (-gen-minsn-opcode-entry): Ditto.
1802 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
1804 (read-cpu.opc): Convert current-arch-name to a string before using.
1805 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
1806 (<derived-operand>): Must quote empty list.
1807 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
1808 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
1810 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
1811 (-pmacro-sym): Must convert symbols to strings before passing to
1813 (-pmacro-str): Ditto.
1814 (pmacros-init!): Use eval1 instead of eval.
1815 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
1816 (keep-isa-atlist?): Ditto.
1817 (cmd-if): Use eval1 instead of eval.
1818 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
1819 (-rtl-c-get): Fetch string name of src.
1820 (s-unop): Ditto for mode.
1821 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
1822 (-gen-par-temp-defns,subword): Ditto.
1823 (join): Use stringsym-append instead of string-append.
1824 * rtl-traverse.scm (rtx-option?): Convert option to string first.
1825 (rtx-traverse-debug): Fetch string name of rtx-obj.
1826 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
1827 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
1828 (rtx-pretty-name): Result is a string.
1829 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
1830 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
1831 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
1833 (-gen-sfrag-case): Fetch string name of user.
1834 * sid-model.scm (unit:enum): Fetch string name of unit.
1835 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
1836 (<hw-memory>,gen-set-quiet): Ditto.
1837 (gen-mode-defs): Ditto.
1838 (sim-finish!): Convert current-arch-name to a string before using.
1839 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
1840 (-gen-no-scache-semantic-fn): Ditto.
1841 (cgen-defs.h): Fetch string name of isa.
1842 (cgen-read.c): Convert current-arch-name to a string before using.
1843 (cgen-write.c): Ditto.
1844 * sim-model.scm (unit:enum): Fetch string name of unit.
1845 (gen-model-fn-decls): Use stringsym-append instead of string-append.
1846 (-gen-model-timing-table): Fetch string name of model.
1847 (-gen-mach-model-table): Ditto.
1848 (-gen-mach-defns): Fetch string name of mach.
1849 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
1850 (<hw-memory>,cxmake-get): Fetch string name of mode.
1851 (<hw-memory>,gen-set-quiet): Ditto.
1852 (gen-mode-defs): Ditto.
1853 (sim-finish!): Must quote empty list.
1854 * utils-cgen.scm (<ident>): Must quote empty list.
1855 (obj:str-name): New fn.
1856 (parse-comment): Result is a string.
1857 (parse-symbol): Result is a symbol.
1858 (parse-string): Result is a string.
1859 (keyword-list?): Convert arg to string before calling string-ref.
1860 (keyword-list->arg-list): Ditto.
1861 (gen-attr-name): Convert attr-name to string first.
1862 (alpha-sort-obj-list): Use symbol<? instead of string<?.
1863 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
1864 (gen-define-ifmt-ifields): Ditto for fld.
1865 * utils.scm (gen-c-symbol): Ensure str is a string before calling
1867 (gen-file-name): Ditto.
1868 (symbol-downcase,symbol-upcase,symbol<?): New fns.
1869 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
1870 (reduce): Call eval1 instead of eval.
1871 * cpu/m32r.cpu (addi): Don't use `#.'.
1873 * gen-all-sim: Fix some typos.
1875 2003-07-08 Doug Evans <dje@sebabeach.org>
1877 * gen-all-doc: Ensure run from cgen src dir.
1878 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
1879 * gen-all-sid: Similarily, in ./tmp-sid.
1880 * gen-all-sim: Similarily, in ./tmp-sim.
1882 2003-06-20 Doug Evans <dje@sebabeach.org>
1884 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
1886 2003-06-19 Doug Evans <dje@sebabeach.org>
1888 * mach.scm (-ifld-already-defined?): New proc.
1889 (current-ifld-add!): Use it.
1890 (-op-already-defined?): New proc.
1891 (current-op-add!): Use it.
1892 (-insn-already-defined?): New proc.
1893 (current-insn-add!): Use it.
1894 (-minsn-already-defined?): New proc.
1895 (current-minsn-add!): Use it.
1896 (obj-isa-list): New proc.
1897 (isa-supports?): Use it.
1899 2003-06-10 Doug Evans <dje@sebabeach.org>
1901 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
1902 * cpu/m32r.cpu (all insns): Ditto.
1904 * mach.scm (current-*-add!): Disallow redefinition. Make result
1907 * gen-all-doc: Split arm and frv docs up a bit.
1909 * cpu/arm.cpu: Add IDOC attribute.
1910 * cpu/frv.cpu: Ditto.
1911 * cpu/i960.cpu: Ditto.
1912 * cpu/openrisc.cpu: Ditto.
1913 * cpu/xstormy16.cpu: Ditto.
1914 * cpu/m32r.cpu: Ditto.
1915 (all insns): Explicitly specify IDOC attribute.
1917 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
1918 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
1919 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
1920 * Makefile.in: Regenerate.
1921 * attr.scm (<integer-attribute>:parse-value-def): Implement.
1922 (-attr-read): Defer computing default value until we know the type.
1923 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
1924 (<attr-list>:attr-present?): New method.
1925 (atlist-attr-present?,obj-attr-present?): New fns.
1926 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
1927 (attr-builtin!): New insn attr IDOC.
1928 * cgen-doc.scm (doc-arguments): New args -I,-N.
1929 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
1930 Support comment as fourth element of enum value.
1931 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
1932 * html.scm (gen-html-header): New arg kind, all callers updated.
1933 (gen-table-of-contents): New arg insn-file, all callers updated.
1934 (gen-list-entry,gen-doc-header): New fn.
1935 (get-operands): Delete.
1936 (gen-iformat-table): Rewrite.
1937 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
1938 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
1939 (get-insn-properties,guess-insn-idoc-attr!): New fn.
1940 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
1941 (get-insns-for-category,gen-categories-insn-lists): New fns.
1942 (gen-insn-docs): Simplify each insn's semantics first.
1943 Print insn tables sorted by IDOC categories.
1944 (*insn-html-file-name*): New global.
1945 (cgen-insn.html): New fn.
1947 * insn.scm (<insn>): Create a setter for the `tmp' member.
1948 * semantics.scm (insn-build-known-values): Renamed from
1949 -build-known-values. All callers updated.
1951 * rtl.scm: Move traveral/evaluation support to ...
1952 * rtl-traverse.scm: New file.
1953 * read.scm: Maybe-load rtl-traverse.scm.
1955 * rtl.scm (-rtx-valid-types): Add SETRTX.
1957 * rtx-funcs.scm (nop,parallel): Fix mode.
1959 * utils.scm (eqv-lookup-index): New fn.
1960 (assq-lookup-index): Renamed from lookup-index. All callers updated.
1962 * dev.scm (load-doc): Set APPLICATION.
1964 2003-06-10 Dave Brolley <brolley@redhat.com>
1966 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
1967 * sid-decode.scm: Generate #include of config.h into
1968 @prefix@-decode.cxx.
1969 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
1971 2003-06-07 Doug Evans <dje@sebabeach.org>
1973 * gen-all-sid: New file.
1974 * gen-all-opcodes: New file.
1976 2003-06-05 Nick Clifton <nickc@redhat.com>
1978 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
1979 version of the FRinti operand.
1980 (FRintjeven): Likewise for FRintj.
1981 (FRintkeven): Likewise for FRintk.
1982 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
1983 media-quad-arith-sat-semantics, media-quad-arith-sat,
1984 conditional-media-quad-arith-sat, mdunpackh,
1985 media-quad-multiply-semantics, media-quad-multiply,
1986 conditional-media-quad-multiply, media-quad-complex-i,
1987 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
1988 conditional-media-quad-multiply-acc, munpackh,
1989 media-quad-multiply-cross-acc-semantics, mdpackh,
1990 media-quad-multiply-cross-acc, mbtoh-semantics,
1991 media-quad-cross-multiply-cross-acc-semantics,
1992 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
1993 media-quad-cross-multiply-acc-semantics, cmbtoh,
1994 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
1995 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
1996 cmhtob): Use new operands.
1997 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
1998 (parse_even_register): New function.
2000 2003-06-04 Doug Evans <dje@sebabeach.org>
2002 Better handling of 64 bit and mixed 32/64 bit architectures.
2003 * hardware.scm (hw-update-word-modes!): New fn.
2004 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2005 hw-update-word-modes!.
2006 (state-word-bitsize): Replace FIXME with requested check.
2007 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2008 * mode.scm (mode-find): Ignore INT,UINT.
2009 (-mode-word-sizes-kind): New global.
2010 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2011 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2012 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2014 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2015 unusable, correct values set later.
2016 (mode-finish!): Remove cruft.
2017 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2018 * opcodes.scm (opcodes-init!): Ditto.
2019 * rtx-funcs.scm (annul): Fix mode of pc.
2020 * cpu/ia64.cpu: Remove cruft that sets word modes.
2021 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2023 2003-06-03 Nick Clifton <nickc@redhat.com>
2025 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2026 immediate value not unsigned.
2028 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2030 * cpu/sh.cpu: Amend comments to refer to SuperH.
2031 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2032 * cpu/sh64-media.cpu: Likewise.
2033 (Saturation): Update manual reference.
2035 2003-05-15 Doug Evans <dje@sebabeach.org>
2037 * Makefile.am (srcroot): New var.
2039 * Makefile.in: Regenerate.
2040 * cgen-doc.scm: New file.
2041 * html.scm: New file.
2042 * gen-all-doc: New file.
2043 * dev.scm (cload): Handle DOC application.
2045 * machs.scm (machs-for-cpu): New fn.
2046 * model.scm (models-for-cpu): New fn.
2047 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2049 (iota): Rewrite to be identical to pmacro version. All uses updated.
2050 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2052 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2053 (-gen-decode-bits): Instead put in better fix here.
2055 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2057 2003-05-01 DJ Delorie <dj@redhat.com>
2059 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2061 (set-alignfix-mem): Likewise.
2063 2003-04-16 Dave Brolley <brolley@redhat.com>
2065 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2066 * utils.scm (copyright-fsf): Update generate copyright years.
2067 (copyright-cygnus): Ditto.
2068 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2070 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2072 (<operand>'gen-profile-code): New parameter 'when'.
2073 (<iunit>'gen-profile-code): Ditto.
2074 (<insn>'gen-profile-code): Ditto.
2075 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2076 'insn_reference' for the 'after' function.
2077 * model.scm (unit:enum): Moved to sim-model.scm.
2078 * sim-model.scm (unit:enum): Moved from model.scm.
2079 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2080 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2081 * sid-model.scm (unit:enum): New version for sid.
2082 (gen-model-class-name): New function.
2083 (gen-model-unit-fn-decl): New function.
2084 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2085 (gen-model-unit-fn-name): New parameter 'when'.
2086 (-gen-model-insn-fn-name): Ditto.
2087 (-gen-model-insn-qualified-fn-name): New function.
2088 (-gen-model-insn-fn-decl): New function.
2089 (-gen-model-insn-fn-decls): New function.
2090 (-gen-model-insn-fn): New parameter 'when'. Call
2091 -gen-model-insn-qualified-fn-name.
2092 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2093 functions for modelling insn before and after execution.
2094 (-gen-model-class-decls): New function.
2095 (" (gen-model-class-name model) "): New function.
2096 (gen-model-classes): New function.
2097 (-gen-insn-timing): Generate functions for modelling insn before and after
2099 (-gen-insn-unit-timing): Generate class-qualified names.
2100 (-gen-model-timing-table): Ditto.
2101 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2102 not needed (yet) by sid.
2103 (cgen-model.h): New function.
2105 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2107 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2108 * cpu/sh64-compact.cpu: Likewise.
2109 * cpu/sh64-media.cpu: Likewise.
2111 2003-03-21 DJ Delorie <dj@redhat.com>
2113 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2114 which indicates if the sign flag is set from bit 15 or 7.
2116 (set-psw): New argument ws, propogate it.
2117 (set-psw-nowrite): Likewise.
2118 (set-mem-psw): Likewise.
2119 (set-psw-carry): Likewise. Use temporaries to prevent
2120 prematurely overwriting needed inputs.
2121 (set-psw-rrotate17): Fix logic.
2122 (shrgrgr): Preserve carry for zero-bit shifts.
2123 (shrgrimm): Likewise.
2124 (shlgrgr): Likewise.
2125 (shlgrimm): Likewise.
2126 (asrgrgr): Likewise.
2127 (asrgrimm): Likewise.
2130 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2132 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2134 2002-03-05 DJ Delorie <dj@redhat.com>
2136 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2137 prematurely overwriting needed inputs.
2138 (set-psw-sub): Likewise.
2140 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2142 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2144 2003-02-18 DJ Delorie <dj@redhat.com>
2146 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2147 (movlmemimm): Just mask the address.
2148 (movhmemimm): Likewise.
2149 (movlmemgr): Likewise.
2150 (movhmemgr): Likewise.
2151 (set-psw): Always set the psw last.
2152 (set-psw-carry): Likewise.
2153 (set-psw-add): Likewise.
2154 (set-psw-sub): Likewise.
2156 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2157 of 16 patterns from the set-psw-rotate17 function.
2158 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2159 movgriipostincgr, movgriipredecgr): Set psw correctly.
2160 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2161 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2162 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2164 2003-02-11 Dave Brolley <brolley@redhat.com>
2166 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2167 @arch@_cgen-ifld_table.
2168 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2169 @arch@_cgen-ifld_table.
2171 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2173 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2175 2003-01-09 Graydon Hoare <graydon@redhat.com>
2177 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2180 2003-01-07 Graydon Hoare <graydon@redhat.com>
2182 * utils-gen.scm (attr-int-gen-defn): Define.
2184 2002-12-21 Doug Evans <dje@sebabeach.org>
2186 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2187 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2189 * dev.scm (cload): Update location of .cpu files.
2191 2002-12-19 Doug Evans <dje@sebabeach.org>
2193 * utils-sim.scm (gen-profile-sym): New fn.
2194 (<operand>,sbuf-profile-sym): New method.
2195 (<operand>,sbuf-profile-elm): Use it.
2196 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2197 of hardcoding symbol name.
2198 (<operand>,gen-profile-code): Ditto.
2199 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2202 * mode.scm (mode-sem-mode): New fn.
2203 * operand.scm (op:new-mode): Update. mode-name.
2204 (op-natural-mode?) New fn.
2205 * rtl.scm (hw): Set hw-name,mode-name.
2207 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2209 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2210 as size of IDESC-TABLE-VAR.
2211 (@prefix@_init_idesc_table): Ditto.
2212 * sim-model.scm (-gen-mach-defns): Ditto.
2213 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2215 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2217 * insn.scm (-parse-insn-format-symbol): Improve error message.
2218 (-parse-insn-format): Ditto.
2220 * gen-all-sim: New script.
2222 2002-12-16 DJ Delorie <dj@delorie.com>
2224 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2226 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2228 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2229 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2230 (parse_immediate16): Handle immediate16 values, which now include
2231 @hi(label) and @lo(label)
2233 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2235 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2236 Add braces and cast for union field.
2237 (gen-multi-ifield-nodes): Add braces and cast for union field.
2238 (cgen_operand_table): Similarly fix sentinel.
2239 (cgen_cpu_close): Constify "insns". Formatting.
2240 (cgen-desc.c): Include xregex.h.
2241 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2243 <opc.c>: Include safe-ctype.h.
2244 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2245 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2246 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2247 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2248 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2249 (parse_addr16): Correct type of "value". Formatting.
2250 (parse_addr16_p): Likewise.
2251 (parse_addr16_cjp): Likewise.
2252 (parse_lit8): Likewise.
2253 (parse_bit3): Formatting.
2254 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2255 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2256 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2258 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2259 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2260 (print_dollarhex8): Likewise.
2261 (print_dollarhex16): Likewise.
2262 (print_dollarhex_addr16h): Likewise.
2263 (print_dollarhex_addr16l): Likewise.
2264 (print_dollarhex_p): Likewise.
2265 (print_dollarhex_cj): Likewise.
2266 (print_decimal): Likewise.
2267 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2269 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2271 * doc/rtl.texi (Model variants): Mention current limitations for
2272 unit inputs and outputs.
2273 (Hardware elements) <attribute PROFILE>: Be slightly more
2275 (Instructions) <timing>: input/output overrides have a direction
2278 2002-11-25 DJ Delorie <dj@redhat.com>
2280 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2282 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2284 * cpu/iq10.cpu: New file.
2285 * cpu/iq2000.cpu: Likewise.
2286 * cpu/iq2000.opc: Likewise.
2287 * cpu/iq2000m.cpu: Likewise.
2289 2002-11-19 DJ Delorie <dj@redhat.com>
2291 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2293 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2295 * dev.scm: Call getenv with a string, not a symbol.
2297 2002-10-08 Doug Evans <dje@transmeta.com>
2298 Hans-Peter Nilsson <hp@axis.com>
2300 * types.scm (bitrange-overlap?): Handle lsb0?.
2302 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2304 From Robert Cragie <rcc@jennic.com>:
2305 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2307 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2308 Ben Elliston <bje@redhat.com>
2309 John Healy <jhealy@redhat.com>
2310 Jeff Johnston <jjohnstn@redhat.com>
2311 Alan Lehotsky <alehotsky@redhat.com>
2312 Ubicom Inc. <SupportDesk@ubicom.com>
2314 * cpu/ip2k.cpu: New file.
2315 * cpu/ip2k.opc: Likewise.
2317 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2319 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2321 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2323 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2324 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2325 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2326 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2327 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2328 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2329 (-sthi-byte): If there is a single byte to store, store it at
2331 (sthil, sthiq): Fix big-endian behaviour.
2332 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2333 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2334 (saturate): Use Dimode to check if saturation operation is required.
2335 (usaturate): Likewise.
2337 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2338 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2339 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2340 (msadubq): Fix subword index in second operand of first subtraction.
2342 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2344 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2347 2002-06-18 Dave Brolley <brolley@redhat.com>
2349 * cpu/frv.cpu: New cpu description.
2350 * cpu/frv.opc: New cpu support code.
2352 2002-05-21 Dave Brolley <brolley@redhat.com>
2354 * decode.scm (-opcode-slots): Don't consider bits beyond the
2357 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
2359 * cpu/powerpc.cpu: New file.
2361 2002-05-01 Graydon Hoare <graydon@redhat.com>
2363 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2365 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
2367 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2368 results are expanded recursively.
2370 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
2372 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2373 call scan-symbol on it, to enable recursive macro-expansion.
2375 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
2377 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2378 for multiple-isa configurations.
2379 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2381 2002-02-04 Ben Elliston <bje@redhat.com>
2383 * cpu/sh.cpu, cpu/sh.opc: New files.
2384 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2386 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
2388 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2389 (Enumerated constants): Mention that an ifield must not specify a
2391 (Instruction operands): Ditto for index.
2392 (Expressions) <parallel>: Remove misplaced mention of local
2394 <if>: Mention that mode must be specified and non-VOID when the
2397 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
2399 * doc/porting.texi: When referring to *.opc, mention they are in
2400 the cpu subdir. Call top-level directory toplevel, not devo.
2401 Close string in define-normal-insn example.
2403 * doc/pmacros.texi: Fix .substr typo to .substring.
2404 Mention that .sym expansions are not further expanded.
2406 2002-01-22 Graydon Hoare <graydon@redhat.com>
2408 * desc-cpu.scm (ifld-number-cache): Add.
2410 (gen-maybe-multi-ifld-of-op): Add.
2411 (gen-maybe-multi-ifld): Add.
2412 (gen-multi-ifield-nodes): Add.
2413 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2415 2002-01-10 matthew green <mrg@redhat.com>
2417 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2418 (gr-Rb-names): ... to this.
2419 (h-Rb): New hardware piece.
2420 (h-Rbj): Use gr-Rb-names.
2422 (holdx): New instruction.
2424 2002-01-07 Ben Elliston <bje@redhat.com>
2426 * utils.scm (package-cygnus-simulators): Rename from this ..
2427 (package-red-hat-simulators): .. to this.
2428 * opcodes.scm (option-set!): Use package-red-hat-simulators.
2429 * sid-cpu.scm (cgen-desc.h): Likewise.
2430 (cgen-cpu.h): Likewise.
2431 (cgen-defs.h): Likewise.
2432 (cgen-write.cxx): Likewise.
2433 (cgen-semantics.cxx): Likewise.
2434 (cgen-sem-switch.cxx): Likewise.
2435 * sid-decode.scm (cgen-decode.h): Likewise.
2436 (cgen-decode.cxx): Likewise.
2437 * sid-model.scm (cgen-model.cxx): Likewise.
2438 * sid.scm (option-set!): Likewise.
2439 * sim.scm (option-set!): Likewise.
2441 2002-01-07 Ben Elliston <bje@redhat.com>
2443 * utils.scm (copyright-fsf): Add 2002.
2444 (copyright-cygnus): Rename to copyright-red-hat.
2445 (copyright-red-hat): Add 2002.
2446 (CURRENT-COPYRIGHT): Update comment.
2447 * opcodes.scm (option-set!): Update callers.
2448 * sid-model.scm (cgen-model.cxx): Likewise.
2449 * sid-cpu.scm: Likewise.
2450 * sid-decode.scm: Likewise.
2451 * sid.scm (option-set!): Handle "redhat" as an option for
2452 "copyright"; use copyright-red-hat.
2453 * sim.scm (option-set!): Likewise.
2455 2002-01-03 Dave Brolley <brolley@redhat.com>
2457 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2458 number of insns in the list. Update the population count function to
2459 identify and prioritize 3 catgories of useful bits.
2460 (-population-top-few): Don't consider bits with a population count of
2462 (-build-decode-table-entry): Don't call
2463 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
2464 identical insns at the next tree level.
2465 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2466 this function is no longer used.
2467 (filter-non-specialized-ambiguous-insns): New function.
2468 (filter-identical-ambiguous-insns): New function.
2469 (find-identical-insn): New function.
2470 (filter-harmlessly-ambiguous-insns): Removed.
2472 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
2473 matthew green <mrg@redhat.com>
2474 Frank Ch. Eigler <fche@redhat.com>
2475 Nick Clifton <nickc@cambridge.redhat.com>
2477 * cpu/xstormy16.cpu: New file.
2478 * cpu/xstormy16.opc: New file.
2480 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
2482 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2484 2001-11-14 Dave Brolley <brolley@redhat.com>
2486 * utils-gen.scm (-gen-extract-word): Correct computation of the length
2487 of the field being extracted.
2489 2001-10-29 Johan Rydberg <johan@rydberg.com>
2491 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2492 (cos ...) and (sin ..) rtx.
2494 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
2496 * desc-cpu.scm: Do not include ctype.h in generated desc
2497 files. They will inherit safe-ctype.h instead.
2499 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
2501 * desc-cpu.scm: Add missing function prototypes (for generated
2502 C files). Fix compile time warning messages about unused
2503 parameters (for generated C files).
2504 * opc-asmdis.scm: The same.
2505 * opc-ibld.c: The same.
2506 * opc-itab.scm: The same.
2507 * cpu/fr30.opc: The same.
2508 * cpu/m32r.opc: The same.
2509 * cpu/openrisc.opc: The same.
2511 2001-09-17 graydon hoare <graydon@redhat.com>
2513 * insn.scm (syntax-break-out): Correct logic in handling escaped
2516 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
2518 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2519 call @arch@_cgen_build_insn_regex now that regex support is in
2522 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
2524 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2525 (mask-superset?): Look for strict supersets to allow rejection of
2528 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2530 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2531 (cgen-desc.h): Call it.
2532 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2534 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2535 entire_insn for extraction, if it's shorter than base-insn-bitsize.
2537 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2539 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2540 mach->cpu insn-chunk-bitsize.
2541 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2542 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2543 * mach.scm (<cpu>): New field insn-chunk-bitsize.
2544 (-cpu-parse, -cpu-read): Parse/initialize it.
2545 * doc/rtl.texi (define-cpu): Document it.
2547 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
2549 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2551 2001-07-06 Ben Elliston <bje@redhat.com>
2553 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2555 2001-07-05 Ben Elliston <bje@redhat.com>
2559 * read.scm (include): Include files from srcdir/cpu.
2560 (-cgen): Likewise for loading .cpu files.
2561 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2562 * *.cpu: Move all cpu descriptions into cpu subdirectory.
2564 * simplify.inc: Likewise.
2566 2001-07-04 Ben Elliston <bje@redhat.com>
2568 * read.scm (include): Log "Including file" message at level 1,
2569 rather than outputting it with (display).
2570 (cpu-load): Log "Loading cpu description" and "Processing cpu
2571 description" messages at levels 1 and 2, respectively, rather than
2574 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
2576 * desc.scm (<keyword> 'gen-defn): Add extra zero into
2577 CGEN_KEYWORD_ENTRY initializers.
2579 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2580 (<operand> 'test-data): Involve both the index and the hardware
2581 in testcase generation.
2582 (<hw-indx> 'test-data): Generate test data from the underlying
2584 (<ifield> 'test-data): Generate test data by computing bit
2585 patterns for the field, then decoding them.
2586 (<hw-address> 'test-data): Allow for new calling convention.
2587 (<hw-iaddress> 'test-data): Likewise.
2588 (<keyword> 'test-data): Convert index values into keywords.
2589 (<hw-asm> 'test-data): Convert index values into integer strings.
2591 * gas-test.scm (cgen-build.sh): Escape '.' as well.
2593 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
2595 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2596 is required for multi-mode hw types (memory).
2598 2001-05-11 Ben Elliston <bje@redhat.com>
2600 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2601 when generating allinsn.d from objdump output. Without it, the
2602 testsuite will treat $ as the regular expression for end of line.
2604 2001-05-09 Ben Elliston <bje@redhat.com>
2606 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2607 with `cgen_cpu_open'; documentation had become out of date.
2608 * doc/rtl.texi (Instruction operands): Likewise.
2610 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
2612 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2613 various-base-length instruction sets.
2615 2001-04-02 Ben Elliston <bje@redhat.com>
2617 * sid-cpu.scm (-last-insn): New function.
2618 (-gen-sem-switch-engine): Loop through idesc while less than or
2619 equal to the last instruction enum, not less than the MAX enum.
2620 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2621 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2622 table's size to be the last instruction enum plus one, not
2624 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2625 instruction onto the instruction list.
2627 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2628 using the size of the table and its elements.
2629 (-gen-decode-insn-globals): Define the idesc table's size to be
2630 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2631 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2632 last instruction enum plus one, not @CPU@_INSN_MAX.
2634 2001-03-28 Ben Elliston <bje@redhat.com>
2636 * doc/version.texi (UPDATED, EDITION): Update.
2637 * doc/stamp-vti: Likewise.
2639 2001-03-26 Ben Elliston <bje@redhat.com>
2641 * doc/credits.texi (Credits): Update.
2643 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2644 specified prefix and, if necessary, escape `$' in gas-build.sh to
2645 prevent unwanted shell variable expansion.
2647 2001-03-24 Ben Elliston <bje@redhat.com>
2649 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2650 (<keyword>,test-data): Likewise.
2651 (<hw-address>,test-data): Likewise.
2652 (<hw-iaddress>,test-data): Likewise.
2653 (-collate-test-set): New function.
2654 (build-test-set): Use it.
2655 (gen-gas-test): Generate five test cases per instruction.
2656 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2658 * read.scm: Load "slib/random" if random is not defined.
2659 * slib/random.scm: New file.
2661 * utils.scm: Remove comments about the Hobbit compiler.
2662 (copyright-cygnus): Add 2001.
2663 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2664 (package-gnu-simulators): Tidy.
2666 2001-03-23 Ben Elliston <bje@redhat.com>
2668 * cgen-gas.scm: Inline documentation improvements.
2670 2001-03-21 Ben Elliston <bje@redhat.com>
2672 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2673 given in a syntax string is undefined.
2675 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2676 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2678 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
2680 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2681 for arg_type CGEN_CPU_OPEN_BFDMACH.
2683 2001-03-20 Ben Elliston <bje@redhat.com>
2685 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2686 instruction onto the instruction list. Define MAX_INSNS to be the
2687 value of the last instruction enum plus one.
2689 2001-03-14 Nick Clifton <nickc@redhat.com>
2691 * utils.scm (copyright-fsf): Add 2001. Remove (C).
2693 2001-03-05 Dave Brolley <brolley@redhat.com>
2695 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2696 if the number of ifields is greater than zero.
2698 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
2700 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2701 Emit LIKELY/UNLIKELY branch probability hints.
2702 * sid-decode.cpu (-gen-record-args): Ditto.
2704 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
2706 * desc-cpu.scm (-gen-hash-defines): Rename
2707 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2709 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
2711 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2713 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2714 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2716 * sid.scm (<operand> gen-write): Use unsigned long long expression
2718 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2719 (<unit> gen-profile-code): Ditto.
2721 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
2723 * doc/rtl.texi (Expressions): Document the (index-of ...) and
2726 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2728 * operand.scm (<operand> pretty-sem-name): New field.
2729 (<operand> make): Initialize it from hw-name.
2730 (op:set-pretty-sem-name!): New function.
2731 (<operand> gen-pretty-name): Default to fetching new field.
2732 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
2733 sem-name setting from -rtx-hw-name.
2735 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2737 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2738 its subsequent gen-pretty-name.
2740 * read.scm: Increase thread working stack limit and backtrace
2743 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2745 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2747 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
2749 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2750 current insn plus 4.
2751 (h-delay-insn): New hardware register.
2752 (l-jal): Uses h-delay-insn instead of pc when setting link register.
2756 * openrisc.opc (parse_hi16): Sign extend value.
2757 (parse_lo16): Likewise.
2759 2001-01-06 Ben Elliston <bje@redhat.com>
2761 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2762 instead of @cpu@ and @CPU@ to generically prefix symbol names.
2763 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2764 (-gen-semantic-fn-table): Likewise.
2765 (-gen-scache-semantic-fn): Likewise.
2766 (-gen-no-scache-semantic-fn): Likewise.
2767 (cgen-read.c): Likewise.
2768 (cgen-sem-switch.c): Likewise.
2769 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
2770 is a filename prefix.
2771 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
2772 (-gen-decode-insn-globals): Likewise.
2773 (-gen-idesc-decls): Likewise.
2774 (cgen-decode.h): Likewise.
2775 (cgen-decode.c): Likewise.
2776 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
2777 (gen-cpu-insn-enum): Likewise.
2778 (sim-finish!): Likewise.
2780 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
2782 * openrisc.cpu: New file.
2783 * openrisc.opc: Likewise.
2785 2000-12-12 Ben Elliston <bje@redhat.com>
2787 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
2789 2000-12-07 Ben Elliston <bje@redhat.com>
2791 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
2792 "insn" when there are zero ifields to extract.
2794 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
2796 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
2797 used by simple/non-scache simulators.
2798 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
2799 regardless of with-scache?.
2800 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
2802 2000-12-03 Ben Elliston <bje@redhat.com>
2804 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
2805 (cgen-desc.c): Likewise.
2807 2000-12-01 Greg McGary <greg@mcgary.org>
2809 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
2811 2000-12-01 Ben Elliston <bje@redhat.com>
2813 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
2814 definitions if run without with-multipla-isa?.
2815 (cgen-defs.h): New function. Emit an ISA-specific defs file.
2816 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
2818 2000-11-24 Ben Elliston <bje@redhat.com>
2820 * sim-cpu.scm (-gen-hardware-struct): New function.
2821 (-gen-hardware-types): If with-multiple-isa is specified, emit all
2822 hardware elements wich have share one or more ISAs with the ISAs
2825 * sim.scm (-with-multiple-isa?): New symbol.
2826 (with-multiple-isa?): New function.
2827 (option-init!): Initialise -with-multiple-isa?.
2828 (option-set!): Handle with-multiple-isa option.
2830 2000-11-21 Ben Elliston <bje@redhat.com>
2832 * utils.scm (copyright-fsf): Add the year 2000.
2834 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
2836 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
2837 unneeded "\n\n" from F() macro definition.
2839 2000-11-15 Greg McGary <greg@mcgary.org>
2841 * utils-cgen.scm (gen-define-with-symcat): New function.
2842 * desc-cpu.scm (gen-ifld-defns): Use it.
2843 (gen-hw-table-defns): Use it.
2844 (-gen-hash-defines): Use it.
2845 (gen-operand-table): Use it.
2846 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
2847 * opc-itab.scm (-gen-ifmt-table): Use it.
2848 (-gen-insn-opcode-table): Use it.
2849 (-gen-macro-insn-table): Use it.
2850 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
2851 * sim-cpu.scm (cgen-semantics.c): Use it.
2852 (cgen-sem-switch.c): Use it.
2854 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2856 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
2857 request to emit calls to insn extractors as functions rather than
2858 branches to inline blocks.
2859 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
2860 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
2862 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
2863 to extractor clauses.
2865 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2867 * decode.scm (-distinguishing-bit-population): Significantly
2868 improve popularity heuristic. Renamed from
2869 (-mask-bit-population): Gone.
2870 (-population-above-threshold): Sort new bit numbers in order of
2872 (-population-top-few): Allow up to three more bits to be selected
2873 than requested. Correct selection order to prefer better bits.
2874 Correct bug in fewer-than-requested case. Keep threshold as
2876 (decode-best-get-bits): Pass also the insn-values.
2878 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
2879 future optimization.
2881 * utils.scm (message): Format nested lists better.
2883 2000-11-09 Doug Evans <dje@casey.transmeta.com>
2885 * dev.scm: Add srcdir to %load-path.
2887 * rtx-funcs.scm (subword): Mode of argument can be different
2888 than mode of result, so don't use OP0 to specify argument's mode.
2890 2000-11-02 Ben Elliston <bje@redhat.com>
2892 * doc/porting.texi (Building a GAS test suite): Document my change
2895 2000-11-01 Ben Elliston <bje@redhat.com>
2897 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
2899 2000-10-31 Ben Elliston <bje@redhat.com>
2901 * gas-test.scm (cgen-build.sh): Allow the generated script to run
2902 with no command line arguments if the gas build directory can be
2905 2000-10-26 Doug Evans <dje@casey.transmeta.com>
2907 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
2908 op-ifld -> op-ifield.
2910 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
2912 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
2914 2000-10-13 matthew green <mrg@cygnus.com>
2916 * utils-cgen.scm (get-ifetch): Move from here ...
2917 * sim.scm (get-ifetch): ... to here.
2918 * sid.scm (get-ifetch): Copy and port to c++.
2920 2000-10-06 Dave Brolley <brolley@redhat.com>
2922 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
2923 ifld-start + ifld-word-offset.
2924 (gen-ifld-extract): Check adata-integral-insn? before checking whether
2925 the field is beyond the base number of bits.
2926 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
2927 (gen-extract-ifields): Ditto.
2928 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
2929 characters in the regular expression.
2931 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
2933 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
2934 preprocessor constant.
2936 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
2938 * slib/logical.scm: New file from slib. Provides robust bitwise
2939 logical operations for large integers.
2940 * read.scm: maybe-load it.
2942 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
2944 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
2945 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
2946 single-isa predicate, but support keep-isa filtering.
2948 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2950 * rtl-c.scm (s-sequence): Handle nested c-calls in both
2951 statement-expression and comma-expression contexts.
2952 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
2954 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2956 * decode.scm (-population-top-few): Signal error gracefully if
2957 decoding is about to become ambiguous.
2959 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2961 * doc/rtl.texi (decode-assist): Describe this field as optional.
2963 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2965 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
2968 2000-09-05 Dave Brolley <brolley@redhat.com>
2970 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
2971 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
2973 2000-08-29 Dave Brolley <brolley@redhat.com>
2975 * utils-gen.scm (gen-ifld-extract): Pass total-len if
2976 adata-integral-insn is true for this architecture.
2978 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
2980 * hardware.scm (<hw-immediate> get-index-mode): Define method.
2981 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
2982 * rtl-c.scm (-c-rtl-get): Improve an error message.
2983 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
2985 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
2987 * Makefile.in (DIST_COMMON): Regenerated.
2988 * ifield.scm (<derived-ifield> needed-iflds): New method.
2989 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
2990 sfmts built from <derived-ifield>s.
2991 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
2992 type symbol 'derived-ifield, not an unparseable string.
2993 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
2994 (-sfmt-contents): Add tracing.
2996 From Doug Evans <dje@transmeta.com>:
2997 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3000 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3002 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3003 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3004 (-rtl-c-get): Rename from rtl-c-get.
3005 (rtl-c-get): New fn for getter logging.
3007 2000-07-28 Ben Elliston <bje@redhat.com>
3011 2000-07-25 Ben Elliston <bje@redhat.com>
3013 * doc/credits.texi (Credits): Add Frank Eigler.
3015 2000-07-24 Dave Brolley <brolley@redhat.com>
3017 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3019 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3020 (<keyword>): Initialize all elements fully.
3021 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3023 (-gen-mach-table-defns): Ditto.
3024 (-gen-ifld-defns): Ditto.
3025 (-gen-operand-table): Ditto.
3026 (-gen-insn-table): Ditto.
3027 (-gen-cpu-open): Nothing to do for the mach table.
3029 2000-07-13 Ben Elliston <bje@redhat.com>
3031 * doc/version.texi (UPDATED): Update.
3033 2000-07-05 Ben Elliston <bje@redhat.com>
3035 * configure.in (AC_PATH_PROG): Remove.
3036 * configure: Regenerate.
3037 * Makefile.am (GUILE): Locate guile dynamically.
3038 * Makefile.in: Regenerate.
3039 * doc/Makefile.in: Likewise.
3041 2000-07-03 Ben Elliston <bje@redhat.com>
3043 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3044 * opc-itab.scm (cgen-opc.c): Likewise.
3046 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3048 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3049 guile 1.4 compatibility.
3050 (rtx-env-dump): Comment out buggy display calls.
3052 2000-06-15 matthew green <mrg@redhat.com>
3054 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3056 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3058 * Makefile.in: Regenerated.
3060 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3061 (gen-ifld-defns): Ditto.
3062 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3063 * rtl.c (rtl-finish!): Ditto.
3064 * opc-itab.scm (-gen-ifield-decls): Ditto.
3065 * opcodes.scm (gen-switch): Exclude derived operands.
3066 * operand.scm (op-iflds-used): Expand derived operands.
3067 (hw-index-derived): New dummy function to create dummy object.
3068 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3069 constructor. Set object's hw-name and index fields.
3070 (-anyof-merge-subchoices): Set instance object's index also.
3071 (-anyof-name): New helper function.
3072 (anyof-merge-semantics): Correct replacement of operand names in
3074 (op-ifield): Tolerate derived-operands and their funny indices better.
3075 * ifield.scm (ifld-known-values): Expand derived ifields.
3076 (non-multi-ifields, non-derived-ifields): New utility functions.
3077 (ifld-decode-mode): Tolerate objects with unbound decode field.
3078 * iformat.scm (compute-insn-length): Expand derived ifields.
3079 (compute-insn-base-mask): Ditto.
3080 * insn.scm (insn-base-ifields): Remove.
3081 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3082 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3083 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3084 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3085 (-frag-test-data): Ditto.
3086 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3087 (-gen-sem-switch-engine); Ditto.
3088 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3089 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3090 (-gen-record-args): Tolerate unbound op-ifield.
3091 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3092 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3093 Exclude multi-insns.
3094 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3095 * utils-sim.scm (op-extract?): Handle derived operands.
3097 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3098 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3099 * hardware.scm (hardware-for-mode): New function.
3101 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3102 cleaning up decode tables.
3103 (mask-superset?): Little helper function for above.
3104 * decode.scm (-build-decode-table-entry): Call it.
3105 (-opcode-slots): Add some more tracing.
3106 * arm.cpu: Disable decode-splits construct due to implementation
3107 conflict with `filter-harmlessly-ambiguous-insns'
3109 * decode.scm (-population-top-few): New function for better decode
3110 bit generation. Includes minor helper functions.
3111 (decode-get-best-bits): Call it instead.
3112 (OLDdecode-get-best-bits): Renamed previous version of above.
3115 2000-06-13 Ben Elliston <bje@redhat.com>
3117 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3118 for the Guile library directory.
3119 * configure: Regenerate.
3120 * Makefile.in, doc/Makefile.in: Regenerate.
3122 * Makefile.in, doc/Makefile.in: Regenerate.
3123 * configure.in: Remove unnecessary tests. Move to version 1.0.
3124 * acconfig.h, config.in: Remove.
3125 * configure, aclocal.m4: Regenerate.
3126 * doc/stamp-vti, doc/version.texi: Likewise.
3127 * AUTHORS: New file.
3129 2000-06-07 Ben Elliston <bje@redhat.com>
3131 * fixup.scm (symbol-bound?): Reduce debugging output.
3133 2000-06-02 matthew green <mrg@redhat.com>
3135 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3136 a given instruction, replacing derived fields with their subfields.
3137 (insn-value): Use `insn-base-ifields' to find all constant values.
3138 (multi-insn-instantiate!): Comment some debug messages.
3140 2000-06-01 Ben Elliston <bje@redhat.com>
3142 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3143 symbol names used in a (c-call ..) rtx.
3145 * sim-test.scm (build-test-set): Return (()) for an instruction
3146 with no operands, so it too is included in the generated test set.
3148 2000-05-31 Ben Elliston <bje@redhat.com>
3150 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3151 (sim-test): Likewise.
3152 * Makefile.in: Regenerate.
3154 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3156 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3157 stack traceback, in an order that resembles gdb's `bt'.
3159 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3161 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3162 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3163 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3165 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3167 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3168 * iformat.scm (ifmt-expanded-ifields): Gone.
3169 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3171 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3174 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3177 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3179 * sid.scm (with-any-profile?): New function clone.
3181 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3183 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3185 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3187 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3188 (-multi-ifield-read): Parse them.
3189 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3190 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3191 (multi-ifield gen-extract): Add decode hook.
3192 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3194 * insn.scm (syntax-break-out): More correctly handle \-escaped
3196 (syntax-make-elements): Ditto.
3197 * opc-itab.scm (compute-syntax): Ditto.
3199 2000-05-17 Ben Elliston <bje@redhat.com>
3201 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3203 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3205 * gas-test.scm (build-test-set): Return (()) for an instruction
3206 with no operands, so it too is included in the generated test set.
3208 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3210 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3211 IFMT_OPERANDS and SYNTAX_BYTES.
3213 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3215 * sim.scm (with-any-profile?): New function.
3216 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3217 to decide whether or not to include profiling counters.
3219 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3221 Fuller derived-operand support for opcodes.
3222 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3223 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3224 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3225 (gen-operand-table): Omit derived- and anyof- operands from table.
3226 (gen-insn-table): Omit multi-insns from table.
3227 * iformat.scm (ifmt-expanded-fields): New function to expand
3228 subfields of derived-ifields.
3229 (ifmt-compute!): Ignore remaining multi-insns.
3230 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3232 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3233 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3234 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3235 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3236 (gen-switch): Omit anyof-operands.
3237 * operand.scm (-anyof-syntax): New function.
3238 (-anyof-merge-syntax): Call it.
3239 * utils.scm (collect): New idiomatic function.
3241 2000-05-10 Ben Elliston <bje@redhat.com>
3243 * m68k.cpu: New file (work in progress).
3245 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3247 * Makefile.am (all-local): New target. Create stamp-cgen.
3248 * Makefile.in: Regenerated.
3249 * doc/Makefile.in: Regenerated.
3251 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3253 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3254 (-operand-parse-setter): Ditto.
3255 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3256 for CACHE-ADDR operands.
3257 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3258 trace entries. Widen byte-wide values for printing.
3259 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3260 Widen byte-wide values for printing. Hexify memory addresses.
3262 2000-04-23 matthew green <mrg@redhat.com>
3264 * m32r.cpu: Fix a typo.
3266 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3268 * ia64.cpu (define-model): Change merced to Itanium.
3269 (f-qp): Change quilifying to qualifying.
3270 (movbr_ph, movbr_pvec): Delete.
3271 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3273 2000-04-07 Ben Elliston <bje@redhat.com>
3275 * doc/porting.texi (Building a simulator test suite): Clarify
3276 where generated test cases are placed.
3278 2000-04-07 Ben Elliston <bje@redhat.com>
3280 * Makefile.am (gas-test): Remove dependency on `cgen'.
3282 * Makefile.in: Regenerate.
3284 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3286 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3287 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3288 type reconfiguration.
3289 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3292 2000-03-30 Ben Elliston <bje@redhat.com>
3294 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3296 2000-03-24 Ben Elliston <bje@redhat.com>
3298 * Makefile.am (stamp-cgen): Reinstate target.
3299 * Makefile.in: Regenerate.
3301 2000-03-22 Ben Elliston <bje@redhat.com>
3303 * slib/ppfile.scm: Remove; unused.
3304 * slib/defmacex.scm: Likewise.
3306 2000-03-21 Ben Elliston <bje@redhat.com>
3308 * doc/internals.texi (Source file overview): Document.
3310 * Makefile.am (GUILEDIR): Remove.
3311 (CGEN): Ditto. Callers use $(GUILE) instead.
3312 (GUILEFLAGS): Ditto.
3314 (APPDESCFILES): Ditto.
3315 (OPCODESFILES): Ditto.
3317 (pkgdata_SCRIPTS): Ditto.
3318 (stamp-cgen): Remove target.
3319 * Makefile.in: Regenerate.
3321 * configure.in: Remove header and library tests.
3322 * configure: Regenerate.
3323 * config.in: Likewise.
3325 2000-03-20 Ben Elliston <bje@redhat.com>
3327 * read.scm: Cease loading "hob-sup.scm".
3328 * utils.scm: Inherit the fastcall family of procedures (for now).
3329 * hob-sup.scm: Remove.
3331 2000-03-20 Ben Elliston <bje@redhat.com>
3333 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3334 * configure: Regenerate.
3335 * gdbinit.in: Remove.
3337 2000-03-17 Ben Elliston <bje@redhat.com>
3339 * Makefile.am (CGEN): Use guile, not cgen.
3340 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3341 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3342 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3343 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3344 (HOB_OBJS): Likewise.
3345 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3346 (CGENOBJS): Likewise.
3347 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3348 (hobbit, hobbit.o, hobbit.c): Remove targets.
3349 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3350 (CLEANFILES): Update.
3351 * acconfig.h (WITH_HOBBIT): Remove.
3352 * configure.in: Do not test for 3 arg scm_make_vector. Remove
3353 option --with-cgen-hobbit.
3354 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3355 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3356 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3357 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3358 * Makefile.in: Regenerate.
3359 * config.in: Likewise.
3360 * aclocal.m4: Likewise.
3361 * configure: Likewise.
3362 * README (Hobbit support): Remove.
3363 * doc/internals.texi (Conventions): Do not mention Hobbit.
3364 * doc/porting.texi (Supported Guile versions): Likewise.
3366 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
3368 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3369 callback convention to new sid sidutil::basic_cpu code.
3370 (-gen-sfrag-engine-fn): Ditto.
3371 * sid.scm (-create-virtual-insns!): Ditto.
3372 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3374 (cxmake-skip): Implement properly for pbb mode.
3376 2000-03-03 Ben Elliston <bje@redhat.com>
3378 * doc/internals.texi: New file.
3380 2000-02-29 Ben Elliston <bje@redhat.com>
3382 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3383 * doc/porting.texi: Formatting tweaks.
3385 2000-02-25 Nick Clifton <nickc@cygnus.com>
3387 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3390 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
3392 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3395 2000-02-23 Andrew Haley <aph@cygnus.com>
3397 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3400 2000-02-24 Ben Elliston <bje@redhat.com>
3402 * doc/rtl.texi (Derived operands): Add some cindex entries.
3404 2000-02-23 Ben Elliston <bje@redhat.com>
3406 * ia32.cpu (dndo): Move general purpose macro from here ..
3407 * simplify.inc (dndo): .. to here.
3409 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
3411 * arm.cpu (h-tbit): Add c-call setter function.
3414 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
3416 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3417 (-frag-cost-compute!): Ditto.
3418 * utils.scm (copyright-cygnus): Add Y2K.
3419 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3421 2000-01-25 Nick Clifton <nickc@cygnus.com>
3423 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3424 flags field of the CGEN_CPU_TABLE structure.
3426 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
3428 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3429 All references updated.
3431 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
3433 * ia32.cpu: Rewrite addressing mode support.
3435 * ifield.scm (<ifield>): New member `follows'.
3436 (ifld-known-values): New proc.
3437 (<ifield>): New method set-word-offset!.
3438 (ifld-set-word-offset!): New proc.
3439 (ifld-new-word-offset): New proc.
3440 (<ifield>): New method next-word.
3441 (<multi-ifield>): New method next-word.
3442 (ifld-next-word): New proc.
3443 (ifld-precedes?): New proc.
3444 (-ifield-parse): New args word-offset,word-length,follows.
3445 All callers updated. Handle CISC-style vs RISC-style ifields.
3446 (-ifield-read): Recognize word-offset,word-length,follows specs.
3447 (-ifld-parse-follows): New proc.
3448 (-multi-ifield-make-default-insert): New proc.
3449 (-multi-ifield-make-default-extract): New proc.
3450 (-multi-ifield-parse): Provide default values for insert,extract
3451 handlers if not specified.
3452 (<derived-ifield>): New class.
3453 (derived-ifield?): New predicate.
3454 (ifld-derived-operand?): New predicate.
3455 (f-anyof): New global.
3456 (ifld-anyof?,ifld-anyof-operand?): New predicates.
3457 (f-derived,ifld-derived?): Delete.
3458 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
3459 * insn.scm (-sub-insn-ifields): New proc.
3460 (-sub-insn-make!): New proc.
3461 (multi-insn-instantiate!): Provide initial implementation.
3462 (-insn-parse): If insn contains "anyof" operands, create a
3463 <multi-insn> object instead of a plain <insn>.
3464 (-parse-insn-format-symbol): Rewrite derived operand handling.
3465 Add anyof operand handling.
3466 (-parse-insn-format-ifield-spec): Rewrite.
3467 (-parse-insn-format-operand-spec): Delete.
3468 (-parse-insn-format-list): Delete support for `(operand value)'.
3469 (anyof-operand-format?): Replaces derived-operand-format?.
3470 * operand.scm (-operand-parse-getter): Improve error messages.
3471 (-operand-parse-setter): Ditto.
3472 (<derived-operand>): New members args,syntax,base-ifield,encoding,
3474 (<anyof-operand>): Change baseclass from <derived-operand> to
3475 <operand>. Delete member values. New members base-ifield,choices.
3476 (anyof-operand?): New predicate.
3477 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3478 (-derived-operand-parse): Rewrite.
3479 (-derived-operand-read): Rewrite.
3480 (-anyof-parse-choice): New proc.
3481 (-anyof-operand-parse): Rewrite.
3482 (-anyof-operand-read,define-anyof-operand): New procs.
3483 (<anyof-value>): Rewrite.
3484 (-anyof-initial-known): New proc.
3485 (anyof-satisfies-assertions?): New proc.
3486 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3487 (-anyof-merge-getter,-anyof-merge-setter): New procs.
3488 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3489 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3490 (-anyof-value-from-derived): New proc.
3491 (-anyof-all-choices-1,anyof-all-choices): New procs.
3492 (operand-init!): Create define-anyof-operand reader command.
3494 * insn (syntax-break-out): Take syntax as argument instead of insn.
3495 All callers updated.
3496 (syntax-make): Move here, from ???.
3498 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3499 bitrange-foo. All uses updated.
3500 (bitrange-next-word): New proc.
3502 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3504 * rtl.scm (rtx-canonicalize): Provide initial implementation.
3505 (rtx-make-const,rtx-make-enum): New procs.
3506 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
3507 (rtx-mem-addr,rtx-mem-sel): New procs.
3508 (rtx-change-address): New proc.
3509 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3510 (rtx-make-set,rtx-single-set?): New procs.
3511 (rtx-combine): New proc.
3513 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
3514 (rtx-traverse-with-locals): Ditto.
3515 (-rtx-traverse,-rtx-traverse-*): Ditto.
3517 * rtl.scm (define-subr): New proc.
3518 (rtl-init!): Create reader command `define-subr'.
3520 * cos.c (_object_mi_p): Ensure argument is an object.
3521 (indent): New function.
3522 (_object_print_elms): Add pretty-printing support.
3523 (_object_print): Ditto.
3525 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3526 (*floats-s->c-fun-table*): Ditto.
3527 * hobbit.c,hobbit.h: Rebuild.
3528 * hob-sup.c (fastcall7): New proc.
3529 * hob-sup.h (fastcall7): Declare.
3530 * hob-sup.scm (fastcall7): New macro.
3532 * mach.scm (<arch>): New member subr-list.
3533 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3534 (arch-finish!): Reverse recorded subr list.
3536 * read.scm (debug-env): New global.
3537 (debug-var-names,debug-var,debug-repl-env): New procs.
3538 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
3539 (debug-quit): Renamed from `continue'.
3541 * simplify.inc (dsmf): New pmacro.
3543 * utils.scm (plus-scan): New proc.
3544 (split-bits): Rewrite.
3545 (split-value): New proc.
3547 1999-10-13 Doug Evans <devans@casey.cygnus.com>
3549 * doc/Makefile.am (DOCFILES): Add notes.texi.
3550 * doc/Makefile.in: Rebuild.
3552 1999-10-11 Doug Evans <devans@casey.cygnus.com>
3554 * ifield.scm (ifld-derived?): New proc.
3555 (f-derived): New global.
3556 (ifield-builtin!): Create ifield f-derived.
3557 (<multi-insn>): New class.
3558 (multi-insn?): New predicate.
3559 (multi-insn-instantiate!): New proc.
3560 (-insn-parse): Create <multi-insn> objects for insns with derived
3562 (-parse-insn-format-symbol): Handle derived ifields.
3563 (-parse-insn-format-ifield-spec): New proc.
3564 (-parse-insn-format-operand-spec): New proc.
3565 (-parse-insn-format-list): Simplify.
3566 (-parse-insn-format): No longer allow (ifield-object value) spec.
3567 (derived-operand-format?): New proc.
3568 (insn-alias?): New proc.
3569 (non-alias-insns): Rewrite.
3570 (insn-real?): Renamed from real-insn?, all callers updated.
3571 (virutal-insns): Rewrite.
3572 (multi-insns): New proc.
3573 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3574 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3575 Return #f if operand doesn't have an index or if index is not an
3577 (hw-index-anyof): New proc.
3578 (-operand-parse): Allow integer indices.
3579 (<derived-operand>): New class.
3580 (derived-operand?): New predicate.
3581 (<anyof-operand>): New class.
3582 (<anyof-value>): New class.
3583 (-anyof-parse-value,-anyof-operand-parse): New procs.
3584 (-derived-operand-parse,-derived-operand-read): New procs.
3585 (define-derived-operand,define-full-derived-operand): New procs.
3586 (operand-init!): New reader command define-derived-operand.
3588 * utils.scm (list-take): Handle negative amount.
3589 (element?): Rewrite.
3591 1999-10-10 Doug Evans <devans@casey.cygnus.com>
3593 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3595 1999-10-04 Richard Henderson <rth@cygnus.com>
3597 * ia64.cpu: Checkpoint.
3599 1999-09-29 Doug Evans <devans@casey.cygnus.com>
3601 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3603 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
3604 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
3606 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
3608 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3609 PC returned by sim_engine_invalid_insn.
3611 1999-09-28 Doug Evans <devans@casey.cygnus.com>
3613 * ia32.cpu: New file.
3615 1999-09-25 Doug Evans <devans@casey.cygnus.com>
3617 * utils.scm (bit-set?): Fix off by one error.
3619 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3621 * rtl.scm (hw): Check for valid hardware element before trying to
3624 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
3625 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3626 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3627 * thumb.cpu (*): arm_compute_operand2_foo renamed to
3628 compute_operand2_foo.
3630 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3631 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3632 Call delayed_branch/branch methods instead of assigning to `vpc'.
3633 (<hw-pc>,cxmake-skip): Call skip method.
3634 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3635 (<pc>,cxmake-skip): Ditto.
3636 (-create-virtual-insns!): Ditto.
3637 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3639 (op:record-profile): Specify #:output-language "c++".
3640 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3642 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3644 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3645 (gen-semantic-code): Ditto.
3646 (-gen-sem-case,-gen-sfrag-code): Ditto.
3647 (-gen-hardware-types): Delete class @cpu@_cpu_base.
3648 (cgen-cpu.h): File is now #included by main cpu class, rather than
3650 (cgen-defs.h): New proc.
3651 (-gen-scache-semantic-fn): Change result type to sem_status.
3652 New local `status'. Call done_cti_insn/done_insn method at end.
3653 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3655 (cgen-sem-switch.cxx): Ditto.
3656 * sid-decode.scm (-gen-idesc-decls): Update return type of
3658 (cgen-decode.h): Add using namespace @arch@.
3659 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3661 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3662 (estate-output-language-c?,estate-output-language-c++?): New procs.
3663 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3664 (estate-make-for-normal-rtl-c++): New proc.
3665 (rtl-c++-parsed,rtl-c++): New proc.
3666 (s-c-call): Invoke cpu class method if c++.
3667 (join): Use s-c-raw-call.
3669 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3672 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3673 * rtl.scm (<eval-state>): New member `modifiers'.
3674 (<eval-state>,vmake!): Handle #:modifiers.
3675 (estate-with-modifiers): New proc.
3677 * rtl.scm (rtx-side-effects?): New proc.
3678 (rtx-canonical-bool): Don't change expr if it has side effects.
3679 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3682 1999-09-23 Doug Evans <devans@casey.cygnus.com>
3684 * sim.scm (gen-scache-type): Fix typo in last patch.
3686 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
3688 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3690 1999-09-05 Doug Evans <devans@casey.cygnus.com>
3692 * sid.scm (<hw-pc>,cxmake-skip): New method.
3693 (<pc>,cxmake-skip): New method.
3695 * decode.scm (decode-build-table): Delete args startbit,index-list.
3696 All callers updated.
3697 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3698 All callers updated.
3699 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3700 to decode-get-best-bits.
3701 * sid-decode.scm (-gen-decode-fn): Ditto.
3703 * hardware.scm (hw-bits): New proc.
3704 (-hw-parse): New arg layout. All callers updated.
3705 (define-full-hardware): New arg layout. All callers updated.
3706 (-hw-validate-layout): New proc.
3707 (-hw-create-[gs]etter-from-layout): New procs.
3708 (<hw-register>,parse!): Handle layout spec.
3709 * types.scm (type-bits): New proc.
3711 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3712 UNARY, BINARY, TRINARY rtxs.
3714 * attr.scm (<enum-attribute>,parse-value): Allow strings.
3715 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3716 Support '- as "unused spot" indicator.
3718 1999-09-03 Doug Evans <devans@casey.cygnus.com>
3720 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3722 1999-09-02 Doug Evans <devans@casey.cygnus.com>
3724 * rtx-funcs.scm (subword): Fix mode spec of `value'.
3726 * rtl.scm (-rtx-traverse-operands): Fix debugging message
3728 (tstate-make): New arg `depth'. All callers updated.
3729 (tstate-depth,tstate-set-depth!): New procs.
3730 (tstate-incr-depth!,tstate-decr-depth!): New procs.
3731 (-rtx-traverse-operands): Indent debugging output by traversal depth.
3732 (-rtx-traverse): Ditto. Keep track of traversal depth.
3734 1999-09-01 Doug Evans <devans@casey.cygnus.com>
3736 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3737 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3738 * utils-sim.scm: Decoder generator support moved here.
3739 (-decode-equiv-entries?,-decode-sort-entries): New procs.
3740 (-gen-decoder-switch): Sort entries for more fall-throughs.
3742 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3743 * Makefile.in: Rebuild.
3744 * sim-test.scm (build-sim-testcase): Add logging message.
3745 * dev.scm (cload): Recognize SIM-TEST application.
3746 (load-stest): Set APPLICATION to SIM-TEST.
3748 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3750 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3751 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3752 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3754 * insn.scm (syntax-break-out): Handle ${foo}.
3756 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
3758 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3759 (bin_PROGRAMS): Define.
3760 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3761 (cgen-hob.c): Prepend $(srcdir)/ here.
3762 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3763 (libcpu_a_SOURCES): Delete.
3764 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3765 (CGEN_HOB_OBJ,CGENOBJS): New variables.
3766 * configure.in (LIBS): Replace -Wl,-rpath with -R.
3767 Add AC_CHECK_LIB(guile,main).
3768 * Makefile.in: Rebuild.
3769 * doc/Makefile.in: Rebuild.
3770 * aclocal.m4: Rebuild.
3771 * config.in: Rebuild.
3772 * configure: Rebuild.
3774 1999-08-28 Doug Evans <devans@casey.cygnus.com>
3776 Rename rtx functions from name: to name, accept optional leading
3778 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
3779 * attr.scm (-attr-eval): Update.
3780 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
3781 (<hw-register>,mode-ok?): Disallow VOID.
3782 (<hw-immediate>,mode-ok?): Disallow VOID.
3783 (<hw-address>,mode-ok?): Disallow VOID.
3784 * mode.scm (mode-name?): New proc.
3785 (VOID): Renamed from VM.
3786 (DFLT): Renamed from DM.
3787 (mode-builtin!): Update.
3788 * opcodes.scm (<ifield>,gen-insert): Update.
3789 (<ifield>,gen-extract): Update.
3790 (<multi-ifield>,gen-insert,gen-extract): Update.
3791 * operand.scm (op:mode): Update.
3792 (<pc>,make!): Update.
3793 (op:new-mode): Update.
3794 (-operand-read): Update.
3795 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
3796 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
3797 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
3798 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
3799 (rtx-make): Call -rtx-munge-mode&options.
3800 (rtx accessors): Rewrite.
3801 (rtx-pretty-name): Update.
3802 (-rtx-traverse-*): Update.
3803 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
3804 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
3805 (-rtx-make-traverse-table): Update.
3806 (-rtx-traverse-operands): Update.
3807 (-rtx-option?,-rtx-option-list?): New procs.
3808 (-rtx-munge-mode&options): New proc.
3809 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
3810 (-rtx-traverse): Update.
3811 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
3812 (rtx-compile-time-constant?): Update.
3813 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
3814 (rtx-value): Update.
3815 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
3816 * rtx-funcs.scm (*): Update.
3817 * rtl-c.scm (rtl-c-get): Update.
3818 (rtl-c-set-quiet,rtl-c-set-trace): Update.
3819 (s-c-call,s-c-raw-call): Update.
3820 (s-boolifop,s-convop,s-if,s-cond): Update.
3821 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
3822 (-par-replace-set-dests,-par-replace-set-srcs): Update.
3823 (s-parallel,s-sequence): Update.
3824 (rtl-c-build-table): Update.
3825 * sem-frags.scm (-frag-hash-compute!): Update.
3826 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
3827 for temporary bug compatibility with previous version.
3828 (-frag-expr-locals,-frag-expr-stmts): Update.
3829 (-frag-compute-desired-frags,-frag-pick-best): Update.
3830 * semantics.scm (-simplify-expr-fn): Update.
3831 (rtx-simplify): Update.
3832 (-rtx-ref-type): Update. Account for modifiers.
3833 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
3834 (-build-ifield-operand!): Update.
3835 (-build-known-values): Update.
3836 (semantic-compile): Update.
3837 (-gen-reg-access-defns): Update.
3838 (gen-semantic-code,-gen-sem-case): Update.
3839 (-gen-sfrag-code,-gen-sfrag-case): Update.
3840 * sim-cpu (gen-semantic-code): Update.
3841 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
3842 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
3843 (-hw-cxmake-get): Update.
3844 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3845 (<hw-index>,cxmake-get): Update.
3846 (<operand>,gen-type,gen-read,cxmake-get): Update.
3847 (<operand>,gen-set-quiet,gen-set-trace): Update.
3848 (<pc>,cxmake-get): Update.
3849 (sim-finish!): Update.
3850 * utils-gen.scm (-gen-ifld-extract-base): Update.
3851 (-gen-ifld-extract-beyond): Update.
3852 (gen-multi-ifld-extract): Update.
3853 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
3854 * sid.scm (<hw-pc>,gen-write): Update.
3855 (-gen-decode-insn-globals): Update.
3856 (-hw-cxmake-get): Update.
3857 (<hw-register>,cxmake-get-raw): Update.
3858 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3859 (<hw-index>,cxmake-get): Update.
3860 (<operand>,gen-type,gen-read,cxmake-get): Update.
3861 (<operand>,gen-set-quiet,gen-set-trace): Update.
3862 (<pc>,cxmake-get): Update.
3863 (-create-virtual-insns!): Update.
3864 (-decode-split-build-assertion): Update.
3866 * simplify.inc: Update.
3868 1999-08-20 Doug Evans <devans@casey.cygnus.com>
3870 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
3871 Prefix queue function name with sim_ instead of @cpu@_.
3873 * sim.scm (-with-parallel-only?): New global.
3874 (option-init!): Initialize it.
3875 (option-set!): Set it.
3876 (with-parallel-only?): New proc.
3877 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
3878 and writeback markers if with-parallel-only.
3879 (-gen-idesc-init-fn): Update.
3880 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
3883 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
3885 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
3886 with the invalid insn handler.
3888 * utils.scm (list-maybe-ref): New proc.
3890 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
3892 (-mach-parse): Signal error if mach wasn't specified in define-arch.
3894 * i960.cpu (test*-*): Delete `expr' arg.
3895 (test-op,branch-op): Update.
3897 1999-08-09 Doug Evans <devans@casey.cygnus.com>
3899 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
3900 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
3902 (gen-reg-access-defn): Ditto.
3903 (-gen-hw-addr): Rewrite.
3904 (-op-gen-queued-write): Rewrite.
3905 * sim-cpu.scm (-gen-cpu-reg-access-decls):
3906 (-gen-scache-semantic-fn): Handle with-generic-write.
3907 (-gen-no-scache-semantic-fn): Ditto.
3909 1999-08-08 Doug Evans <devans@casey.cygnus.com>
3911 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
3913 * sim.scm (-with-generic-write?): New global.
3914 (option-init!): Initialize it.
3915 (option-set!): Set it.
3916 (with-generic-write?): New proc.
3917 (-gen-hw-addr): New proc.
3918 (-op-gen-queued-write): New proc.
3919 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
3921 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
3923 (-gen-sem-switch): Preserve existing with-parallel? value.
3924 (-gen-sem-parallel-switch): Ditto.
3925 (-gen-write-case): Add /indent support.
3926 (cgen-write.c): Rewrite.
3928 * utils.scm (-current-print-state): New global.
3929 (make-print-state): New proc.
3930 (pstate-indent,pstate-set-indent!): New procs.
3931 (pstate-cmd?,pstate-cmd-do): New procs.
3932 (/indent): New global.
3933 (/indent-set,/indent-add): New procs.
3934 (string-write): Set -current-print-state.
3935 (-string-write): New arg pstate, all callers updated.
3936 Handle print-state commands.
3937 (-string-list-flatten): New proc.
3938 (string-list->string): Use it.
3940 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
3941 (-gen-sem-fn-table-entry): New proc.
3942 (-gen-semantic-fn-table): New proc.
3943 (-gen-scache-semantic-fn): Make fn static.
3944 (-gen-no-scache-semantic-fn): Ditto.
3945 (cgen-semantics.c): Define macro SEM_FN_NAME.
3946 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
3947 FAST,FULL. Update @cpu@_insn_sem contents.
3948 (-gen-semf-fn-name): Delete.
3949 (-gen-sem-fn-decls): Delete.
3950 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
3951 @cpu@_semf_init_idesc_table.
3952 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
3954 (cgen-decode.h): Print sfmt enum.
3955 * sid-decode.scm (-gen-semf-fn-name): Delete.
3956 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
3958 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
3959 (ifmt-compute!): Ditto.
3960 * sim-decode.scm (-gen-decoder-switch): Ditto.
3961 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
3962 (-gen-decoder-switch): Ditto.
3964 * insn.scm (insn-virtual?): New proc.
3966 * enum.scm (gen-enum-decl): Speed up, build string as list and then
3968 * mach.scm (<arch>): attr-list is now a pair of lists.
3969 (current-attr-list): Rewrite.
3970 (current-attr-add!,current-attr-lookup): Rewrite.
3971 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
3973 1999-08-06 Richard Henderson <rth@cygnus.com>
3975 * ia64.cpu: Initial checkpoint.
3977 1999-08-06 Doug Evans <devans@casey.cygnus.com>
3979 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
3980 (pmacros-init!): Update .apply help string.
3982 1999-08-03 Doug Evans <devans@casey.cygnus.com>
3984 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
3985 (<hw-pc>,cxmake-skip): New method.
3986 (<pc>,cxmake-skip): New method.
3987 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
3988 (gen-argbuf-type): New member `skip_count'.
3989 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
3990 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
3992 * utils-sim.scm: New file.
3993 * dev.scm (load-sim): Load it.
3994 (load-sid): Load it.
3995 * cgen-sid.scm: Load it.
3996 * cgen-sim.scm: Load it.
3997 * iformat.scm (<sformat>): New member sbuf, not initialized by
3999 * rtx-funcs.scm (skip): Rewrite.
4000 * rtl-c.scm (skip): Rewrite.
4001 * m32r.cpu (sc,snc): Update `skip' usage.
4002 * mode.scm (mode-real-mode): New proc.
4003 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4004 Distinguish fragments by the <sformat-abuf> they use.
4005 * sim.scm (gen-profile-index-type): Delete.
4006 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4007 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4008 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4009 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4010 (-gen-argbuf-elm): Rewrite.
4011 (-gen-argbuf-hw-elm): Delete.
4012 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4014 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4015 (sim-init!): Initialize them.
4016 (sim-analyze-insns!): Set them.
4017 (current-sbuf-list): New proc.
4018 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4019 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4020 * sim-model.scm (-gen-model-insn-fn): Ditto.
4021 * sim-decode.scm (-gen-extract-decls): Delete.
4022 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4023 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4025 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4026 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4027 (-gen-op-extract,-gen-op-trace-extract): New procs.
4028 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4029 gen-sfmt-argvars-foo and rewrite.
4030 (-gen-record-args): Rewrite.
4031 (-gen-extract-case): Tweak.
4032 * sid.scm (gen-profile-index-type): Delete.
4033 (ifield argbuf support): Move to utils-sim.scm.
4034 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4035 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4036 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4037 (-sim-sformat-argbuf-list): New global.
4038 (sim-init!): Initialize it.
4039 (sim-analyze-insns!): Set it.
4040 (current-sbuf-list): New proc.
4041 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4042 (-gen-argbuf-hw-elm): Delete.
4043 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4045 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4046 (-gen-extract-decls): Delete.
4047 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4049 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4050 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4051 (-gen-op-extract,-gen-op-trace-extract): New procs.
4052 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4053 gen-sfmt-argvars-foo and rewrite.
4054 (-gen-record-args): Rewrite.
4055 (-gen-extract-case): Tweak.
4057 * cgen-gh.c (gh_putc,gh_puts): New functions.
4058 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4059 * cos.c (_object_print_elms,_object_print): Use them.
4060 * hob-sup.c (fastcall_print): Use them.
4061 * configure.in: Check for scm_gen_puts, scm_puts.
4062 * config.in: Rebuild.
4063 * configure: Rebuild.
4064 * aclocal.m4: Rebuild.
4065 * Makefile.in: Rebuild.
4067 * dev.scm (load-opc): Use load instead of maybe-load.
4068 (load-gtest,load-sim,load-stest): Ditto.
4071 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4073 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4074 up to avoid g++ 'goto crosses initialization' warning.
4075 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4076 (-gen-sfrag-case): Update use of NEXT_FRAG.
4078 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4080 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4082 * read.scm: Load sem-frags.scm.
4083 * sem-frags.scm (*): Lots rewritten.
4084 * sid.scm (-with-sem-frags?): New global
4085 (with-sem-frags?): New proc.
4086 (option-init!): Initialize -with-sem-frags?.
4087 (option-set!): Recognize with-sem-frags.
4088 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4089 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4091 (-gen-sfrag-engine-decls): New proc.
4092 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4093 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4094 (-gen-sfrag-engine): New proc.
4095 (-gen-sem-case): Emit setup-semantics if specified.
4096 (-gen-sem-switch-engine): Update init/use of computed goto label.
4097 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4099 (-gen-idesc-decls): Replace sem_address with cgoto.
4100 (-gen-scache-decls): Rewrite definition of `execute' member.
4101 * arm.cpu (arm isa): Enable decode-splits.
4102 * arm7.cpu (multiply insns): Rename result to mul-result.
4104 Rename decode-specialize to decode-split.
4105 * decode.scm (*): Update.
4106 * insn.scm (*): Update.
4107 * mach.scm (*): Update.
4108 * sid.scm (*): Update.
4110 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4112 Record objects as a smob.
4113 * cos.c (scm_tc16_object): New static global.
4114 (cos_init): Initialize it.
4115 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4116 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4117 (_object_tag): Delete.
4118 (_object_make_smob): New function.
4119 (_object_make_x,_object_make_with_values_x): Rewrite.
4120 (_object_elements,_object_class_desc): Rewrite.
4121 (_object_copy,object_p): Rewrite.
4122 (_object_specialize): Rewrite.
4123 (_object_print_elms,_object_print): New functions.
4124 (object_smob): New static global.
4125 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4127 * cos.c (_make_x_symbol): New static global.
4128 (object_make): Use it.
4129 (cos_init): Initialize it.
4131 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4133 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4134 instead to determine whether to use FLD macro.
4135 (<rtl-c-eval-state>): New member ifield-var?.
4136 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4137 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4138 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4140 * rtl.scm (rtx-sequence-assq-locals): New proc.
4142 * cos.scm (-object-error): Don't crash on non-objects.
4144 * Makefile.am (CLEANFILES): Add hobbit.
4145 * Makefile.in: Rebuild.
4147 * rtl-c.scm (s-c-call): Delete unnecessary code.
4149 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4151 * rtl-c.scm (ifield): Always reference value via `FLD'.
4153 * cos.c (elm_bound_p): Return problem SCM boolean values.
4155 * utils-cgen.scm (display-argv): New proc.
4156 * cgen-opc.scm (cgen): Call it.
4157 * cgen-sim.scm (cgen): Ditto.
4158 * cgen-gas.scm (cgen): Ditto.
4159 * cgen-stest.scm (cgen): Ditto.
4160 * cgen-sid.scm (cgen): Ditto.
4162 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4164 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4165 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4166 (-gen-extract-switch): Initialize result to 1.
4167 * opcodes.scm (gen-ifield-default-type): New proc.
4168 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4170 (<hw-index>,gen-insert): Handle non-ifield indices.
4171 (<hw-index>,gen-extract): Ditto.
4172 (<hw-asm>,gen-parse): Ditto.
4173 (<hw-asm>,gen-print): Ditto.
4174 (<keyword>,gen-parse): Ditto.
4175 (<keyword>,gen-print): Ditto.
4176 (<operand>,gen-fget): Ditto.
4177 (<operand>,gen-fset): Ditto.
4179 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4180 (-gen-hw-index): Ditto.
4181 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4182 (-gen-hw-index): Ditto.
4184 * sem-frags.scm: New file.
4186 * attr.scm (attr-parse): Add better checking of input.
4188 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4190 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4192 * ifield.scm (ifld-nil?): New proc.
4194 * operand.scm (<operand>): New members getter,setter.
4195 (<operand>,make!): New args getter,setter. All uses updated.
4196 (op:getter,op:setter): New procs.
4197 (<hw-index>,field-start): Return 0 for non-ifield indices.
4198 (<hw-index>,field-length): Return 0 for non-ifield indices.
4199 (-operand-parse-getter,-operand-parse-setter): New procs.
4200 (-operand-parse): New args getter,setter. All callers updated.
4201 Always use hw-index-scalar for scalar operands.
4202 (-operand-read): Handle getter,setter.
4203 (define-full-operand): New args getter,setter. All uses updated.
4204 * semantics.scm (-build-ifield-operand!): Update.
4205 (-build-index-of-operand!): Update.
4206 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4207 * simplify.inc (define-normal-operand): Update.
4209 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4210 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4211 (s-binop,s-cmpop,s-convop): Ditto.
4212 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4213 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4214 (fcc-tests): New insn-enum.
4215 (fcc-value): Rename from fcc-type.
4216 * sparcfpu.cpu: New file. All fp support moved here.
4218 * rtl.scm (<rtx-func>): New member class.
4219 (rtx-class-*?): New procs.
4220 (def-rtx-node): New arg class. All callers updated.
4221 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4222 * rtx-funcs.scm (*): Specify class.
4224 * utils-cgen.scm (context-make-reader): New proc.
4226 * utils.scm (assert-fail-msg): New variable.
4228 (list-drop,list-tail-drop): New procs.
4230 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4232 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4233 CGEN_MIN_INSN_SIZE deleted on March 22.
4235 * ifield.scm (<ifield>,needed-iflds): New method.
4236 (<multi-ifield>,needed-iflds): New method.
4237 (ifld-needed-iflds): New proc.
4238 (multi-ifield?): New proc.
4239 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4240 (-sfmt-search-key): Include insn length in key.
4241 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4242 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4243 (-ifmt-lookup-ifmt!): Compute key here.
4244 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4245 All callers updated.
4246 (ifmt-build): Delete arg desc. New args search-key,iflds.
4247 All callers updated.
4248 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4249 in-ops,out-ops,sorted-used-iflds. All callers updated.
4250 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4252 * operand.scm (op-iflds-used): New proc.
4253 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4255 And from sid.scm,sid-cpu.scm as well.
4256 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4257 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4258 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4259 (gen-extracted-ifld-value): Ditto.
4260 (-extract-chunk-specs): Ditto.
4261 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4262 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4263 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4264 (-extract-insert-subfields): New function.
4265 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4266 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4267 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4268 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4270 (-gen-no-scache-semantic-fn): Ditto.
4271 (-gen-sem-case): Ditto.
4272 (-gen-read-case): Update calls to gen-define-ifields,
4273 gen-extract-ifields.
4274 * sim-decode.scm (-gen-record-args): Update.
4275 (-gen-sfmt-argvars-assigns): Update.
4276 (-gen-extract-case): Update.
4277 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4278 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4280 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4281 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4282 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4283 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4284 gen-define-ifields, gen-extract-ifields.
4285 (-gen-record-args): Update.
4286 (gen-sfmt-argvars-assigns): Update.
4287 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4288 with gen-define-ifields. Ditto for gen-extract-foo.
4289 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4290 procs rather than method calls.
4292 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4294 * sid.scm (-create-virtual-insns!): New local `context', pass it
4297 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4298 (operand name) not (operand object), (local name) not (local object).
4299 (rtx-traverse-with-locals): New proc.
4300 (-compile-expr-fn): New proc.
4301 (rtx-compile): Rewrite.
4302 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4303 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4304 (rtl-c-set-trace): Ditto.
4305 (operand define-fn): Recognize operand name argument.
4306 (local define-fn): Recognize sequence temp name argument.
4307 * rtx-funcs.scm (operand): Argument is operand name, not object,
4308 so call current-op-lookup.
4309 (local): Similarily, so call rtx-temp-lookup.
4311 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4312 (rtx-operand?): Ditto.
4313 (rtx-pretty-name): Ditto.
4314 (rtx-local-obj): Flag symbol argument as an error.
4315 (rtx-local-name): New proc.
4316 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4318 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4320 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4323 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4326 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4327 (*floats-s->c-fun-table*): Ditto.
4328 * hobbit.c,hobbit.h: Rebuild.
4329 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4330 * semantics.scm (rtx-simplify): Use /fastcall-make.
4332 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4334 * insn.scm (<insn>): Delete members condition, compiled-condition.
4335 (<insn>,make!): Update
4336 (<insn> getters,setters): Update.
4337 (-insn-parse,insn-read,define-full-insn): Update.
4338 * minsn.scm (minsn-make-alias): Update.
4339 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4340 (ifmt-compute!): Ditto.
4341 * sim.scm (sim-finish!): Update.
4342 * simplify.inc: (define-normal-insn): Update.
4343 * sid-cpu.scm (gen-semantic-code): Update.
4345 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4346 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4347 (ifmt-compute!): Ditto.
4349 1999-06-16 Doug Evans <devans@casey.cygnus.com>
4351 * minsn.scm (minsn-compute-iflds): Print better error message for
4354 1999-06-12 Doug Evans <devans@casey.cygnus.com>
4356 * rtl.scm (tstate->estate): Don't copy over expr-fn.
4358 * Makefile.am (HOBFLAGS): New variable.
4359 (cgen-hob.c): Use it.
4361 (libcpu_a_SOURCES): Add hob-sup.c.
4362 (hob-sup.o): New rule.
4363 * Makefile.in: Rebuild.
4364 * cgen.c: #include hob-sup.h.
4365 (cgen_init_c): Call hobbit_init_support.
4366 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4367 (*special-scm->c-functions*): Add them.
4368 (display-c-expression): Handle *c-symbol*.
4369 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4370 (*floats-s->c-fun-table*): Ditto.
4371 (normalize): Recognize /fastcall-make.
4372 (normalize-fastcall-make): New proc.
4373 * hobbit.c,hobbit.h: Rebuild.
4374 * hob-sup.scm: New file.
4375 * hob-sup.c: New file.
4376 * hob-sup.h: New file.
4377 * read.scm: Load hob-sup.scm.
4378 * rtl.scm (-rtx-name-list): New variable.
4379 (rtx-name-list): New proc.
4380 (rtx-lookup): Try symbol first.
4381 (def-rtx-node): Add name to -rtx-name-list.
4382 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4383 (-rtx-traverse-anymode): New proc.
4384 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4385 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4386 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4387 (-rtx-traverse-{symornum,object}): New procs.
4388 (-rtx-make-traverse-table): Rewrite.
4389 (-rtx-traverse-operands): Rewrite arg-types handling.
4390 Handle #f result of traverser.
4391 (-rtx-traverse): Renamed from -rtx-traverse-normal.
4392 Move debug handling here.
4393 (-rtx-traverse-debug): Delete.
4394 (rtl-finish!): Change -rtx-traverse-table into list of handlers
4396 * semantics.scm (semantic-compile:process-expr!): Fix call to
4398 * utils.scm (map1-improper): New proc.
4400 1999-06-08 Doug Evans <devans@casey.cygnus.com>
4402 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4404 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4405 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4406 (<operand>,cxmake-get): Tweak.
4407 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
4409 1999-06-07 Doug Evans <devans@casey.cygnus.com>
4411 * thumb.cpu (dnti): Delete timing spec.
4414 * arm.cpu (arm isa): New fields condition, setup-semantics.
4415 (thumb isa): New field setup-semantics.
4416 (h-gr): Add attribute CACHE-ADDR.
4417 * arm7.cpu (dnai): Delete condition.
4418 (eval-cond): Delete.
4420 * mach.scm (<isa>): New member setup-semantics.
4421 (-isa-parse-setup-semantics): New proc.
4422 (-isa-parse): New arg setup-semantics.
4423 (-isa-read): Recognize setup-semantics.
4425 * sid-cpu.scm (gen-extract-fields): Split into two:
4426 gen-extract-ifields, gen-extract-ifmt-ifields.
4427 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
4428 tracing begin/end messages (done by caller now).
4429 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
4430 tracing begin/end messages (done by x-before,x-after virtual insns).
4431 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
4432 end so don't have to look it up again next time.
4433 * sid-decode.scm (-decode-expr-ifield-values): New proc.
4434 (-decode-expr-ifield-tracking-key): New proc.
4435 (-decode-expr-ifield-tracking): New proc.
4436 (-decode-expr-ifield-values-used): New proc.
4437 (-decode-expr-ifield-mark-used!): New proc.
4438 (-gen-decode-expr-set-itype): New proc.
4439 (-gen-decode-expr-entry): Rewrite.
4440 (-gen-decode-table-entry): New proc.
4441 (-gen-decoder-switch): Use it.
4442 (-gen-virtual-insn-finder): New proc.
4443 (-gen-argbuf-elm): Move here from sid.scm.
4444 (-gen-argbuf-hw-elm): Ditto.
4445 (-gen-argbuf-fields-union): Add entries for chain,before insns.
4446 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4447 conditional-execution isas.
4448 (-gen-decode-fn): Record conditional-exec ifield.
4449 * sid.scm (-current-pbb-engine?): New global.
4450 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4451 (<ifield>,gen-ifld-extract): New arg `indent'.
4452 (<multi-ifield>,gen-ifld-extract): Ditto.
4453 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
4454 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4455 (-gen-arch-model-decls): Only scan real insns.
4456 (scache-engine-insns,pbb-engine-insns): New procs.
4457 (-create-virtual-insns!): New proc.
4458 (sim-finish!): Call it.
4459 (-decode-specialize-insn?): New proc.
4460 (-decode-specialize-build-assertion): New proc.
4461 (-decode-specialize-insn-1): New proc.
4462 (-decode-specialize-insn): New proc.
4463 (-fill-sim-insn-list!): New proc.
4464 (sim-analyze!): Create copies of insns to be specialized.
4465 * utils-cgen.scm (obj-set-name!): New proc.
4467 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4468 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4470 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
4472 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4473 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4474 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4475 (attr): Rewrite test for insn owner.
4476 (member): New rtx function.
4477 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4478 as separate function.
4479 (rtx-ifield?,rtx-ifield-name): New procs.
4480 (rtx-operand-obj): Rewrite.
4481 (rtx-operand-name): New proc.
4482 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4483 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4484 (tstate-make): New args owner, known. All callers updated.
4485 (tstate-known-lookup): New proc.
4486 (rtx-traverse): New arg owner. All callers updated.
4487 (rtx-make-bool): New proc.
4488 (rtl-find-ifields): Rewrite.
4489 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4490 * semantics.scm: ... here.
4491 (rtx-const-equal,rtx-const-list-equal): New procs.
4492 (-build-known-values): New proc.
4493 (semantic-compile): New arg `insn'. Call rtx-simplify.
4494 (semantic-attrs): Ditto.
4495 * rtx-funcs.scm (member,number-list): New rtx functions.
4497 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4498 Rewrite. Delete arg `all-attrs'. All callers updated.
4499 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
4501 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4503 * decode.scm (subdtable-add): Handle `expr' entries.
4504 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
4505 (exprtable-entry-*): Update.
4506 (exprtable-entry-iflds): New proc.
4507 (exprentry-cost): New proc.
4508 (exprtable-sort,-gen-exprtable-name): New procs.
4509 (exprtable-make): New arg `name'. All callers updated. use vector.
4510 (exprtable-*): Update.
4511 (-build-decode-table-entry): Don't issue collision warning if all are
4512 specialized insns. Sort exprtable entries before building table.
4514 * read.scm (-reader-process-expanded-1): Move pretty printing of
4515 input to logging level 4.
4517 * utils.scm (string-list->string): New proc.
4519 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4521 (insn-read): Delete leading '-' in name. All callers updated.
4522 (real-insn?): New proc.
4523 (real-insns): Rewrite.
4524 (insn-has-ifield?): New proc.
4525 (insn-builtin!): Create insn attribute SPECIALIZED.
4527 * mach.scm (<arch>): Delete member app-data.
4528 (current-raw-insn-list): New proc.
4529 (insn-list-car,insn-list-splice!): New procs.
4530 (<decode-specialize>): New class.
4531 (-isa-parse-decode-specialize): New proc.
4532 (-isa-parse-decode-specializes): New proc.
4533 (<isa>): New members `condition', `decode-specializes'.
4534 (-isa-parse-condition): New proc.
4535 (-isa-parse): New args condition, decode-specializes.
4536 (-isa-read): Recognize condition, decode-specializes.
4537 (-isa-add-decode-specialize!): New proc.
4538 (modify-isa): New proc.
4539 (isa-conditional-exec?,state-conditional-exec?): New procs.
4540 (arch-init!): New reader command `modify-isa'.
4542 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4543 (mode-signed,mode-unsigned?): New procs.
4545 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
4547 * types.scm (<array>): New method get-shape.
4548 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4550 (hw-shape,hw-num-elms): New procs.
4551 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4552 if there's more than 255 registers.
4553 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4555 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4558 1999-05-21 Doug Evans <devans@casey.cygnus.com>
4560 * cgen-sid.scm (sim-arguments): Add -X.
4561 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4562 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4563 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
4564 Simplify by supporting pbb engine only.
4565 (-gen-sem-switch-init): New proc.
4566 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4567 (cgen-sem-switch.cxx): New proc.
4568 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4569 with with-pbb?. Support dual scache/pbb engines.
4570 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4571 Support dual scache/pbb engines.
4572 (cgen-decode.h): Generate semantic fn decls if with-scache?.
4573 * sid.scm (*) with-pbb? replaces with-sem-switch?.
4574 (sim-finish!): Create pbb support virtual insns if with-pbb?.
4576 1999-05-10 Ben Elliston <bje@cygnus.com>
4578 * arm7.cpu: Remove coprocessor related fields, operands and insn
4579 definitions for now. Take the undefined instruction trap instead.
4580 (ldmda-wb): New instruction.
4581 (ldmib-wb): Likewise.
4582 (ldmdb-wb): Likewise.
4583 (stmdb-wb): Likewise.
4584 (stmib-wb): Likewise.
4585 (stmda-wb): Likewise.
4587 1999-05-08 Doug Evans <devans@casey.cygnus.com>
4589 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4590 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4592 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4593 hobbit can't handle optional third arg.
4595 1999-05-07 Doug Evans <devans@casey.cygnus.com>
4597 * arm.cpu (h-tbit): Delete set spec.
4598 (h-mbits): Don't call arm_mbits_set in set spec.
4599 * arm.sim: New file.
4600 * hardware.scm (modify-hardware): New proc.
4601 (hardware-init!): Add modify-hardware command.
4602 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4603 (-hw-gen-set-quiet): Ditto.
4604 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
4605 hardware attribute. Load $arch.sim file if present.
4606 * utils-cgen.scm (keyword-list?): New proc.
4607 (keyword-list->arg-list,arg-list-validate-name): New procs.
4608 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4610 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4612 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4615 * attr.scm (obj-prepend-atlist!): New proc.
4617 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4619 * sid.scm (<operand>,profilable?): Use op:type.
4620 * sim.scm (<operand>,profilable?): Use op:type.
4622 1999-05-04 Doug Evans <devans@casey.cygnus.com>
4624 * utils.scm (find-index,find): Be more stack friendly.
4626 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4629 1999-05-01 Doug Evans <devans@casey.cygnus.com>
4631 * arm.cpu (h-gr-usr): New hardware element.
4632 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4633 (arm-mode): New keyword.
4634 (h-mbits): Add set spec.
4635 (h-spsr): Implement get/set specs.
4637 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4638 (-reader-process-expanded-1): Pretty print logging output.
4640 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4641 (cgen-cpu.h): Print enums before hardware elements.
4642 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4643 * sid-decode.scm (cgen-decode.cxx): Ditto.
4644 * sid-model.scm (cgen-model.cxx): Ditto.
4646 * utils-cgen.scm (context-error): Accept variable number of
4649 * rtx-funcs.scm (error:): New rtx function.
4650 * rtl-c.scm (s-case-vm): New proc.
4651 (-gen-non-vm-case-get,s-case-non-vm): New procs.
4652 (s-case): Simplify, handle non-VM result.
4653 (error:): New rtx function.
4655 1999-04-30 Doug Evans <devans@casey.cygnus.com>
4657 * arm.cpu (h-pc): Add set spec to zero bottom bits.
4658 (test-hi,test-ls): Fix cbit handling.
4659 (shift-type,h-operand2-shifttype): Move here ...
4660 * arm7.cpu: ... from here.
4661 (set-cond,set-cond-maybe,dnix): Delete, unused.
4662 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4663 * arm.cpu: ... to here.
4664 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4665 (alu-cmn): Use set-add-flags.
4666 (alu-tst): Use set-zn-flags.
4667 (alu-cmp): Use set-sub-flags.
4668 (lsl,lsr,asr): Set condition codes.
4669 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4670 (alu-op): Split into three: alu-logical-op,alu-arith-op,
4672 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4673 All callers updated.
4674 (sub-sp): Rename from add-sp-neg.
4675 (f-lbwl-offset): Delete.
4676 (f-lbwl-hi,f-lbwl-lo): New ifields.
4677 (lbwl-hi,lbwl-lo): Update.
4678 (bl-hi): Add 4 to pc.
4679 (push-reg,pop-reg): Simplify.
4680 (push,push-lr): Push registers in correct order.
4681 (pop,pop-pc): Pop registers in correct order.
4682 (save-reg-inc,load-reg-inc): Simplify.
4683 (ldmia): Save registers in correct order.
4685 1999-04-30 Ben Elliston <bje@cygnus.com>
4687 * arm7.cpu (f-op-hdt): Remove; unused.
4688 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4689 (f-ror-imm8): New multi-ifield.
4690 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4692 (f-uimm12): New field.
4693 (ror-imm8): New operand.
4695 (hdt-offset8): Reinstate operand.
4696 (offset4-hi,offset4-lo): Remove.
4697 (set-cond): Remove macro; unused.
4698 (set-cond-maybe): Likewise.
4699 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4700 (store-word/byte): Likewise.
4701 (load-halfword): Use hdt-offset8 multifield operand instead of two
4702 4-bit operands that are explicitly combined by semantic code.
4703 (do-halfword-store): Bug fix. Set address when not preindexing.
4704 (store-halfword): Also use hdt-offset8 operand.
4705 (arith-op): Avoid clobbering source registers when one of them is
4706 the destination register.
4707 (arith-imm-op): Likewise.
4708 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4709 (teq-imm): Likewise.
4710 (ldm-p): Rename to ldmdb.
4711 (stm-pw): Rename to stmdb-wb.
4712 (multi-action): New macro; test reg-list bits and execute a
4713 semantic fn if the bit is set.
4714 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4715 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4716 (all insns): Use dnai entries for simplicity rather than dni.
4717 (*): Use short-form of (const ..).
4719 1999-04-29 Doug Evans <devans@casey.cygnus.com>
4721 * rtl.scm (<rtx-func>): Rename member type to style. Rename
4722 member eval to evaluator.
4723 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
4724 (tstate-make): Delete arg op-fn. All callers updated.
4725 (tstate-op-fn,tstate-set-op-fn!): Delete.
4726 (rtx-traverse): Delete op-fn arg. All callers updated.
4727 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4728 split out of -simplify-for-compilation.
4730 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4731 (cgen_DEPENDENCIES): Add stamp-cgen.
4732 (stamp-cgen): New rule.
4733 * Makefile.in: Rebuild.
4735 * rtl-c.scm (enum:): Define emitter for.
4736 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4738 (rtx-constant-value,rtx-enum-value): New procs.
4739 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4740 (rtx-compile-time-constant?): Return #t for enums.
4741 (rtx-true?,rtx-false?): Handle enums.
4742 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4743 building result by hand.
4744 (rtx-simplify-eq-attr-insn): Ditto.
4745 * rtx-funcs.scm (enum:,enum): New rtx functions.
4747 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4749 (arch-analyze-insns!): New proc.
4750 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4751 of calling ifmt-compute! directly.
4752 * sid.scm (-sim-insns-analyzed?): Delete.
4753 (sim-analyze!): Call arch-analyze-insns! instead of calling
4754 ifmt-compute! directly.
4755 * sim.scm (-sim-insns-analyzed?): Delete.
4756 (sim-analyze!): Call arch-analyze-insns! instead of calling
4757 ifmt-compute! directly.
4759 * utils.scm (string-take-with-filler): New proc.
4760 (string-take): Use it.
4762 * pgmr-tools.scm: New file.
4763 * read.scm: Load it.
4764 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4766 * insn.scm (insn-base-mask): Renamed from insn:mask.
4767 All callers updated.
4768 (insn-base-mask-length): Renamed from insn:mask-length.
4769 All callers updated.
4770 (insn-foo): Renamed from insn:foo. All callers updated.
4771 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
4772 * iformat.scm (compute-insn-base-mask-length): Renamed from
4773 compute-insn-mask-length. All callers updated.
4774 (compute-insn-base-mask): Renamed from compute-insn-mask.
4775 All callers updated.
4777 * enum.scm (-enum-parse-prefix): New proc.
4778 (<enum>,make!): Don't parse enum values here.
4779 (-enum-parse): Do it here. Call -enum-parse-prefix.
4780 (define-full-insn-enum): Ditto.
4781 (enum-vals-upcase): New proc.
4782 * hardware.scm (define-keyword): Make enum prefix uppercase.
4783 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
4785 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
4786 (<ifield>,field-extract): New method.
4787 (<multi-ifield>,field-extract): New method.
4788 (ifld-extract): New proc.
4789 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
4790 (ifld-extract-fn-name): Renamed from ifld-extract.
4792 * ifield.scm (ifld-new-value): Renamed from ifield-make.
4793 All callers updated.
4795 * ifield.scm (ifld-lsb0?): New proc.
4796 (sort-ifield-list): New arg up?. All callers updated.
4797 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
4798 rather than global state.
4800 1999-04-27 Doug Evans <devans@casey.cygnus.com>
4802 * insn.scm (pretty-print-insn-format): New proc.
4804 * Makefile.in: Rebuild.
4805 * aclocal.m4: Rebuild
4806 * configure: Rebuild.
4808 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
4810 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
4811 * configure: Rebuild.
4812 * aclocal.m4: Rebuild.
4813 * Makefile.in: Rebuild.
4814 * doc/Makefile.in: Rebuild.
4815 * doc/version.texi: Rebuild.
4817 1999-04-25 Doug Evans <devans@casey.cygnus.com>
4819 * utils.scm (bits->bools): New proc.
4821 1999-04-23 Doug Evans <devans@casey.cygnus.com>
4823 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
4824 subfield's gen-ifld-extract-decl method.
4826 1999-04-23 Ben Elliston <bje@cygnus.com>
4828 * arm7.cpu (ldrsh-pu): Remove.
4829 (do-halfword-load): New pmacro.
4830 (load-halfword): Likewise.
4831 (do-halfword-store): Likewise.
4832 (store-halfword): Likewise.
4833 (strh-*): New instructions.
4834 (ldrsb-*): Likewise.
4836 (ldrsh-*): Likewise.
4838 1999-04-22 Doug Evans <devans@casey.cygnus.com>
4840 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
4843 * arm7.cpu (do-word/byte-store): Fix typo.
4845 1999-04-22 Ben Elliston <bje@cygnus.com>
4847 * arm7.cpu (do-word/byte-load): Handle cases where the destination
4848 register is the program counter (R15).
4850 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
4851 (str-*): Implement using store-word-byte. Remove older versions.
4852 (bic): Use the `inv' rtx for obtaining bitwise complements.
4853 (bic-imm): Likewise.
4855 (mvn-imm): Likewise.
4856 (store-indev-reg): Remove crufty pmacro.
4857 (load-indiv-reg): Likewise.
4858 (ldm-p): Reverse the order of register processing for decrement.
4860 (stbi): Remove; handled by the str-* insns.
4862 1999-04-21 Doug Evans <devans@casey.cygnus.com>
4864 * thumb.cpu (cmp): Fix carry bit computation.
4867 1999-04-20 Doug Evans <devans@casey.cygnus.com>
4869 * arm.cpu (h-tbit): Specify set spec.
4871 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
4872 (set-sub-flags): Interpret "carry bit" as a borrow.
4873 (all sub/cmp insns): Carry bit is actually a borrow bit.
4874 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
4875 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
4877 (hireg-add,hireg-cmp,hireg-move): Ditto.
4879 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
4880 (-CGEN-LANG-VERSION): Ditto.
4882 1999-04-18 Doug Evans <devans@casey.cygnus.com>
4884 * pmacros.scm (-pmacro-make): New arg `default-values',
4885 all callers updated.
4886 (-pmacro-default-values): New proc.
4887 (-pmacro-process-keyworded-args): New proc.
4888 (-pmacro-process-args): New proc.
4889 (-pmacro-invoke): Process arguments before expanding macro.
4890 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
4891 (define-pmacro): Handle default values specified in arg list.
4892 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
4893 (rtx-boolif-op-arg[01]): New procs.
4894 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
4895 (rtx-simplify): Handle not,orif,andif.
4896 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
4897 * utils.scm (alist-copy): New proc.
4898 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
4900 (swi): Explicitly set pc.
4902 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
4904 1999-04-17 Ben Elliston <bje@cygnus.com>
4906 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
4907 correctly adjusts the program counter now.
4909 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
4910 (f-signed?): Rename from `f-hdt-signed?'.
4911 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
4912 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
4913 (f-hdt-offset8): Use new field names.
4914 (ldr): Use `imm12' field, not `offset12', since we do our own
4916 (str, str-*): Likewise.
4917 (ldu-*): Remove most; better not implemented than broken.
4919 (ldrsh-pu): New insn.
4923 (ldm-p): Likewise; replace (load-indiv-reg) version.
4925 1999-04-15 Doug Evans <devans@casey.cygnus.com>
4927 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
4928 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
4929 (*): Explicitly specify mode in c-call.
4930 (logical-op): Recognize sets of h-gr[15] as sets of pc.
4932 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
4933 (arith-imm-op): New pmacro.
4934 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
4935 * thumb.cpu (bx-rs,bx-hs): Rewrite.
4937 1999-04-14 Doug Evans <devans@casey.cygnus.com>
4939 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
4941 * rtl.scm (rtl-find-ifields): Implement.
4943 * utils-gen.scm: New file.
4944 * read.scm: Load it.
4945 * desc.scm: Move generic attribute code to utils-gen.scm.
4946 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
4947 * Makefile.in: Rebuild.
4949 * arm7.cpu (R15-OFFSET): New attribute.
4951 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
4952 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
4953 for reg-shift version.
4955 (data processing insns): Reorganize. Use dnai.
4957 * attr.scm (attr-kind): New proc.
4958 (attr-list-enum-list): Rewrite.
4959 (-attr-sort): Split result into two lists, bools and non-bools.
4960 (current-attr-list-for): Update.
4962 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
4963 * sid-cpu.scm (-gen-attr-decls): New proc.
4964 (-gen-insn-attr-decls): New proc.
4965 (cgen-desc.h): New proc.
4966 (cgen-cpu.h): Put everything in @cpu@ namespace.
4967 (gen-parallel-exec-type): Change prefix of parexec struct from
4969 (-gen-trace-record-type): Ditto for trace_record struct.
4970 (-gen-write-case): Update.
4971 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
4972 @prefix@. Update scache struct references.
4973 (-gen-sem-case): Update scache struct references.
4974 (-gen-sem-switch-fn): Update idesc struct reference.
4975 Update insn_type enum reference.
4976 (cgen-write.cxx): Update scache,argbuf references.
4977 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
4978 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
4979 from @cpu@ to @prefix@.
4980 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
4981 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
4982 from @CPU@ to @PREFIX@.
4983 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
4984 from @CPU@ to @PREFIX@.
4985 (-gen-decode-insn-globals): Generate insn attributes.
4986 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
4987 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
4988 semantic fn typedef.
4989 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
4990 Change prefix of scache struct from @cpu@ to @prefix@.
4991 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
4992 Change prefix of idesc struct from @cpu@ to @prefix@.
4993 Change prefix of insn_type enum from @cpu@ to @prefix@.
4994 (-gen-argbuf-fields-union): Change prefix of sem_fields union
4995 from @cpu@ to @prefix@.
4996 (-gen-scache-decls): Change prefix of scache struct from
4997 @cpu@ to @prefix@. Update idesc struct name.
4998 Update decode,execute methods.
4999 (-gen-extract-case): Update to type name changes.
5000 (-gen-decode-fn): Ditto.
5001 (cgen-decode.h): Put everything in @cpu@ namespace (except
5002 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5003 (cgen-decode.cxx): Add using namespace @cpu@.
5004 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5005 model_mark_get/set from @cpu@ to @prefix@.
5006 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5008 (gen-model-fn-decls): Update idesc struct name. Change prefix
5009 of model_insn_before/after from @cpu@ to @prefix@.
5010 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5011 Update insn_word type name.
5012 (-gen-model-timing-table): Update INSN_TIMING struct name.
5013 (-gen-model-init-fn): Update MODEL_DATA struct name.
5014 (-gen-mach-defns): Update name of init_idesc_table fn.
5015 (cgen-model.cxx): Add using namespace @cpu@.
5016 * sid.scm (gen-cpu-class): Delete.
5017 (gen-attr-type): New proc.
5018 (gen-obj-attr-sid-defn): New proc.
5019 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5020 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5022 (gen-cpu-insn-enum): Update name of insn enum.
5023 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5025 (swi): Rename @cpu@_swi to @prefix@_swi.
5027 * decode.scm (-build-decode-table-entry): Remove heuristic for
5028 distinguishing insns, and use insn ifield-assertion specs.
5030 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5031 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5032 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5033 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5034 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5035 all callers updated.
5036 (gen-attr-name): New proc
5037 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5038 (gen-obj-attr-defn): Delete num_nonbools count.
5040 * iformat.scm (ifmt-analyze): Handle insn-condition.
5041 (ifmt-compute!): Ditto.
5042 * insn.scm (<insn>): Specify default value for condition,
5043 post-cond-trap,compiled-condition,compiled-semantics.
5044 (<insn>,make!): New arg condition.
5045 (<insn>): Add getters for condition,compiled-condition.
5046 (-insn-parse): New arg condition, all callers updated.
5047 (-insn-read): Recognize condition spec.
5048 (define-full-insn): New arg condition.
5049 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5050 * semantics.scm (semantic-compile): Change arg sem-code to
5052 (semantic-attrs): Ditto.
5053 * sim.scm (sim-finish!): Update calls to define-full-insn.
5054 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5055 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5056 * sid.scm (sim-finish!): Update call to define-full-insn.
5058 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5060 * Makefile.am (sim-cpu): Allow specification of ISA.
5061 * Makefile.in: Rebuild.
5063 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5065 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5067 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5069 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5071 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5073 * attr.scm (atlist?): New proc.
5074 (-attr-eval): Rewrite.
5075 (attr-parse): New proc.
5076 (atlist-parse): Use it.
5078 * decode.scm (exprtable-entry-make): New proc.
5079 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5080 (exprtable-make,exprtable-insns): New procs.
5082 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5084 (hardware-builtin!): Make h-memory a vector.
5086 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5087 All callers updated.
5088 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5090 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5092 (-insn-parse): Set semantics to #f if not specified.
5093 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5095 (-parse-insn-format): Recognize `=' iformat spec.
5097 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5098 (isa-max-insn-bitsize): Ditto.
5100 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5102 (<ifield>,gen-extract): Ditto.
5103 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5104 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5105 (gen-define-ifmt-ifields): New proc.
5106 (gen-semantic-code): Rewrite.
5107 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5108 (-gen-decoder-switch): Handle expression tables.
5109 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5111 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5112 instead of gen-define-fields.
5113 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5115 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5116 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5117 (-gen-ifld-extract-beyond): Ditto.
5118 (<multi-ifield>,gen-ifld-extract): 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
5125 * sim-cpu.scm (gen-semantic-code): Rewrite.
5126 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5128 (-gen-ifld-extract-beyond): Ditto.
5129 (<multi-ifield>,gen-ifld-extract): Ditto.
5130 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5131 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5132 rtl evaluation code.
5133 (op:read): Build an <eval-state> to pass to gen-read.
5134 (op:write): Build an <eval-state> to pass to gen-write.
5135 (op:record-profile): Build an <eval-state> to pass to
5138 * operand.scm (<operand>): Give `selector' default value of #f.
5139 Give `num' default value of -1. Give `cond?' default value of #f.
5140 (op:new-mode): Delete arg `set?', all uses updated.
5142 * read.scm (reader-error): Handle #f return from port-filename.
5143 (-init-parse-cpu!): Call rtl-c-init!.
5144 (reader-install-builtin!): Call rtl-builtin!.
5146 * rtl-c.scm: New file.
5147 * semantics.scm: New file.
5148 * read.scm: Load them.
5149 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5151 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5153 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5154 (-rtx-num-text,-rtx-max-num): New globals.
5155 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5156 (-rtx-macro-lookup): New proc.
5157 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5158 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5159 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5160 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5161 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5162 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5163 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5164 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5165 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5166 (rtx-pretty-name): New proc.
5167 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5168 (rtx-traverse-*): Rewrite rtx traversing.
5169 (rtx-eval-*): Rewrite rtx evaluation.
5170 (rtx-compile): New proc.
5171 (rtx-simplify): New proc.
5172 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5173 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5174 (ifield,index-of): Rewrite.
5175 (name): Renamed from `operand:'.
5176 (operand,xop,local): New rtx's.
5177 (current-insn): Rewrite.
5178 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5179 (cgen-hob.h): Remove rule for.
5180 (cgen-hob.o): Depend on cgen-hob.c only.
5181 * Makefile.in: Rebuild.
5183 * utils-cgen.scm (vmake): New proc.
5184 (<context>): New class.
5185 (context-make-prefix,context-error): New procs.
5187 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5189 * i960.cpu: Add some ??? comments.
5190 (xnor, ornot): New instructions.
5191 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5193 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5195 * cos.scm (-object-error): Print better error message.
5197 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5198 (-pmacro-env-ref): Renamed from -env-ref.
5200 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5202 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5204 (hardware-builtin!): Delete h-pc builtin.
5205 * arm.cpu (h-pc): Define.
5206 (h-gr): Delete get,set specs. Make array of 16 regs again.
5207 * arm7.cpu (set-logical-cc-maybe): Delete.
5208 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5209 (data processing insns): Rewrite.
5210 * m32r.cpu (h-pc): Define.
5211 * fr30.cpu (h-pc): Define.
5212 * i960.cpu (h-pc): Define.
5213 * sparc.cpu (h-pc): Define.
5215 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5216 (s-parallel): Replace do {...} while (0) with {...}.
5217 (s-sequence): Ditto.
5219 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5221 (-gen-write-case,-gen-sem-case): Ditto.
5222 (-gen-sem-case): Only specify `written' if profiling or
5223 parallel-write-back.
5224 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5225 (-gen-sem-switch-fn): New proc.
5226 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5227 based on with-sem-switch option.
5228 * sid-decode.scm (-gen-decode-insn-globals): Only define
5229 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5230 addresses in idesc_table if !with-sem-switch.
5231 (-gen-sem-fn-decls): Rewrite.
5232 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5233 member based on with-sem-switch. Only define
5234 `idesc_table_initialized_p' member if with-sem-switch.
5235 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5236 * sid.scm (-with-sem-switch?): New variable.
5237 (option-init!): Initialize it.
5238 (option-set!): Set it.
5239 (with-sem-switch?): New proc.
5240 (-op-gen-set-trace): Only emit `written' reference if profiling.
5241 (sim-finish!): Use h_pc_set to set pc.
5243 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5245 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5246 All callers updated.
5247 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5249 * sid.scm (gen-argbuf-type): Delete.
5250 (-gen-argbuf-fields-union): Move to ...
5251 * sid-decode.scm: ... here.
5253 * read.scm (-reader-process-expanded-1): New proc.
5254 (-reader-process-expanded): Call it to catch nested begin's.
5255 (reader-process): Move `begin' handling to -reader-process-expanded.
5257 * insn.scm (-insn-read): Fix name of `format' spec.
5259 * pmacros.scm (.pmacro): New builtin.
5260 (scan-symbol): If procedure macro, return macro rather than its symbol.
5261 (check-macro): Don't do lookup, instead check if (car expr) is
5263 (scan-list): Handle .pmacro.
5264 (scan): No longer re-examine text for another macro invocation.
5265 (-pmacro-build-lambda): New proc.
5266 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5267 another, fetch the other's value (rather than doing it during
5270 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5272 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5273 * Makefile.in: Rebuild.
5275 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5276 (-fill-slot!): Simplify.
5277 (-build-slots): Simplify.
5279 * dev.scm (load-sid): Don't load sid-arch.scm.
5281 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5283 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5286 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5288 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5289 * decode.scm: ... here. New file.
5290 * sid-decode.scm: Use decoder computation code in decode.scm.
5291 * read.scm: Load decode.scm.
5293 * arm.cpu (arm710 model): Add u-exec function unit.
5294 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5295 Add get/set specs to redirect reg 15 to h-pc.
5296 (h-*): Indicate for both ARM and THUMB isas.
5297 (cbit,nbit,vbit,zbit): Ditto.
5298 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5299 (h-cpsr): Make virtual. Add get/set specs.
5300 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5301 (h-spsr): New virtual reg.
5302 * arm7.cpu (shift-type): New explicitly defined keyword.
5303 (h-operand2-shifttype): Use it.
5304 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5305 All callers updated. Don't set cbit.
5306 (logical-op): Add rm to ifield list. Change case to case:. Use
5307 shift-type enum as case choices. Set cbit.
5308 (and,orr,eor,add-imm): Uncomment out.
5309 (undefined): Temporarily comment out.
5310 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5311 (lda-pc,lda-sp): Ditto.
5312 (ldr-pc): Rename from ldr.
5313 (cbranch): Mark insns as being thumb insns.
5315 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5317 * cgen-sid.scm: Don't load sid-arch.scm.
5318 (sim-arguments): Delete unused entries.
5319 * sid-arch.scm: Delete.
5321 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5322 (<insn>,ifld-assertions): New member.
5323 (<insn>,make!): New arg ifld-assertions, all callers updated.
5324 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5325 (insn:fields): Delete.
5326 (-insn-parse): New arg ifld-assertions. All callers updated.
5327 (-insn-read,define-insn): New procs.
5328 (define-full-insn): New arg ifld-assertions. All callers updated.
5329 (insn-init!): New comment define-insn.
5331 * model.scm (-model-parse): Ensure at least one unit specified.
5333 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5334 (<c-expr-temp>,get-name): New method.
5335 (-rtx-make-current-closure,s-closure): New proc.
5336 (hw:): Wrap rtx indices in a closure.
5337 (-gen-case-prefix): New proc.
5339 * rtx-funcs.scm (case:): Fix call to s-case.
5340 (closure): New rtx func.
5342 * hardware.scm (<hardware-base>): New member isas-cache.
5343 (<hardware-base>,get-isas): New method.
5344 (hardware-builtin): Indicate for all isas.
5345 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5346 * mach.scm (current-arch-mach-name-list): Return list of names.
5347 (current-isa-mach-name-list): Ditto.
5348 (define-arch): Install builtin objects here.
5349 * read.scm (keep-atlist?): Only keep if both mach and isa are
5351 (keep-mach-atlist?): New proc.
5352 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5353 (reader-install-builtin!): Renamed from -install-builtin!.
5354 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5355 -gen-cpu-reg-access-defns. Rewrite.
5356 (gen-reg-access-defn): Delete.
5357 (-gen-hardware-struct): New proc.
5358 (-gen-hardware-types): Simplify. Add multiple-isa support.
5359 (gen-semantic-fn,-gen-all-semantics): Delete.
5360 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5361 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5362 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5363 Call sem-analyze-insns!.
5364 (cgen-semantics.cxx): Add multiple-isa support.
5365 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5366 (-gen-scache-decls,-gen-decode-fn): Ditto.
5367 (cgen-decode.h): Call sem-analyze-insns!.
5368 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5369 * sid.scm (-with-multiple-isa?): New variable.
5370 (option-init!): Initialize it.
5371 (option-set!): Set it.
5372 (with-multiple-isa?): New proc.
5373 (gen-cpu-ref): New arg isas. All callers updated.
5374 (gen-cpu-class): New proc.
5375 (*-get-macro,*-set-macro): Delete.
5376 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5377 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5378 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5379 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5380 (-sim-insns-analyzed): New global variable.
5381 (sim-init!): Reset it.
5382 (sim-analyze-insns!): New proc.
5383 (sim-analyze!): Don't do instruction analysis here.
5384 (sim-finish!): Specify isa of x-invalid insn.
5385 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5387 1999-03-22 Doug Evans <devans@casey.cygnus.com>
5389 * thumb.cpu (cpu,mach,model): Delete.
5390 (dntf): New pmacro. Use it for all field definitions.
5391 (dntop): New pmacro. Use it for all operand definitions.
5392 (asr): Correct field list.
5393 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5395 * utils-cgen.scm (define-getters): New macro to simplify
5396 writing class accessors.
5397 (define-setters): Ditto.
5398 (sanitize): Recognize isa elements.
5400 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5401 state-parallel-exec?.
5402 * sid-model.scm (*): Ditto.
5403 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
5404 state-decode-assist.
5406 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5407 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5408 * sim-decode.scm (-gen-decode-switch): Ditto.
5410 * sim-arch.scm (-regs-for-access-fns): Delete.
5411 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5412 (-gen-arch-reg-access-defns): Delete.
5414 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5415 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5416 with state-parallel=exec?.
5417 (cgen-*): Call sim-analyze-insns! here.
5418 * sim-decode.scm (cgen-*): Ditto.
5419 * sim-model.scm (cgen-*): Ditto.
5420 * sim.scm (-sim-insns-analyzed): New global variable.
5421 (sim-init!): Reset it.
5422 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
5423 already done the analysis.
5425 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5428 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5429 (arm arch): Update isa spec.
5430 (arm,thumb isas): Define.
5431 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5432 (arm7tdmi mach): Add isa spec.
5433 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
5434 `const' on word number.
5435 * fr30.cpu (fr30 arch): Update isa spec.
5437 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5439 * i960.cpu (i960 arch): Update isa spec.
5441 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5442 liw-insns,parallel-insns moved to isas spec.
5443 * m32r.cpu (m32r arch): Update isas spec.
5445 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5446 liw-insns,parallel-insns moved to isa spec.
5447 * sparc.cpu (sparc arch): Update isas spec.
5448 (sparc isa): Define.
5449 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5450 decode-assist moved to isa spec.
5451 * sparc64.cpu (sparc64 cpu): Ditto.
5452 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5453 * desc-cpu.scm (-gen-isa-table-defns): New proc.
5454 (-gen-mach-table-defns): Output mach table.
5455 (-gen-hash-defines): Delete insn size macros, except for
5457 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
5458 (cgen-desc.h): Define MAX_ISAS.
5459 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
5460 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
5461 (arch-* accessors): Renamed from arch:*. All callers updated.
5462 (current-arch-isa-name-list): New proc.
5463 (-arch-parse-isas): Renamed from -arch-parse-isa.
5464 (def-isa-attr!): Rewrite.
5465 (<iframe>): New class.
5466 (<itype>): New class.
5468 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5469 (isa-integral-insn?,isa-parallel-exec?): New procs.
5470 (-isa-parse,-isa-read,define-isa): New proc.
5471 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5472 liw-insns moved to <isa>.
5473 (cpu-* accessors): Renamed from cpu:*. All callers updated.
5474 (-cpu-parse,-cpu-read): Update.
5475 (state-*): Renamed from state:*. All callers updated.
5476 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5478 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5479 (state-decode-assist): New proc.
5480 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5481 (-adata-set-derived!): Rewrite.
5482 (adata-integral-insn?): Renamed from adata:integral-insn?. All
5484 (arch-init!): Add define-isa command.
5485 * read.scm (<reader>): Default keep-isa member to (all).
5486 (reader-* accessors): Renamed from reader:*. All callers updated.
5487 (-keep-isa-set!): Call string->symbol on isa name list.
5488 (keep-isa-validate!): Rewrite.
5489 (current-isa): New proc.
5490 (keep-isa?): Recognize "all".
5491 (-init-parse-cpu!): New arg keep-isa. All callers updated.
5492 Call -keep-isa-set!.
5493 (cmd-if): Recognize keep-isa?.
5494 (cpu-load): New arg keep-isa. All callers updated.
5495 (-opt-spec-update): New proc.
5496 (common-arguments): First arg is string, not symbol.
5497 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
5499 * rtl.scm (rtx-get): Default mode of string arg is INT.
5501 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
5503 * rtx-funcs.scm (join:): Pass cpu to handler.
5505 * configure.in (guile_include_dir): Delete.
5506 * configure: Rebuild.
5507 * Makefile.in: Rebuild.
5508 * doc/Makefile.in: Rebuild.
5510 * sid-cpu.scm (-extract-chunk-specs): New proc.
5511 (gen-define-fields): Use it.
5512 (-extract-chunk): New proc.
5513 (-gen-extract-beyond-var-list): Use it.
5514 (gen-extract-fields): Simplify.
5516 1999-03-22 Ben Elliston <bje@cygnus.com>
5518 * arm7.cpu (ldri-p): New instruction.
5519 (swi): Do not vector through 0x8 yet--there is nothing there.
5522 (all): Use (const x) in subreg expressions.
5524 1999-03-19 Ben Elliston <bje@cygnus.com>
5526 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5529 1999-03-17 Doug Evans <devans@casey.cygnus.com>
5531 * fr30.cpu (define-arch): Specify "forced" default-alignment.
5532 * mach.scm (-parse-alignment): Recognize "forced" alignment.
5533 * sim-cpu.scm (-extract-chunk-specs): New proc.
5534 (gen-define-fields): Use it.
5535 (-extract-chunk): New proc.
5536 (-gen-extract-beyond-var-list): Use it.
5537 (gen-extract-fields): Simplify.
5539 Port to guile 1.3.1.
5540 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5541 (LIBIBERTY): New var.
5542 (HOB_OBJS): Add cgen-gh.o.
5543 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5544 * Makefile.in: Rebuild.
5545 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5546 * config.in: Rebuild.
5547 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5548 libncurses, libtermcap.
5549 Add checks for needed functions in guile 1.2 not in guile 1.3,
5550 and vice versa. Add test for 3 argument scm_make_vector.
5551 * configure: Rebuild.
5552 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5553 definitions if guile doesn't have them.
5554 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5555 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
5556 with gh_vector_set_x.
5557 (cgh_qsort): Replace gh_list_length with gh_length.
5558 * cgen-gh.h: Add decls for added functions.
5559 (cgh_qsort): Don't declare if IN_HOBBIT.
5560 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
5561 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5562 scm_make_vector with gh_make_vector.
5563 * cos.scm: Use vector-length instead of length on vectors.
5564 * dev.scm (cload): Make varargs proc with keyword/value args.
5565 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
5566 provide version that works with guile 1.2 or 1.3.
5567 Include private copy of scmhob.h.
5568 * scmhob.h: New file. Keep our own copy for now.
5570 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
5572 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5574 (-rtx-traverse-operands): Dump cx temp stack if debugging.
5575 (-cx-temp-dump-stack): Pretty up output.
5577 * arm.cpu: comment out thumb.cpu until isa support ready.
5578 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5579 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5580 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5582 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5584 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5586 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5587 (<hw-address>,mode-ok?): unsigned/signed are compatible.
5589 * operand (op:new-mode): Improve error message.
5591 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
5592 * arm7.cpu: New file.
5594 1999-03-12 Ben Elliston <bje@cygnus.com>
5596 * arm.cpu: Lots of minor fixes after desk checking.
5598 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5600 * thumb.cpu: snapshot of current work
5602 * rtl.scm (rtx-get): Tweak error message.
5604 1999-03-10 Doug Evans <devans@casey.cygnus.com>
5606 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5607 * Makefile.in: Rebuild.
5609 * cos.c (cos_vector_copy): New function.
5610 (_object_copy): Use it.
5612 * mode.scm (mode:eq?): Clean up.
5613 * rtl.scm (cx-new-mode): Copy attributes.
5614 (rtx-get): Don't make copy if <c-expr> with identical mode.
5616 * fr30.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 (dr-names): h-dr register names moved here.
5624 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5625 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5626 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5628 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5630 (gr-names): h-gr register names moved here.
5632 (cr-names): h-cr register names moved here.
5634 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5635 (h-accums,h-psw): Ditto.
5636 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5638 (gr-names): h-gr register names moved here.
5639 (h-gr-indices): Delete.
5640 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
5641 (sparc64 h-gr): Ditto.
5642 (h-y): Add get/set specs.
5644 (fp operands): Rewrite.
5645 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5646 (h-tbr,h-cwp,h-wim): Ditto.
5647 * sparc64.cpu (h-fpsr): Add get/set specs.
5648 * sparccom.cpu (ldd-reg+reg): Load value all at once.
5649 (fp-ld-op): New arg `dest', all callers updated.
5650 (*): Replace `make-di' with `join'.
5652 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5654 (gen-semantic-code): Save/restore rtl generator state.
5655 (cgen-cpu.h): Call rtl-gen-init!.
5656 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5657 (-gen-ifld-extract-beyond): Ditto.
5658 (<multi-ifield>,gen-ifld-extract): Ditto.
5659 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5661 (-hw-gen-set-quiet-pc): Ditto.
5662 (<hw-pc>,gen-write): Ditto.
5663 (-hw-cxmake-get): Ditto. Call getter function if present.
5664 (<hw-register>,cxmake-get-raw): New method.
5665 (<hw-register>,gen-set-quiet-raw): New method.
5666 (-hw-gen-set-quiet): New arg `gstate'.
5667 (hw-fun-access?): Delete.
5668 (gen-reg-access-defn): Output function contents.
5669 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5671 (-gen-hw-index): Ditto.
5672 (op:read): Update gen-read invocation.
5673 (op:write): Update gen-write invocation.
5674 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5676 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5677 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5678 (<unit>,gen-profile-code): Update to sim.scm version.
5680 * sim-arch.scm (-regs-for-access-fns): New proc.
5681 (-biggest-reg-mode): New proc.
5682 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5683 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5684 virtual regs separately.
5685 (-gen-cpu-reg-access-defns): Replace fun-access? with new
5687 (gen-semantic-code): Save/restore rtl generator state.
5688 (cgen-cpu.h): Call rtl-gen-init!.
5689 (cgen-cpu.c): Ditto. #include cgen-ops.h.
5690 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
5691 renamed to mach-bfd-name.
5692 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5693 (-gen-ifld-extract-beyond): Ditto.
5694 (<multi-ifield>,gen-ifld-extract): Ditto.
5695 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5696 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5697 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5699 (hw-fun-access?): Delete.
5700 (-hw-gen-set-quiet-pc): New arg `gstate'.
5701 (<hw-register>,gen-get-macro): Rewrite.
5702 (<hw-register>,gen-set-macro): Rewrite.
5703 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5704 (-hw-cxmake-get): New arg `gstate'. Rewrite.
5705 (<hw-register>,cxmake-get-raw): New method.
5706 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
5707 (<hw-register>,gen-set-quiet-raw): New method.
5708 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5710 (-gen-hw-index): Ditto.
5711 (<hw-index>): New arg `gstate'.
5712 (-gen-hw-selector): Update call to rtx-c.
5713 (<pc>): New arg `gstate'.
5714 (op:read): Update gen-read invocation.
5715 (op:write): Update gen-write invocation.
5716 (<operand>,cxmake-get): Handle raw-reg.
5717 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5718 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5719 (<operand>,gen-set-quiet): Handle raw-reg.
5720 (<operand>,gen-set-trace): Handle raw-reg.
5721 (-gen-mach-data): mach:cpu renamed to mach-cpu.
5723 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5724 cgen_operand_type enum.
5725 (gen-operand-table): Add operand type enum. Replace pointer to
5726 hardware element with its enum. Null terminate table.
5727 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5728 Build operand table.
5729 * ifield.scm (-ifield-parse): Recognize ISA attribute.
5730 * mach.scm (<arch-data>): New member `isas'.
5731 (adata-isas): New accessor.
5733 (isa-default-insn-word-bitsize): New accessor.
5734 (isa-enum): New proc.
5735 (current-arch-default-insn-word-bitsize): Delete.
5736 (current-isa-list,current-isa-lookup): New procs.
5737 (-arch-parse-isa): New proc.
5738 (-arch-parse): Rewrite.
5739 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
5740 (define-arch): Define ISA attribute.
5741 (def-isa-attr!,isa-supports?): New procs.
5742 (<mach>): New member `isas'.
5743 (mach-isas): New accessor.
5744 (-mach-parse): New arg `isas', all callers updated.
5745 (-mach-read): Recognize `isas'.
5746 (arch-finish!): Rewrite.
5747 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5748 @arch@_cgen_get_{int,vma}_operand.
5749 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5750 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5751 of pointer to table entry.
5752 * opcodes.scm (gen-switch): Handle multiply defined operands.
5753 * operand.scm (op-sort): New proc.
5755 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5756 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5757 (hw-enum): Accept symbol argument.
5758 (hardware-builtin!): Delete attribute FUN-ACCESS.
5759 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5761 * attr.scm (atlist-source-form): New proc.
5762 (attr-builtin!): New attr `PRIVATE'.
5763 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5764 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5765 if they have `PRIVATE' attribute.
5766 (gen-hw-table-defns): Output definitions of explicitly defined
5768 * hardware.scm (<keyword>): New member print-name. Rename member
5769 `value' to `values', all uses updated.
5770 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
5771 (keyword-parse): Rewrite.
5772 (-keyword-read): New proc.
5773 (define-keyword): New proc.
5774 (-hw-parse-keyword): New proc.
5775 (-hw-parse-indices): Rewrite keyword handling, support new index spec
5777 (-hw-parse-values): Ditto.
5778 (-hw-parse-get,-hw-parse-set): Rewrite.
5779 (hardware-init!): Add new comment define-keyword.
5780 * mach.scm (<arch>): New member `kw-list'.
5781 (arch:kw-list,arch_set-kw-list!): New accessors.
5782 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
5784 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
5785 * mode.scm (mode-class-integral?): New proc.
5786 (mode-class-float?,mode-class-numeric?): New procs.
5787 (mode-integral?,mode-float?,mode-numeric?): New procs.
5788 (mode-compatible?): New proc.
5789 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
5791 (<ifield>,gen-extract): Ditto.
5792 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
5793 (<gstate>): New class.
5794 (gstate-simulator?,gstate-set-simulator?!): New accessors.
5795 (gstate-context,gstate-set-context!): New accessors.
5796 (gstate-macro?,gstate-set-macro?!): New accessors.
5797 (gstate-make,gstate-copy): New procs.
5798 (-rtl-current-gstate): New global.
5799 (current-gstate-simulator?): New proc.
5800 (current-gstate-context,current-gstate-macro?): New procs.
5801 (current-gstate,current-gstate-set!): New procs.
5802 (rtl-gen-init!): Rewrite.
5803 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
5804 (tstate-make): New arg `gstate', all callers updated.
5805 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
5806 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
5807 (tstate-gstate,tstate-set-gstate!): New accessors.
5808 (tstate-copy): New proc.
5809 (tstate-new-cond?,tstate-new-set?): Rewrite.
5810 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
5811 (rtx-traverse): New arg `gstate', all callers updated.
5812 (rtx-strdump): New proc.
5813 (-simplify-for-compilation): New arg `gstate', all callers updated.
5814 (semantic-in-out-operands): Ditto.
5815 (semantic-attrs): Ditto.
5816 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
5817 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
5818 (rtx-value): Rewrite.
5819 (<c-expr>,gen-name): New method.
5820 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
5821 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
5822 (cx-new-mode): New proc.
5823 (-rtx-c-with-tstate): New proc.
5824 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
5826 (-rtx-mode): Rewrite.
5827 (-rtx-mode-compatible?): New proc.
5828 (<c-expr-temp>): New member `value'.
5829 (cx-temp:value): New accessor.
5830 (<c-expr-temp>,make!): Override default method.
5831 (<c-expr-temp>,cxmake-get): Rewrite.
5832 (<c-expr-temp>,gen-set-quiet): Rewrite.
5833 (<c-expr-temp>,gen-set-trace): Rewrite.
5834 (gen-temp-defs): Use cx-temp:value.
5835 (record-temp!): New arg value, all callers updated.
5836 (cx-temp:cx:make): Delete.
5837 (-cx-temp-dump-stack): New proc.
5838 (rtx-get): New arg `gstate', all callers updated. Do mode
5839 compatibility checks. Ensure result has specified mode.
5840 (rtx-set-quiet): New arg `gstate', all callers updated.
5841 (rtx-set-trace): Ditto.
5842 (s-c-call): New arg `tstate', all callers updated.
5843 (s-c-raw-call): Ditto.
5844 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
5845 (s-cmpop,s-if,e-if): Ditto.
5846 (s-subreg): New proc.
5847 (-par-new-temp!): New proc.
5848 (-par-next-temp!): Rewrite.
5849 (-par-replace-set-dests): Use -par-new-temp!.
5850 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
5851 (s-sequence): Use -rtx-c-with-state.
5852 * rtx-funcs.scm (*): Update.
5853 (raw-reg:): New rtx function.
5855 (join:,subreg:): New rtx functions.
5857 * insn.scm (<insn>): New members pre-cond-trap, condition,
5858 post-cond-trap, compiled-condition.
5860 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
5862 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
5864 * utils-cgen.scm (parse-symbol): New proc.
5865 (parse-string): New proc.
5866 (gen-get-macro,gen-set-macro): New arg `index-args'.
5867 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
5868 Prepend \ to newlines.
5870 * utils.scm (alist-remove-duplicates): Delete.
5872 * sid.scm (sim-init!): Delete private debugging code.
5874 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
5876 * cgen-sid.scm: New file for C++ simulator application.
5877 * sid-arch.scm: Ditto.
5878 * sid-cpu.scm: Ditto.
5879 * sid-decode.scm: Ditto.
5880 * sid-model.scm: Ditto.
5882 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
5884 1999-03-05 Ben Elliston <bje@cygnus.com>
5886 * arm.cpu: New file.
5888 1999-03-03 Doug Evans <devans@casey.cygnus.com>
5890 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
5891 * Makefile.in: Rebuild.
5893 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
5894 (-attr-parse): Validate default value.
5896 * read.scm (-CGEN-VERSION): Change to 0.7.1.
5897 (-CGEN-LANG-VERSION): Ditto.
5898 (-keep-all-machs): Renamed from -keep-all, all uses updated.
5899 (<reader>): New member keep-isa plus accessors.
5900 (-keep-isa-set!,keep-isa-validate!): New procs.
5901 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
5902 (common-arguments): New variable.
5903 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
5904 (-debug-repl,continue): New procs.
5905 (-cgen,cgen): New procs.
5906 * cgen-gas.scm: Rewrite.
5907 * cgen-opc.scm: Rewrite.
5908 * cgen-sim.scm: Rewrite.
5909 * cgen-stest.scm: Rewrite.
5911 * gas-test.scm (gas-test-init!): Call opcodes-init!.
5912 (gas-test-finish!): Call opcodes-finish!.
5913 (gas-test-analyze!): Call opcodes-analyze!.
5914 (<hw-asm>): New method test-data.
5915 (<operand>,testdata): Rewrite.
5916 * sim-test.scm (sim-test-init!): Call opcodes-init!.
5917 (sim-test-finish!): Call opcodes-finish!.
5918 (sim-test-analyze!): Call opcodes-analyze!.
5919 (<hw-asm>): New method test-data.
5920 (<operand>,testdata): Rewrite.
5922 1999-03-01 Doug Evans <devans@casey.cygnus.com>
5924 * fixup.scm (reverse!): Define if missing.
5925 * *.scm: Use reverse! instead of list-reverse!.
5927 * utils.scm (leading-id-char?): New proc.
5928 (id-char?): Rewrite.
5929 (chars-until-delimiter): New proc.
5930 * opc-itab.scm (extract-syntax-operands): Rewrite.
5931 (strip-mnemonic): Rewrite.
5932 (compute-syntax): Rewrite.
5934 * pmacros.scm (-pmacro-substr): New proc.
5935 (pmacros-init!): Add builtin .substr.
5937 1999-02-26 Doug Evans <devans@casey.cygnus.com>
5939 * thumb.cpu: New file.
5941 1999-02-24 Doug Evans <devans@casey.cygnus.com>
5943 * Makefile.am (CGENCFLAGS): New variable.
5944 (WITH_HOBBIT): Use automake conditional.
5945 (CGEN_HOB_SRC): New variable.
5946 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
5947 (*.o): Compile with CGENCFLAGS.
5948 (cgen-hob.c): Simplify.
5949 (cgen-nohob.c): New rule.
5950 (hobbit): Renamed from hob.x.
5951 (CLEANFILES): Add cgen-nohob.c.
5952 * Makefile.in: Rebuild.
5953 * doc/Makefile.in: Rebuild.
5954 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
5955 (WITH_HOBBIT): Use AM_CONDITIONAL.
5956 * configure: Rebuild.
5957 * aclocal.m4: Rebuild.
5959 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
5960 with string-write-map.
5962 * sim-cpu.scm (hw-need-storage?): New proc.
5963 (-gen-hardware-types): Use it.
5964 (gen-parallel-exec-elm): Call op-save-index?.
5966 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5968 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
5970 (-gen-ifld-extract-beyond): Ditto.
5971 (<integer>): Delete all references.
5972 (<sim-hardware>): Delete.
5973 (hw-profilable?): New proc.
5974 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
5975 (<hw-register>): Rename method get-index-mode to save-index?.
5976 (<hw-register>): New methods gen-get-macro,gen-set-macro.
5977 (<hw-register>,gen-sym-decl): Make virtual.
5978 (<hw-memory>,gen-sym-decl): Make virtual.
5979 (<hw-memory>): Rename method get-index-mode to save-index?.
5980 (<hw-address>,gen-sym-decl): Make virtual.
5981 (<operand>): New method save-index?.
5982 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
5984 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
5985 prefix added. All uses updated.
5987 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
5988 rather than pointer to table entry.
5990 * opcodes.scm: Remove all attribute support, lives in desc.scm.
5991 Remove all hw-asm,op-asm support.
5992 (-gen-parse-number,-gen-parse-address): New procs.
5993 (<keyword>,gen-parse): Redo function name computation.
5994 (<keyword>,gen-print): Ditto.
5995 (<operand>,gen-function-name): Rewrite.
5996 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
5997 (opcodes-init!): Delete call to add-parser!.
5999 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6000 Define enum using hardware semantic name.
6001 (-gen-hw-decl,-gen-hw-defn): New procs.
6002 (gen-hw-table-decls): Use -gen-hw-decl.
6003 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6004 CGEN_HW_ENTRY structs.
6005 (gen-operand-table): Output hw's enum, not pointer to table entry.
6006 (-gen-cpu-open): Build table of selected hardware elements.
6008 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6009 (<hardware> support): Delete.
6010 (<hw-asm>): Delete, moved to hardware.scm.
6011 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6012 (<hw-asm>,gen-table-entry): New method.
6013 (<hw-asm>,parse!): Delete.
6014 (<keyword>,gen-table-entry): New method.
6015 (<keyword>,parse!): Delete.
6016 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6017 for gen-decl,gen-defn,gen-ref,gen-init.
6018 (desc-init!): Don't create parser for operand asm specs.
6020 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6021 * ifield.scm (<ifield>): New member `mode'.
6022 (<ifield>,make!): New arg `mode'.
6023 (ifld-mode): Rewrite.
6024 (ifld-hw-type): Rewrite.
6025 (<ifield>,min-value): Rewrite.
6026 (<ifield>,max-value): Rewrite.
6027 (-ifield-parse): New arg `mode'.
6028 (-ifield-read): Update.
6029 (define-full-ifield): New arg `mode'.
6030 (define-full-multi-ifield): Ditto.
6031 (-multi-ifield-parse): Ditto.
6032 (-multi-ifield-read): Update.
6033 (define-full-multi-ifield): New arg `mode'.
6034 (ifield-builtin!): Update definition of f-nil.
6035 * simplify.inc (define-normal-ifield): Update call to
6037 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6038 (define-normal-hardware): Delete arg asm. New args indices, values,
6039 handlers. Update call to define-full-hardware.
6040 (define-simple-hardware,dsh): New pmacros.
6041 (define-normal-operand): Update call to define-full-operand.
6042 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6043 Specify INT/UINT mode instead.
6044 (h-gr,h-cr): Use "indices" instead of "asm".
6045 (h-dr,h-ps): Update keyword syntax.
6046 (h-r13,h-r14,h-r15): Ditto.
6047 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6048 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6049 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6050 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6051 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6052 Specify INT/UINT mode instead.
6053 (h-gr): Use "indices" instead of "asm".
6054 (h-cc): Update keyword syntax.
6055 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6056 Specify INT/UINT mode instead.
6057 (h-hi16,h-slo16,h-ulo16): Update.
6058 (h-gr,h-cr): Use "indices" instead of "asm".
6059 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6060 (h-accums): Update keyword syntax.
6061 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6062 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6063 Specify INT/UINT mode instead.
6064 (h-gr-indices): New pmacro.
6065 (h-gr32,h-gr64): Split up from h-gr.
6066 (h-a): Update type spec. Use values instead of asm spec.
6067 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6068 (h-y,h-annul-p): Ditto.
6069 (h-asr): Update keyword spec.
6070 (h-lo10,h-lo13,h-hi22): Update.
6071 (get-freg-spec,set-freg-spec): New pmacros.
6072 (h-fr32,h-fr64): Split up from h-fr.
6073 (rdd): Comment out get/set specs.
6074 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6075 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6076 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6077 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6078 UNSIGNED. Specify INT/UINT mode instead.
6079 (h-*): Use dsh instead of dnh where appropriate.
6080 (h-ixcc): Update type spec. Use "values" instead of "asm".
6081 (h-p,h-membarmask): Ditto.
6082 (membarmask): Use "handlers" instead of "asm".
6084 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6085 values,handlers,getters,setters plus accessors.
6086 (hw-mode-ok?,hw-default-mode): New procs.
6087 (<hardware-base>): Rename method new-mode to mode-ok?
6088 (<hardware-base>): New method get-index-mode.
6089 (hw-index-mode): New proc.
6090 (pc?): Delete, moved to operand.scm.
6091 (address?): New proc.
6092 (<hardware>): Delete.
6093 (<hw-asm>): Definition moved here from desc.scm.
6094 (keyword-parse): New proc.
6095 (hardware-parsers): Delete.
6096 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6097 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6098 (-hw-parse-get,-hw-parse-set): New procs.
6099 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6100 indices,values,handlers,get,set. Rewrite.
6101 (-hw-read-extra): Delete.
6103 (define-hardware): Don't add object if not selected.
6104 (define-full-hardware): Ditto.
6105 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6106 (<hw-register>): Member `type' moved to baseclass. Delete member
6108 (<hw-register>,parse!): Rewrite.
6109 (<hw-register>): Delete methods get-rank,get-mode.
6110 (<hw-register>): Method new-mode renamed to mode-ok?
6111 (<hw-register>): New method get-index-mode.
6112 (<hw-pc>,parse!): Rewrite.
6113 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6114 (<hw-memory>,parse!): Rewrite.
6115 (<hw-memory>): Delete methods get-rank,get-mode.
6116 (<hw-memory>): Method new-mode renamed to mode-ok?
6117 (<hw-memory>): New method get-index-mode.
6118 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6120 (<hw-immediate>,parse!): Rewrite.
6121 (<hw-immediate>): Delete methods get-rank,get-mode.
6122 (<hw-immediate>): Method new-mode renamed to mode-ok?
6123 (<hw-address>): Delete member hw-asm.
6124 (<hw-address>,parse!): Rewrite.
6125 (<hw-address>): Delete methods get-rank,get-mode.
6126 (<hw-address>): Method new-mode renamed to mode-ok?
6127 (hw-profilable?): Delete.
6128 (hardware-init!): Delete hardware-parsers reference.
6129 Update argument specs of command define-full-hardware.
6130 (hardware-builtin!): Update definitions of hardware builtins.
6131 * operand.scm (<operand>): New members hw-name,mode-name.
6132 Delete member op-asm. New member handlers.
6133 (<operand>,make!): Update.
6134 (op:hw-name,op:mode-name,op:handlers): New procs.
6137 (<operand>): New method get-index-mode.
6138 (<pc>,make!): Update.
6139 (op:new-mode): Rewrite.
6140 (operand-parsers): Delete.
6141 (-operand-parse): Rewrite. Return #f if insn not selected.
6142 (-op-read-extra): Delete.
6143 (-operand-read): Update.
6144 (define-operand,define-full-operand): Update.
6145 (operand-init!): Delete operand-parsers reference.
6146 Update syntax of define-full-operand command.
6148 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6149 (define-full-insn): Update.
6150 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6151 (define-full-minsn): Update.
6153 * mode.scm (<mode>): New member class.
6154 (mode:class): New proc.
6156 (-mode-parse): New arg class.
6157 (define-full-mode): Update.
6158 (mode-find): Rewrite.
6159 (mode-make-int,mode-make-uint): New procs.
6160 (mode-init!): Update syntax of define-full-mode command.
6161 (mode-builtin!): Update definitions of builtin modes.
6163 * model.scm (<profile>): Delete.
6165 * read.scm (keep-atlist?): New proc.
6166 (keep-multiple?): New proc.
6167 (<parser-list>): Delete.
6168 (add-parser!,parse-spec!): Delete.
6170 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6171 (def-rtx-syntax-node): Ditto.
6172 (-rtx-traverse-debug?): New variable.
6173 (tstate-make): New proc.
6174 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6175 (tstate-new-cond?,tstate-new-set?): New procs.
6176 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6177 tstate. All callers updated.
6178 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6179 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6180 (-build-operand!): Replace arg cond? with tstate.
6181 (-build-reg-operand!,-build-mem-operand!): Ditto.
6182 (-build-index-of-operand!): Update making of <operand> object.
6183 (s-ifield): New arg tstate. All callers updated.
6184 (hw:): New arg tstate. All callers updated. Replace call to
6185 current-hw-lookup with current-hw-sem-lookup-1.
6186 (s-index-of): New arg tstate. All callers updated.
6188 (-rtx-use-sem-fn?): New proc.
6189 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6191 (s-convop): Only use semantic mode when using semantic cover fns.
6192 (s-cmpop): Call -rtx-use-sem-fn?.
6193 (s-cond,s-case): New arg tstate. All callers updated.
6194 (s-parallel,s-sequence): Ditto.
6196 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6198 * types.scm (<scalar>): Rewrite implementation.
6199 (<integer>): Delete.
6200 (parse-type): Rewrite.
6202 * utils-cgen.scm (parse-handlers): New proc.
6204 * utils.scm (!=): New proc.
6206 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6208 * pmacros.scm (-pmacro-expand): Fix typo.
6210 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6212 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6213 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6214 * i960.cpu (build-hex2): New pmacro.
6215 (insn-opcode): Simplify.
6216 (insn-opcode2): Ditto.
6218 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6219 * cgen-stest.scm (catch-with-backtrace): Ditto.
6221 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6223 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6224 All callers updated.
6225 (-pmacro-invoke): New proc.
6226 (-pmacro-sym,-pmacro-str): New procs.
6227 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6228 (pmacros-init!): Install builtins .iota, .map, .apply.
6229 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6230 (h-fr): Simplify register name spec.
6231 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6232 * utils.scm (num-args-ok?): New proc.
6234 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6236 * pmacros.scm (-pmacro-error): New proc.
6237 (-pmacro-expand): Use it.
6238 (-pmacro-splice): New proc.
6239 (pmacros-init!): Install new builtin .splice.
6241 * sparc.cpu: Include sparc64.cpu when appropriate.
6242 (f-mmask,f-simm11): Moved to sparc64.cpu.
6243 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6244 (ANNUL attribute): Delete.
6245 (test-* pmacros): New arg cc, all callers updated.
6246 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6247 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6249 (ldstub,swap): Moved to sparccom.cpu.
6250 * sparc64.cpu: Add more insns.
6252 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6254 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6256 (cgen-sem-switch.c): Ditto.
6257 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6258 moved to cgen-engine.h.
6259 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6260 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6261 global. Cache attributes and insn length in IDESC.
6262 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6263 @cpu@_opcode renamed to @cpu@_get_idata.
6264 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6265 done later underneath sim_resume.
6266 (@mach@_mach): Record @cpu@_prepare_run.
6267 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6269 (-hw-gen-set-quiet-pc): Ditto.
6270 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6271 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6272 (<hw-addr>,cxmake-get): Ditto.
6273 (<hw-iaddr>,cxmake-get): Ditto.
6274 (<pc>,cxmake-get): Ditto.
6275 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6276 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6277 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6278 (<hw-pc>,gen-write): Use hw-selector-default.
6279 (<hw-register>,gen-write): Ditto.
6280 (<hw-memory>,gen-write): Ditto.
6281 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6282 (-gen-hw-selector): New proc.
6284 * desc.scm: New file.
6285 * desc-cpu.scm: New file.
6286 * opcodes.scm: Split up into several smaller files.
6287 * opc-asmdis.scm: New file.
6288 * opc-ibld.scm: New file.
6289 * opc-itab.scm: New file.
6290 * opc-opinst.scm: New file.
6291 * Makefile.am (desc): New target.
6292 (opcodes): Update args to cgen-opc.scm.
6293 * Makefile.in: Rebuild.
6294 * aclocal.m4: Rebuild.
6295 * config.in: Rebuild.
6296 * configure.in: Update arg to AC_INIT.
6297 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6298 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6300 * configure: Rebuild.
6301 * cgen-gas.scm: Update files to load.
6302 * cgen-opc.scm: Ditto. Reorganize option letters.
6303 * cgen-sim.scm: Update files to load.
6304 * cgen-stest.scm: Ditto.
6305 * dev.scm (cload): New app "DESC".
6306 (load-opc): Update files to load.
6307 (load-gtest,load-sim,load-stest): Ditto.
6309 * attr.scm (bool-attr?): New proc.
6310 (attr-list-enum-list): New proc.
6311 (-attr-sort): Rewrite.
6312 (attr-builtin!): Give ALIAS attribute a fixed index.
6313 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6314 calculate attribute enum list.
6315 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6317 * insn.scm (-insn-parse): Renamed from parse-insn.
6319 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6322 * mode.scm (-mode-parse): Renamed from parse-mode.
6324 * operand.scm (<operand>): New member `selector'.
6325 (<operand>,make!): Use default selector.
6326 (hw-selector-default): New variable.
6327 (hw-selector-default?): New proc.
6329 * pmacros.scm (pmacros-init!): New proc.
6330 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6331 (-env-set!): Delete.
6332 (-pmacro-expand): New proc apply-macro.
6333 Use it in scan-list,scan. Scan list first, then see if macro
6335 (define-pmacro): Rewrite.
6336 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6338 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6339 selected if (current-mach) seen.
6340 (rtx?): Renamed from rtx-uneval?, all callers updated.
6341 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6343 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6344 selector, all callers updated.
6345 (hw:): New arg selector, all callers updated. Delete old comments
6347 (reg:,mem:): Handle selectors
6348 * rtx-funcs.scm (reg:): Handle selectors.
6350 * read.scm: Renamed from cpu.scm.
6351 (<command>): New class.
6352 (<reader>): New member commands.
6353 (reader-add-command!): New proc.
6354 (reader-lookup-command): New proc.
6355 (reader-error,-reader-process-expanded,reader-process): New procs.
6356 (reader-read-file!): New proc.
6357 (include): Call reader-read-file!.
6359 (cpu-load): Call reader-read-file!.
6360 * utils.scm (num-args): New proc.
6361 * simplify.inc: New file.
6362 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
6363 procs. Move define-normal-foo procs (and abbreviated forms) to
6364 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
6366 * fr30.cpu: Include simplify.inc.
6367 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6368 * i960.cpu: Include simplify.inc.
6369 * m32r.cpu: Include simplify.inc.
6370 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6371 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6372 * sparc.cpu: Include simplify.inc.
6373 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6374 * utils-cgen.scm (parse-error): Moved to read.scm.
6375 (sanitize): Rewrite.
6376 (utils-init!): New proc.
6378 1999-02-02 Doug Evans <devans@casey.cygnus.com>
6380 * sparc.cpu: New file.
6381 * sparc32.cpu: New file.
6382 * sparc64.cpu: New file.
6383 * sparccom.cpu: New file.
6384 * sparc.opc: New file.
6386 1999-01-27 Frank Eigler <fche@cygnus.com>
6388 * utils.scm (gen-copyright): New proc.
6390 1999-01-27 Doug Evans <devans@casey.cygnus.com>
6392 Parameterize rtl parsing, rather than having lots of little handlers.
6393 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6394 Delete member traverse.
6395 (rtx:set-traverse!): Delete.
6396 (-rtx-valid-types,-rtx-valid-matches): New variables.
6397 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6398 instead of expression. All callers updated.
6399 (def-rtx-node): New args arg-types,arg-modes.
6400 (def-rtx-syntax-node): Ditto.
6401 (def-rtx-dual-mode): Ditto.
6402 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6403 All callers updated.
6404 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6405 All callers updated.
6406 (rtx-macro-expand): New proc.
6407 (-rtx-traverse-check-args): Delete.
6408 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6409 an rtx specific traverser.
6410 (-rtx-any-mode?,-rtx-symornum?): New procs.
6411 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6412 (-rtx-traverse-no-mode): Delete.
6413 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6414 (-rtx-traverse-operands): Rewrite.
6415 (-rtx-traverse-expr): Rewrite.
6416 (rtx-traverse): Don't expand macros here, leave for caller to do.
6417 (rtx-simplify): Delete.
6418 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
6420 (rtx-true?,rtx-false?): Ditto.
6421 (-rtx-ref-type): Set dest is operand 1 now.
6422 (-simplify-for-compilation): New proc.
6423 (semantic-in-out-operands): Recognize regno as an alias for index-of.
6424 Expand macros before calling rtx-traverse. Sort operands by name
6425 to avoid unnecessary semantic formats.
6426 (semantic-attrs): New proc.
6427 (rtx-uneval?): Handle (<rtx-func> ...).
6428 (s-boolifop): Delete arg mode. All callers updated.
6429 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6430 (eq-attr): New arg obj.
6432 * m32r.cpu (rach): Update calls to andif.
6434 * minsn.scm (-minsn-parse-expansion): Renamed from
6435 parse-minsn-expansion.
6436 (-minsn-parse): Renamed from parse-minsn.
6437 (-minsn-read): Renamed from read-minsn.
6438 (def-minsn): Don't check APPLICATION here.
6439 (def-full-minsn): New proc.
6440 (define-macro-insn): Check APPLICATION here. Expand macros.
6441 (define-normal-macro-insn): Ditto.
6443 * utils.scm (word-value): New arg start-lsb?.
6444 (word-mask,word-extract): Ditto.
6445 (split-bits,powers-of-2): Use integer-expt instead of expt.
6446 (bit-set?): Handle 32 bit values (which are bignums).
6447 (cg-logand,cg-logxor): New functions.
6448 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6449 (<ifield>,field-value): Update call to word-value.
6450 (<ifield>,min-value): Use integer-expt instead of expt.
6451 (<ifield>,max-value): Ditto.
6453 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6455 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6457 Compute raw instruction format in addition to semantic based format.
6458 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6459 (<iformat> accessors): Rename accessors to ifmt-*.
6460 (<sformat>): New class.
6461 (fmt-enum): Renamed from fmt:enum.
6462 (-ifmt-search-key): Rewrite.
6463 (-sfmt-search-key): New proc.
6464 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6465 Compute iformat and sformat search keys.
6466 (ifmt-build): Update.
6467 (sfmt-build): New proc.
6468 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6469 (ifmt-compute!): Compute instruction format <iformat> based on
6470 instruction fields alone. Compute new semantic format <sformat>
6471 based on instruction fields and semantic information.
6472 (ifmt:lookup): Delete.
6473 * mach.scm (<arch>): New member sfmt-list, plus accessors.
6474 (current-sfmt-list): New proc.
6475 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6476 Rename member fmt to ifmt. New members fmt-desc, sfmt.
6477 (insn-length,insn-length-bytes): Update.
6478 (insn:mask-length,insn:mask): Update.
6479 (insn-lookup-op): Update.
6480 * gas-test.scm (gas-test-analyze!): Update.
6481 (gen-gas-test): Ditto.
6482 * sim-test.scm (sim-test-analyze!): Update.
6483 (gen-sim-test): Ditto.
6484 * opcodes.scm (gen-operand-instance-table): Update.
6485 (gen-operand-instance-ref): Ditto.
6486 (max-operand-instances): Use heuristic if semantics not parsed.
6487 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6488 (opcodes-analyze!): Only scan semantics of building operand instance
6490 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6491 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6492 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6493 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6494 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6495 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6496 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6498 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6499 New arg lsb0? All callers updated.
6500 (decode-bits): New arg lsb0?. All callers updated.
6501 (opcode-slots): Update call to bit-set?. Call integer-expt instead
6503 (-gen-decode-bits): New arg lsb0?. All callers updated.
6504 (build-slots): Call integer-expt instead of expt.
6505 (build-decode-table-entry): Handle crossing word boundaries better.
6506 (-gen-decode-switch): New arg lsb0?. All callers updated.
6507 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6509 * enum.scm (define-enum): Rewrite.
6510 (define-normal-enum): Ditto.
6511 (def-full-insn-enum): New proc.
6512 (define-normal-insn-enum): Rewrite.
6514 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6516 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6518 * dev.scm: Add sid support.
6520 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6521 (CLEANFILES): Add tmp-*.
6522 * Makefile.in: Rebuild.
6524 * doc/Makefile.am: New file.
6525 * doc/Makefile.in: New file.
6526 * doc/cgen.texi: New file.
6527 * Makefile.am (SUBDIRS): Define.
6528 * Makefile.in: Rebuild.
6529 * configure.in: Create doc/Makefile.
6530 * configure: Rebuild.
6532 1999-01-18 Doug Evans <devans@casey.cygnus.com>
6534 * insn.scm (insn:syn): Delete.
6536 1999-01-15 Doug Evans <devans@casey.cygnus.com>
6538 * fr30.cpu (model fr30-1): Add state variables load-regs,
6539 load-regs-pending. Delete h-gr. Clean up operand names of all units.
6540 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6541 (model m32rx): Ditto.
6542 (addi): Simplify function unit usage spec.
6543 (ld-plus): Rewrite operand names in function unit usage spec.
6544 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6545 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6546 overridden. Allow operand to appear in input and output spec.
6547 (<insn>,gen-profile-code): string-append -> string-list.
6549 * ifield.scm (define-ifield): Call pmacro-expand.
6550 (define-full-ifield,define-normal-ifield): Ditto.
6551 (define-multi-ifield,define-normal-multi-ifield): Ditto.
6553 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6554 with-scache and without-scache cases.
6556 1999-01-14 Doug Evans <devans@casey.cygnus.com>
6558 * fr30.cpu (fr30-1): Add state variable h-gr.
6559 Add units u-cti, u-load, u-store, u-ldm, u-stm.
6560 (all insns): First pass at providing cycle counts.
6561 * sim.scm (<unit>,gen-profile-code): Only check for output operands
6562 when initializing unit output operands, ditto for input operands.
6564 * insn.scm (insn-length,insn-length-bytes): New procs.
6565 * mach.scm (-adata-set-derived!): Use them.
6566 * sim-cpu.scm (-gen-sem-case): Ditto.
6568 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6569 (-gen-write-case): Ditto.
6570 (gen-semantic-fn): Ditto. Split into two:
6571 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
6573 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
6574 scache/no-scache appropriately. All callers updated.
6575 (-gen-sem-case): PCADDR->IADDR.
6576 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6578 * sim-decode.scm (*): Replace string-append,string-map with
6579 string-list,string-list-map where the result is sufficiently large.
6580 (-gen-decode-insn-table): Go back to simple version for non-scache
6581 case: just record IDESC in decoder tables and leave field extraction
6583 (-gen-decode-switch): Ditto.
6584 (-gen-decode-fn): Ditto.
6585 (-gen-extract-decls): Only emit format enum if with-scache?.
6586 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6588 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6589 (-gen-insn-timing): Ditto.
6590 * sim.scm (gen-argbuf-type): Only output sem_fields union in
6593 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6594 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6596 1999-01-12 Doug Evans <devans@casey.cygnus.com>
6598 * cpu.scm (keep-mach-validate!): New proc.
6599 (include): New proc.
6601 * mach.scm (current-arch-mach-name-list): New proc.
6602 (-parse-arch-machs): Always return canonical form.
6603 (def-arch): Validate user specified machs to be kept.
6604 (def-mach-attr!): Simplify.
6606 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6607 (option-init!): Initialize it.
6608 (option-set!): Set it.
6609 (gen-insn-table-entry): Emit 0 for operand instance ref if not
6610 output operand instance tables.
6611 (cgen-opc.in): Only output operand instance tables if asked to.
6613 * sim.scm (option-init!,option-set!): Clarify returned value.
6615 * sim.scm (gen-mach-bfd-name): Move from here.
6616 * utils-cgen.scm: To here.
6618 1999-01-11 Doug Evans <devans@casey.cygnus.com>
6620 * fr30.cpu (ilm): Fix comment field.
6621 (cond-branch): Remove explicit setting of COND-CTI, let cgen
6624 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6625 (rtx-true?, rtx-false?): New procs.
6626 * rtx-funcs.scm (annul): Rename vpc to pc.
6627 (-rtx-traverse-if): Improve determination of whether then/else parts
6628 are conditionally executed.
6630 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6632 (gen-argbuf-type): Simplify generated definition (big sem_fields
6633 union moved outside).
6635 1999-01-11 Ben Elliston <bje@cygnus.com>
6637 * doc/porting.texi: New file.
6639 * doc/intro.texi: New file.
6640 (Layout): Use @example to insert preformatted ASCII text (such as
6641 diagrams). @code is inappropriate here.
6643 1999-01-06 Doug Evans <devans@casey.cygnus.com>
6645 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6647 * m32r.opc (print_hash): Cast dis_info.
6649 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6650 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6653 1999-01-05 Doug Evans <devans@casey.cygnus.com>
6655 * i960.cpu (f-br-disp): Remove RELOC attribute.
6656 (f-ctrl-disp): Ditto.
6657 (callx-disp): set-quiet -> set for (reg h-gr 2).
6658 (callx-indirect,callx-indirect-offset): Ditto.
6660 * Makefile.am (gas-test): Fix dependencies.
6661 * Makefile.in: Rebuild.
6662 * cgen-gas.asm: File creation args are -<uppercase-letter>.
6663 * gas-test.scm (break-out-syntax,make-file-name): Delete.
6664 (gas-test-analyze!): Use syntax-break-out.
6665 * sim-test.scm (break-out-syntax,make-file-name): Delete.
6666 (sim-test-analyze!): Use syntax-break-out.
6667 (cgen-build.sh): Use gen-file-name.
6668 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6669 * insn.scm (syntax-break-out): New proc.
6670 * utils.scm (gen-file-name): New proc.
6672 * fixup.scm (nil,<?,<=?,>?): Delete.
6674 * utils.scm (count-true): Rewrite.
6676 * slib/sort.scm: Move sort.scm to slib directory.
6679 * iformat.scm (ifmt-compute!): Record empty format.
6681 * rtl.scm (semantic-in-out-operands): Simplify by moving several
6682 internal procs outside. Handle expression register numbers.
6685 * rtx-funcs.scm (annul): Rename new_pc to vpc.
6687 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6689 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6690 (gen-semantic-fn,-gen-sem-case): Ditto.
6691 (cgen-cpu.c): Define WANT_CPU to @cpu@.
6692 (cgen-semantics.c): Ditto.
6693 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6694 (gen-ifmt-argvars-defns): New proc.
6695 (gen-ifmt-argvars-assigns): New proc.
6696 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6697 (-gen-decode-fn): Handle non-with-scache case.
6698 (cgen-decode.c): Define WANT_CPU to @cpu@.
6699 * sim-models.scm (-gen-mach-defns): Emit bfd name.
6700 (cgen-model.c): Define WANT_CPU to @cpu@.
6701 * sim.scm (gen-ifld-extract-argvar): New proc.
6702 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6703 with FUN-ACCESS specified.
6704 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6705 (<hw-register>,gen-extract): New arg local?.
6706 (<hw-address>,gen-extract): Ditto.
6707 (-hw-cxmake-get): Handle non-with-scache case.
6708 (-hw-gen-set-quiet): Ditto.
6709 (<hw-address>,cxmake-get): Handle non-with-scache case.
6710 (gen-op-extract-argvar): New proc.
6711 (<operand>,gen-record-profile): Rewrite.
6712 (<operand>,gen-profile-code): Rewrite.
6713 (<unit>,gen-profile-code): Use -gen-argfld-ref.
6714 (gen-argbuf-fields-union): New proc.
6715 (gen-argbuf-type): Use it. Handle non-scache case.
6717 * *.scm: class:foo procs renamed to class-foo.
6718 * attr.scm (<attribute>): New member `for'.
6719 (-attr-parse): New first value in list for default if
6721 (non-bool-attr-list,attr:add!): Delete.
6722 (def-attr): Use current-attr-add!.
6723 (atlist-attr-value-no-default): New proc.
6724 (attr-lookup-default): Handle boolean attributes.
6725 (gen-attr-enum): New proc.
6726 (-attr-remove-meta-attrs-alist): New proc.
6727 (attr-nub): New proc.
6728 (current-attr-list-for): New proc.
6729 (current-{ifld,hw,op,insn}-attr-list): New procs.
6730 (attr-builtin!): New proc.
6731 * cpu.scm (keep-obj?): Rewrite.
6732 (-init-parse-cpu!): Call arch-init!.
6733 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6734 (-finish-parse-cpu!): Call arch-finish!.
6735 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6736 (def-enum,def-full-enum): Use current-enum-add!.
6737 (gen-obj-list-enums): New proc.
6738 * hardware.scm (hw:add!,hw:lookup): Delete.
6739 (def-hardware,def-hardware-ext): Use current-hw-add!.
6740 (hw:std-attrs,hw:attr-list): Delete.
6741 (hardware-builtin!): Define builtin hardware attributes.
6742 * ifield.scm (ifld:add!,ifld:lookup): Delete.
6743 (def-ifield,def-full-ifield): Use current-ifld-add!.
6744 (ifld:std-attrs,ifld:attr-list): Delete.
6745 (ifield-builtin!): New proc.
6746 * insn.scm (insn:add!,insn:lookup): Delete.
6747 (def-full-insn): Use current-insn-add!.
6748 (insn:std-attrs): Delete.
6749 (insn-builtin!): New proc.
6750 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6752 (<arch-data>): New member machs.
6753 (current-attr-list,current-enum-list): New procs.
6754 (current-op-list,current-minsn-list): New procs.
6755 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6756 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6758 (-parse-arch-machs): New proc.
6759 (-arch-parse): New arg machs, all callers updated.
6760 (-arch-read): Handle machs spec.
6761 (def-arch): Define MACH attribute here.
6762 (mach-init!,mach-finish!): Not here.
6763 (cpu:add!,cpu:lookup): Delete.
6764 (def-cpu): Use current-cpu-add!.
6765 (<mach>): New member bfd-name.
6766 (-mach-parse): New arg bfd-name, all callers updated.
6767 (-mach-read): Handle bfd-name spec.
6768 (mach:add!,mach:lookup): Delete.
6769 (def-mach): Use current-mach-add!.
6770 (def-mach-attr!): New proc.
6771 (arch-init!): New proc.
6772 (arch-finish!): New proc. Reverse all object lists here.
6773 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
6774 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
6775 (define-normal-macro-insn): Ignore minsn if mach not kept.
6776 * mode.scm (mode-builtin!): New proc.
6777 * model.scm (model:add!,model:lookup): Delete.
6778 (def-model): Use current-model-add!.
6779 * opcodes.scm (insn:attr-list): Delete.
6780 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
6781 (gen-attr-table-defn): Emit value for default.
6782 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
6783 (op:attr-list): Delete.
6784 (gen-operand-decls,gen-insn-decls): New proc.
6785 (compute-insn-attr-list): Delete.
6786 (cgen-opc.h): Reorganize and simplify.
6787 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
6788 (def-operand,def-full-operand): Use current-op-add!.
6789 (op:std-attrs): Delete.
6790 (operand-enum): Delete.
6791 (operand-builtin!): Define builtin operand attrs.
6792 * utils-cgen.scm (sanitize): Update calls to lookup procs.
6793 (gen-attr-enum-decl): Use gen-obj-list-enums.
6794 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
6796 * fr30.cpu (define-arch): Add machs spec.
6797 (f-i4): SIGNED attribute -> !UNSIGNED.
6798 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
6799 (HASH-PREFIX): Define operand attribute.
6800 (NOT-IN-DELAY-SLOT): Define insn attribute.
6801 * i960.cpu (define-arch): Add machs spec.
6802 * m32r.cpu (define-arch): Add machs spec.
6803 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
6804 (HASH-PREFIX): Define operand attribute.
6805 (FILL-SLOT): Define insn attribute.
6807 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
6809 * fr30.cpu (stilm): Correct mask for and operation.
6811 1998-12-17 Doug Evans <devans@casey.cygnus.com>
6813 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
6814 Replace START/EXIT with start/pass.
6815 (gen-sim-test): Delete ".text".
6817 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
6819 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
6821 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
6823 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
6824 (h-sbit): Make it FUN-ACCESS.
6825 (h-gr): Reorder so that general regs are always printed by number.
6827 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
6829 * i960.cpu (flushreg): Use nop.
6831 1998-12-14 Doug Evans <devans@casey.cygnus.com>
6833 * m32r.cpu (default-alignment): Specify.
6834 * mach.scm (<arch-data>): New member default-alignment.
6835 (adata:default-alignment): New proc.
6836 (current-arch-default-alignment): New proc.
6837 (-arch-parse): New arg default-alignment.
6838 (parse-alignment): New proc.
6839 (-arch-read): Handle default-alignment spec.
6841 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
6843 * insn.scm (f-%): Delete.
6844 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
6845 be readded if proved useful.
6846 (gen-extract-fields): Ditto. Use gen-ifetch.
6847 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
6848 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
6850 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
6852 * fr30.cpu (div2): Set zbit properly when remainder not zero.
6854 1998-12-14 Dave Brolley <brolley@cygnus.com>
6856 * fr30.cpu: Remove stub macros.
6857 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
6858 (div2): Don't use addc/subc.
6860 1998-12-11 Doug Evans <devans@casey.cygnus.com>
6862 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
6865 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
6867 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
6869 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
6871 * cpu.scm (keep-all?): New proc.
6872 (assert-keep-all): Use it.
6873 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
6874 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
6875 Check for spelling errors.
6877 1998-12-09 Doug Evans <devans@casey.cygnus.com>
6879 * rtl.scm (s-convop): Call -rtx-sem-mode.
6881 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
6883 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
6884 (-parse-hw-profile): Ditto.
6885 (<hw-register>, parse!): Return `void' result.
6886 (<hw-pc>, parse!): Ditto.
6887 (<hw-memory>, parse!): Ditto.
6888 (<hw-immediate>, parse!): Ditto.
6889 (<hw-address>, parse!): Ditto.
6891 * ifield.scm (-ifield-parse): Validate encode/decode fields.
6892 (-ifld-parse-encode-decode): New proc.
6893 (-ifld-parse-encode,-ifld-parse-decode): New proc.
6894 (-multi-ifield-parse): Set encode/decode to #f.
6895 (ifld:decode-mode): New proc.
6896 * utils.scm (nub): Rewrite.
6897 * operand.scm (op-nub): Rewrite.
6898 * sim.scm (<ifield>, gen-type): Rewrite.
6899 (-gen-ifld-argbuf-defn): New proc.
6900 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
6901 (<sim-hardware>): Forward gen-trace-extract onto `type'.
6902 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
6903 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
6904 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
6905 New method gen-trace-extract.
6906 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
6907 from gen-argbuf-elm, return "" if not caching register address.
6908 Rewrite gen-extract. New method gen-trace-extract.
6909 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
6910 gen-extract, gen-trace-extract, cxmake-get.
6911 (<hw-iaddress>): New method cxmake-get.
6912 (op-needed-iflds): New proc.
6913 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
6914 (-gen-op-argbuf-defn): New proc.
6915 (gen-op-extract): Renamed from op:extract.
6916 (gen-op-trace-extract): Renamed from op:trace-extract.
6917 (fmt-extractable-operands): Renamed from fmt-semantic-operands
6919 (gen-argbuf-elm): Rewrite.
6920 * sim-decode.scm (-gen-record-args): Update.
6922 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
6924 * pmacros.scm (-pmacro-expand): Handle procedural macros in
6925 argument position. Flag symbolic macros in function position as
6927 (define-pmacro): Handle quoting in definition of symbolic macros.
6928 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
6930 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
6932 * fr30.opc (parse_register_list): Account for reverse masks
6934 (print_register_list): Ditto.
6935 (parse_low_register_list_ld): New function.
6936 (parse_hi_register_list_ld): New function.
6937 (parse_low_register_list_st): New function.
6938 (parse_hi_register_list_st): New function.
6939 (print_hi_register_list_ld): New function.
6940 (print_hi_register_list_st): New function.
6941 (print_low_register_list_ld): New function.
6942 (print_low_register_list_st): New function.
6943 * fr30.cpu (ldr15dr): Implement workaround.
6944 (ldm0,ldm1,stm0,stm1): Implemented.
6946 1998-12-08 Doug Evans <devans@casey.cygnus.com>
6948 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
6949 * configure: Regenerate.
6950 * Makefile.am (WITH_HOBBIT): Update.
6951 (cgen-hob.c): Remove Makefile dependency.
6952 (cgen.o): Depend on cgen-gh.h, config.h.
6953 * Makefile.in: Regenerate.
6954 * aclocal.m4: Regenerate.
6956 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
6958 * i960.cpu, i960.opc: New files.
6960 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
6962 * fr30.opc (parse_register_number): New function.
6963 (parse_register_list): New function.
6964 (parse_low_register_list): Use parse_register_list.
6965 (parse_hi_register_list): Use parse_register_list.
6966 * fr30.cpu (sth): Fix assembler syntax. Implement more
6969 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
6971 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
6972 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
6973 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
6974 (-op-gen-set-trace-parallel): Ditto.
6975 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
6977 * fr30.cpu (call,calld): Fix setting of pc.
6978 (f-op5): Fix start bit number.
6980 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
6982 * fr30.cpu (st): Fix operand ordering. Implement more
6985 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
6987 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
6988 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
6989 (fmt-semantic-operands): Move to sim.scm.
6990 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
6991 * operand.scm (<hw-index>): New member `name'. All builders updated.
6992 (<hw-index>): New method get-name.
6993 (op-profilable?): Moved to sim.scm.
6995 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
6996 (op-profilable?): Moved here from operand.scm.
6997 (gen-extract-type): Delete.
6998 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
6999 (-gen-argfld-ref): New proc.
7000 (-gen-ifld-argfld-name): New proc.
7001 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7002 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7003 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7004 (<hardware-base>): Delete method gen-extract-type. New method
7006 (<hw-register): Ditto. Update method gen-extract.
7007 (<operand>, method gen-argbuf-elm): Rewrite.
7008 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7009 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7010 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7012 * sim-decode.scm (-gen-record-args): Tweak.
7014 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7016 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7018 * doc/porting: Fix typo: gas->sim.
7019 * fr30.opc (print_m4): New function.
7020 * fr30.cpu: Implemented many insns.
7022 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7024 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7026 * fr30.cpu (f-rel9): Delete RELOC attribute.
7027 (f-rel12): Add PCREL-ADDR attribute.
7028 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7029 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7030 * fr30.opc (print_label9): Delete.
7032 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7033 code for CTI indicators.
7034 * insn.scm (insn-cti?): Simplify.
7035 * utils-cgen.scm (atlist:cti?): New proc.
7037 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7039 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7040 (f-i20-4,f-i20-16,f-i20): New fields.
7046 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7047 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7048 * mach.scm (arch-data): Ditto.
7049 (current-arch-default-insn-word-bitsize): Renamed from
7050 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7051 (-arch-read): Update.
7053 * hardware.scm (hw:attr-list): Move here ...
7054 * opcodes.scm: ... from here.
7056 * ifield.scm (fld:bitrange): Delete.
7057 (fld:word-offset,fld:word-length): New procs.
7058 (ifield?): Use class-instance.
7059 (<ifield>, method field-start): Rewrite.
7060 (ifld:enum): New proc.
7061 (<ifield>, methods field-mask,field-value): Rewrite.
7062 (-ifield-parse): Rewrite.
7063 (<multi-ifield> support): Rewrite.
7064 (ifld-beyond-base?): Rewrite.
7065 (ifld:std-attrs): New variable.
7066 (ifld:attr-list): New proc.
7067 * iformat.scm (-compute-insn-mask): Rewrite.
7068 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7070 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7071 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7073 (<operand>): Ditto. Forward onto index instead.
7074 (gen-ifld-decls,gen-ifld-defns): New procs.
7075 (ifld:insert,ifld:extract): New procs.
7076 (<ifield>): New methods gen-insert, gen-extract.
7077 (<multi-ifield>): Ditto.
7078 (<hw-index>): Forward gen-insert,gen-extract onto value.
7079 (<hw-asm>): Delete insert/extract support.
7080 (<hw-register,hw-memory,hw-immediate>): Ditto.
7081 (gen-hash-defines): Use string-list.
7082 Define CGEN_MAX_IFMT_OPERANDS.
7083 (gen-switch): Use string-list,string-list-map.
7084 (gen-fget-switch,gen-fset-switch): Use string-list.
7085 (gen-parse-switch,gen-insert-switch): Ditto.
7086 (gen-extract-switch,gen-print-switch): Ditto.
7087 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7088 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7089 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7090 (gen-ivalue-entry): New proc.
7091 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7092 computation. Use 0 for operand ref table if ALIAS insn.
7093 (gen-minsn-table-entry): Use string-list.
7094 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7095 (gen-opcode-open): Record address of ifield table.
7096 (cgen-opc.h): Call gen-ifld-decls.
7097 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7098 * types.scm (<bitrange>): New members word-offset,word-length.
7099 Delete member total-length. Delete methods start,mask,value.
7100 (bitrange:word-offset,bitrange:word-length): New procs.
7101 * sim-cpu.scm (gen-define-fields): Simplify.
7102 (gen-extract-fields): Simplify.
7103 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7104 (<ifield>): New methods gen-ifld-extract-decl.
7105 Delete method gen-ifld-extract-beyond.
7106 (<multi-ifield>): New methods gen-ifld-extract-decl.
7107 (<multi-ifield>, method gen-ifld-extract): Implement.
7108 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7109 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7111 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7112 (-rtx-traverse-syntax-no-mode): New proc.
7113 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7114 (s-ifield): New proc.
7115 (s-shop): Don't prepend `unsigned' for unsigned modes.
7116 * rtx-funcs.scm (ifield): New rtx function.
7117 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7118 (delay): New rtx function.
7119 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7121 * cos.scm (-elm-make-method-getter): Fix typo.
7123 * utils.scm (backslash): Handle lists of strings.
7125 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7127 * fr30.cpu (f-rel9): Correct for pc+2.
7128 (label9): Use print_label9.
7129 * fr30.opc (print_label9): New function.
7131 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7133 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7134 * fr30.opc (parse_low_register_list): Renamed.
7135 (parse_hi_register_list): Renamed.
7136 (print_hi_register_list): Renamed.
7137 (print_low_register_list): Renamed.
7139 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7141 * fr30.cpu (f-rel9): Now a pc relative offset.
7143 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7145 * opcodes.scm (op-asm): Move to here, from operands.scm.
7146 (<op-asm>, method parse!): Validate arguments.
7147 (<operand>, method gen-function-name): Fix thinko.
7148 * operand.scm (<operand>, method make!): Don't set op-asm here.
7149 * utils.scm (list-elements-ok?): New proc.
7151 * opcodes.scm: Clean up pass.
7153 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7155 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7156 the fr30_int function.
7157 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7158 (h-dr): Add FUN-ACCESS attribute.
7160 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7162 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7163 for C symbol for models array.
7165 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7167 * fr30.opc (parse_reglist_low): New function.
7168 (parse_reglist_hi): New function.
7169 (print_reglist_low): New function.
7170 (print_reglist_hi): New function.
7171 * fr30.cpu: Finish remaining insn stubs.
7173 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7175 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7177 * fr30.cpu (ldi32m): Don't use for disassembly.
7179 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7181 * fr30.cpu (int): Implement it.
7183 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7185 * rtx-funcs.scm (nop): Fix C code.
7187 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7189 * fr30.cpu (f-i32): New ifield.
7192 (ldi32m): New macro insn.
7193 (inte): Provide simple version for now.
7195 * sim-arch.scm: New file.
7196 * sim.scm: Move architecture support generation to sim-arch.scm.
7197 * cgen-sim.scm: Load sim-arch.scm.
7200 * hardware.scm (pc?) New proc.
7201 (class <hardware-base>): Rewrite method 'pc?.
7202 (class <hardware>): Forward 'pc? to the hardware type.
7203 (class <hw-pc>): New method 'pc?.
7205 Add support for variable length ISAs.
7206 * ifield.scm (ifld-beyond-base?): New proc.
7207 * m32r.cpu: Remove integral-insn? spec.
7208 * mach.scm (arch:derived,arch:set-derived!): New procs.
7209 (arch:app-data,arch:set-app-data!): New procs.
7210 (class <arch>): New members derived, app-data.
7211 (class <cpu>): Delete member integral-insn?.
7212 (cpu:integral-insn?): Delete.
7213 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7214 (-cpu-read): Delete integral-insn? support.
7215 (state:decode-assist): Delete.
7216 (state:int-insn?): Delete.
7217 (<derived-arch-data>): New class.
7218 (-adata-set-derived!): New proc.
7219 (mach-finish!): Call it.
7220 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7221 (gen-operand-instance): Add COND_REF support.
7222 (gen-operand-instance-table): Ditto.
7223 (gen-hash-defines): Update.
7224 (gen-extract-switch): Update type of `insn_value' arg.
7225 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7226 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7228 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7229 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7230 beyond the base insn (for large insns).
7231 (-gen-extract-beyond-var-list): New proc.
7232 (gen-extract-fields): Handle large insns.
7233 (-gen-write-case): Update sem_arg computation.
7234 Update initial vpc computation.
7235 (gen-semantic-fn): Ditto. Update type of `insn'.
7236 (-gen-sem-case): Update sem_arg computation.
7237 Update initial vpc computation.
7238 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7239 (-gen-extract-word): New proc.
7240 (<ifield>): New method gen-ifld-extract-beyond.
7241 (gen-ifld-extract-beyond): New proc.
7242 * types.scm (bitrange-overlap?): New proc.
7244 * utils.scm (bits->bytes): New proc.
7245 (bytes->bits): New proc.
7247 Move extraction support into decoder.
7248 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7249 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7250 support to sim-decode.scm.
7251 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7252 be array of IDESC,FMT entries. Make the array const.
7253 (-gen-gcc-label-table): Make array const.
7254 (-gen-decode-switch): Branch to extraction code after insn has been
7256 (-gen-decode-insn-globals): Delete extract handler from
7258 (gen-decode-fn): Add extraction support.
7259 (-gen-sem-fn-decls): Delete extraction fn decls.
7260 (-gen-idesc-decls): Update @cpu@_decode decl.
7261 (-gen-idesc-init-fn): Delete extraction support.
7262 (-gen-extract-decls): New proc.
7264 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7265 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7267 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7268 All callers updated.
7269 (table-entry:make): Record insn value as insn object, not name.
7272 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7273 collision with C function.
7274 (path_dirname): Similarily.
7275 * hobbit.c,hobbit.h: Rebuild.
7277 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7279 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7281 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7283 * fr30.cpu: Implement more instruction stubs.
7285 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7287 * fr30.cpu: Implement more instruction stubs.
7289 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7291 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7293 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7295 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7296 (op:std-attrs): Ditto.
7297 * opcodes.scm (gen-operand-instance): Ditto.
7298 (gen-switch): Ditto.
7299 * m32r.cpu (condbit,accum): Update.
7300 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7302 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7304 * enum.scm (-enum-read): Fix typo.
7306 * iformat.scm (-ifmt-search-key): Simplify a little.
7308 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7310 * doc/porting: semantics.c -> sem.c.
7311 * Makefile.in: Regenerate.
7312 * fr30.cpu (add): Change ADD to add. Add more registers and set
7313 status bits on 'add' instruction.
7315 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7317 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7320 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7322 * minsn.scm (minsn:enum): Update, call current-arch-name.
7324 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7326 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7327 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7328 (ARCH,CGEN,CGENFLAGS): New variables.
7329 (gas-test,sim-test): New rules.
7330 * Makefile.in: Rebuild.
7331 * configure.in (arch): Define.
7332 * configure: Rebuild.
7334 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7335 * All .scm files: Ditto.
7337 * dev.scm: Fix gas-test call to cpu-load.
7338 * gas-test.scm: Clean up pass to remove bit-rot.
7339 * sim-test.scm: Ditto.
7341 * enum.scm (read-enum): Fix typo in `vals' handling.
7343 * hardware.scm (-parse-hw-type): Fix typo.
7344 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7345 (def-hardware,define-normal-hardware): Ditto.
7347 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7348 (display-var): Use it.
7349 * hobbit.c: Rebuild.
7350 * hobbit.h: Rebuild.
7352 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7353 avoid hobbit problem.
7354 * mach.scm (-cpu-read): Rename local `parallel-insns' to
7355 `parallel-insns-' to avoid hobbit problem.
7357 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
7359 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7360 (parse_slo16,parse_ulo16): Ditto.
7361 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7363 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
7365 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7366 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7367 * Makefile.in: Rebuild.
7368 * insn.scm (define-normal-insn): Expand pmacros.
7369 * mode.scm (<mode>): New member `host?'. All uses updated.
7370 (mode:host?): New proc.
7371 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7372 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7373 (define-rtx-dual-mode): Ditto.
7374 (s-index-of): New proc.
7375 (s-unop): Use plain C for host mode operations.
7376 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7377 * rtx-funcs.scm (index-of): New rtx function.
7378 * sim.scm (<hw-index>): New method cxmake-get.
7380 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
7382 * sim-cpu.scm (-gen-engine-decls): Delete.
7384 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
7386 * doc/rtl (Example): Correct Typo.
7387 * doc/porting: Add 'make dep' step to opcodes port instructions.
7388 * fr30.opc: New file.
7389 * fr30.cpu: New file.
7391 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
7393 * configure.in: Handle guile $exec_prefix = $prefix/foo.
7394 * Makefile.am (GUILEINCDIR): New variable.
7396 * configure: Regenerate.
7397 * Makefile.in: Ditto.
7398 * aclocal.m4: Ditto.
7400 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
7402 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7403 (cgen-semantics.c): Ditto.
7404 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7405 * sim-model.scm (cgen-model.c): Ditto.
7406 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7407 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7409 * opcodes.scm (read-cpu.opc): Handle empty file.
7411 * cos.scm (-elm-make-method-setter): Fix typo.
7413 * cpu.scm (-init-parse-cpu!): Call types-init!.
7414 (-finish-parse-cpu!): Call types-finish!.
7415 * ifield.scm (<ifield>): Delete members start,length.
7416 New member bitrange.
7417 (<ifield>, methods field-start,field-length): Update.
7418 (fld:start): New arg insn-len. All callers updated.
7419 (<ifield>, methods field-mask,field-value): Update.
7420 (-ifield-parse): Update.
7421 (ifield-init!): Update.
7422 * iformat.scm (compute-insn-length): Simplify.
7423 (compute-insn-mask): Update.
7424 * insn.scm (insn:value): Update.
7425 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7426 (current-arch-default-insn-bitsize): New proc.
7427 (current-arch-insn-lsb0?): New proc.
7428 (-arch-parse,-arch-read): Update.
7429 (<cpu>): New member file-transform.
7430 (-cpu-parse,-cpu-read): Update.
7431 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7432 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7433 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7434 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7435 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7436 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7437 * operand.scm (op:start): Update call to field-start method.
7438 * sim-decode.scm (opcode-slots): New arg lsb0?.
7439 (fill-slot!,build-slots): Ditto.
7440 (build-decode-table-entry,build-decode-table-guts): Ditto.
7441 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7442 (gen-decode-fn): Ditto.
7443 (cgen-decode.c): Update call to gen-decode-fn.
7444 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7445 (-gen-cpu-header,-gen-cpuall-includes): New procs.
7446 (cgen-cpuall.h): Call -gen-cpuall-includes.
7447 * types.scm (<bitrange>): New class.
7448 (types-init!,types-finish!): New procs.
7449 * utils-cgen.scm (parse-number): New proc.
7450 (parse-boolean): New proc.
7451 * utils.scm (word-value): Renamed from shift-bits, rewrite.
7452 (word-mask): Rewrite.
7453 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7454 (m32rxf): New field `file-transform'.
7455 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7457 * hobbit.h: Fix include file name.
7459 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
7461 * slib: New directory of slib files used by cgen/hobbit.
7462 * hobbit.scm: New file.
7463 * hobbit.c: New file.
7464 * hobbit.h: New file.
7465 * hobscmif.h: New file.
7466 * hob-main.c: New file.
7467 * hobslib.scm: New file.
7469 * Makefile.am: Add support for compiling hobbit, and using compiled
7470 version of hobbit to compile cgen.
7471 * Makefile.in: Regenerate.
7472 * configure.in: Support --with-hobbit.
7473 * configure: Regenerate.
7474 * acconfig.h (WITH_HOBBIT): Add.
7475 * config.in: Regenerate.
7477 * rtl.scm: New file, was cdl-c.scm.
7478 Definition of rtx funcs moved to rtx-funcs.scm.
7479 (semantic-in-out-operands): Rewrite to compute object form of
7481 * rtx-funcs.scm: New file.
7483 * cgen-gh.c: #include "config.h".
7484 (gh_cadddr,gh_cddddr): New fns.
7485 (cgh_vector_to_list): New fn.
7486 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7487 (cgh_init): Prefix qsort procs with "cgh-".
7488 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7489 * cgen.c: #include "config.h".
7491 * attr.scm (bitset-attr?): New proc.
7492 (<bitset-attribute>, method parse-value): Value syntax changed from
7493 (val1 val2 ...) to val1,val2,....
7494 (<bitset-attribute>): New method gen-value.
7495 (<integer-attribute>): New method gen-value.
7496 (<enum-attribute>): New method gen-value.
7497 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7498 (<reader>): New class.
7499 (CURRENT-ARCH,CURRENT-READER): New globals.
7500 (keep-mach?): Move here from mach.scm.
7501 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7502 (<arch>): New class.
7503 (<arch-data>): New class.
7504 (<cpu>): Make subclass of <ident>.
7505 (*ENDIAN* variables): Delete.
7506 (process-state-vars): Delete.
7507 (mach-finish!): Add `base' value to MACH attribute.
7508 * hardware.scm (<hardware>): Make subclass of <ident>.
7509 (hw:std-attrs): New global.
7510 (hw-profilable?): New proc.
7511 * ifield.scm (<ifield>): Make subclass of <ident>.
7512 (sort-ifield-list): Move here from iformat.scm.
7513 * iformat.scm (<iformat>): Renamed from <insn-format>.
7514 Make subclass of <ident>.
7515 (-ifmt-search-key): Include cti? in categorization of formats.
7516 (ifmt-analyze): Compile semantics (turn to object form).
7517 * insn.scm (<insn>): Make subclass of <ident>.
7518 New member compiled-semantics.
7519 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7520 * mode.scm (<mode>): Make subclass of <ident>.
7522 * model.scm (<unit>): Make subclass of <ident>.
7523 New members inputs,outputs.
7524 (<model>): Make subclass of <ident>. New member state.
7525 (-unit-parse): Parse inputs,outputs.
7526 (<iunit>): New class.
7527 (-insn-timing-parse-model): New proc.
7528 (parse-insn-timing): Function unit spec rewritten.
7529 * operand.scm (<operand>): Make subclass of <ident>.
7530 New members sem-name,num,cond? New method gen-pretty-name.
7531 (hw-index-scalar): New global.
7532 (op-nub-hw): Move here from rtl.scm.
7533 (op:lookup-sem-name,op-profilable?): New procs.
7534 * pmacros.scm: Rewrite to pass through hobbit.
7535 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7536 * utils.scm (logit): Make a macro.
7537 (bit-set?): Rewrite.
7538 (high-part): Rewrite.
7540 * m32r.cpu (define-arch): Move to top of file.
7541 (cpu family m32rbf): Renamed from m32rb.
7542 (model m32r/d): Function unit spec rewritten.
7543 (all insns): Ditto. Replace UBI with BI.
7545 * opcodes.scm (gen-attr-table-decls): Declare
7546 @arch@_cgen_hw_attr_table.
7547 (gen-attr-table-defns): Generate hw attribute table.
7549 * sim-cpu.scm (-gen-engine-decls): New proc.
7550 (-gen-model-decls): New proc.
7551 (gen-parallel-exec-type): Add new member `written' to struct parexec.
7552 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7553 (-gen-record-profile-args): Simplify.
7554 (-gen-parallel-sem-case): Delete.
7555 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7556 New local `written'. Delete profiling code.
7557 (-gen-sem-case): Ditto.
7558 (-uncond-written-mask,-any-cond-written?): New procs.
7559 (cgen-sem-switch.c): Include duplicates of insns that can be executed
7560 parallelly or serially, and write-back handlers for all parallel insns.
7561 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7562 support to initialization of struct insn_sem.
7563 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7564 (-gen-insn-sem-type): Add parallel write-back support to struct
7566 (-gen-idesc-init-fn): Add support for virtual insns.
7567 Add parallel write-back support.
7568 * sim-model.scm (gen-model-profile-fn): Delete
7569 (-gen-model-fn-decls): New proc.
7570 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7571 (-gen-model-init-fn): New proc.
7572 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7573 members in @mach@_init_cpu.
7574 (cgen-model.c): Generate model handlers for each insn.
7575 * sim.scm (gen-define-field-macro): Cti insns handled differently.
7576 (<hw-pc>): New method gen-write.
7577 (<hw-register>, method gen-write): New arg `mode'.
7578 (<hw-register>): Delete method gen-record-profile!.
7579 New method gen-profile-index-type.
7580 (<hw-memory>, method gen-write): New arg `mode'.
7581 (<hw-address>, method gen-extract): Delete.
7582 (<hw-address>, method gen-write): New arg `mode'.
7583 (<hw-index>, method get-write-index): Rewrite.
7584 (<pc>, method cxmake-get-direct): Delete.
7585 (<pc>): New method cxmake-get. Comment out methods
7586 gen-set-quiet,gen-set-trace.
7587 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7588 gen-profile-index-type,gen-profile-code.
7589 Delete method gen-pretty-name. Rewrite method gen-write.
7590 Delete method cxmake-get-direct.
7591 (-op-gen-set-trace): Update `written'.
7592 (-op-gen-set-trace-parallel): Ditto.
7593 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7594 (gen-cpu-insn-enum-decl): Add extra entries for parallel
7595 insns and their write-back handlers.
7596 (insn-op-lookup): New proc.
7597 (<unit>): New method gen-profile-code.
7598 (<iunit>): New method gen-profile-code.
7599 (gen-argbuf-elm): Add profiling elements.
7600 (gen-argbuf-type): Define cti insns separately in their own struct.
7601 Add member `addr_cache' to this struct. Add entries for pbb virtual
7602 insns. Move semantic entries here from struct scache.
7603 Delete everything from struct scache except argbuf.
7604 (<insn>, method gen-profile-locals): Rewrite.
7605 (<insn>, method gen-profile-code): Rewrite.
7606 (sim-finish!): Create virtual pbb insns.
7608 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
7610 * m32r.cpu (h-cr): Add bbpc,bbpsw.
7611 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7612 (h-psw,h-bpsw,h-bbpsw): Define.
7613 (rte,trap): Handle bbpc,bbpsw.
7614 * opcodes.scm (max-operand-instances): Fix typo.
7615 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7616 hardware elements to be fun-access.
7617 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7619 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
7621 * m32r.cpu (trap): Pass `pc' to m32r_trap.
7623 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
7625 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7627 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
7629 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7631 (mach m32r): Update.
7633 * mach.scm (mach:supports?): New proc.
7634 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7635 gen-reg-access-{decls,defns}.
7636 * sim.scm (gen-reg-access-{decl,defn}): New procs.
7637 (gen-mach-bfd-name): New proc.
7638 (gen-arch-reg-access-{decls,defns}): New procs.
7639 (cgen-arch.[ch]): Output register access cover fns.
7641 * hardware.scm (hardware-builtin!): Set print handlers for
7643 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7645 (CGEN_PRINT_NORMAL,print_hash): Ditto.
7646 (my_print_insn): Ditto. Delete args buf, buflen.
7647 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7648 (-hw-asm-specs): Add `handlers' spec.
7649 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
7651 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
7653 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7654 (<hw-asm>, parse!): New method.
7655 (gen-insn-table-entry): Print semantics.
7656 (gen-opcode-open): Renamed from gen-opcode-table.
7658 * utils.scm (string-write): No longer a macro.
7659 (-string-write): Handle procedure args.
7660 * opcodes.scm: Update all calls to string-write.
7661 * sim-cpu.scm: Ditto.
7662 * sim-decode.scm: Ditto.
7663 * sim-model.scm: Ditto.
7666 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
7668 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7669 (-gen-insn-builders,-gen-insn-builder): New procs.
7671 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
7673 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7674 (gen-opcode-table): Properly terminate comment.
7676 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
7679 Clean up pass over everything, so starting fresh.