1 2009-08-22 Doug Evans <dje@sebabeach.org>
3 * NEWS: Copy over entries from 1.1 branch.
5 2009-08-20 Doug Evans <dje@sebabeach.org>
7 * gas-test.scm (<keyword> test-data): Catch invalid requests,
8 flag a warning and compensate.
9 (<hw-address test-data): Tweak for readability.
10 (<hw-iaddress test-data): Ditto.
11 (cgen-build.sh): Convert symbols to strings before passing to
13 (cgen-allinsn.exp): Ditto.
15 * doc/pmacros.texi (.splice): Add more text.
17 2009-08-19 Doug Evans <dje@sebabeach.org>
19 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
21 * configure: Regenerate.
22 * read.scm (-CGEN-VERSION): Update.
23 * doc/version.texi: Update.
26 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
27 (pmacros-init!): Add .pmacro?.
28 * doc/pmacros.text: Document .pmacro?.
29 * testsuite/pmacros-1.test: Test .pmacro?.
31 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
32 of a pmacro begins before its arguments are evaluated, improves
35 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
36 * testsuite/pmacros-1.test: Ditto. Add better tests.
38 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
40 (Operands): Similarly.
42 2009-08-18 Doug Evans <dje@sebabeach.org>
44 * ifield.scm (ifld-encode-mode): Add FIXME.
45 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
47 (<ifield> gen-extract): Similarly.
49 * read.scm (parse-error): Handle #f for context-location.
50 * utils-cgen.scm (unspecified-location): Fix building of
53 * doc/rtl.texi: Document how to write hex and boolean values.
55 * gas-test.scm (<hw-asm> test-data): Handle () values.
56 (<keyword> test-data): Convert symbols to strings before passing
58 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
61 * operand.scm (hw-index-scalar): Set `name'.
62 (hw-index-anyof, hw-index-derived): Ditto.
64 2009-08-17 Doug Evans <dje@sebabeach.org>
66 * pmacros.scm (-pmacro-builtin-internal-test): New function.
67 (pmacros-init!): Add .internal-test.
68 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
69 * testsuite/testsuite.cpu (internal-verify): New pmacro.
70 * doc/pmacros.text: Document .internal-test.
72 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
73 (parse-comment): Allow numbers.
74 * doc/porting.texi: Document that names and comments may be lists.
76 * insn.scm (-insn-parse): Fix typo.
78 Rename .eval -> .exec. Add new .eval.
79 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
80 (-pmacro-builtin-eval): New function.
81 (pmacros-init!): Add .exec.
82 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
83 * testsuite/location-1.test: Update.
84 * testsuite/pmacros-1.test: Add test for .eval.
86 2009-08-16 Doug Evans <dje@sebabeach.org>
88 * doc/porting.texi: Remove support for Guile 1.4.
90 * read.scm (current-reader-location): Return unspecified location
91 if reader hasn't been initialized yet.
93 2009-08-13 Doug Evans <dje@sebabeach.org>
95 * dev.scm: Document tracing options.
97 * pmacros.scm (pmacro-dump): New function.
98 (check-pmacro): Tweak debugging output.
99 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
100 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
102 Add .let* pmacro builtin.
103 * pmacros.scm (-pmacro-builtin-let*): New function.
104 (pmacros-init!): Add .let*.
105 * doc/pmacros.texi: Document .let*.
106 * testsuite/pmacros-1.test: Test .let*.
108 2009-08-12 Doug Evans <dje@sebabeach.org>
110 Clean up cpu file parsing, pass context consistently instead of the
111 old "errtxt" argument.
112 NOTE: ACU == "All Callers Updated".
113 * attr.scm (-parse-simple-attribute): Renamed from
114 parse-simple-attribute, ACU.
115 (-attr-parse): Change errtxt argument to context, ACU.
117 (atlist-parse): Ditto. Put context arg first.
118 (attr-parse): Use parse-error instead of context-error.
119 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
120 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
121 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
122 `context' arg is now a <context> object. ACU.
123 (-keyword-read): `context' arg is now a <context> object. ACU.
124 (-hw-parse-indices): Change errtxt argument to context, ACU.
125 (-hw-parse-values, -hw-parse-handlers): Ditto.
126 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
127 (-hw-validate-layout, -hw-create-getter-from-layout,
128 -hw-create-setter-from-layout): Ditto.
129 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
130 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
131 (<hw-address>:parse!): Ditto.
132 * ifield.scm (-ifield-parse, ifield-read): Ditto.
133 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
134 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
135 (-multi-ifield-parse, -multi-ifield-read): Ditto.
136 * insn.scm (-insn-parse, -insn-read): Ditto.
137 (parse-syntax): Ditto. Put context arg first.
138 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
139 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
140 (-parse-insn-format): Ditto.
141 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
142 (-arch-parse-isas): Ditto.
143 (-isa-read): Add context arg, ACU.
144 (-cpu-parse, -cpu-read, -mach-read): Ditto.
145 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
147 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
148 (minsn-make-alias): Ditto.
149 * mode.scm (-mode-parse): Ditto.
150 (parse-mode-name): Ditto. Put context arg first.
151 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
152 errtxt argument to context, ACU.
153 (-unit-parse, -model-parse, -model-read): Ditto.
154 * operand.scm (-operand-parse-getter): Use parse-error instead of
156 (-operand-parse-setter): Ditto.
157 (-operand-parse): Change errtxt argument to context, ACU.
158 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
159 (-anyof-operand-parse, -anyof-operand-read): Ditto.
160 * read.scm (reader-error): Delete. Use parse-error instead.
161 (parse-error): Change errtxt argument to context, ACU. Split args
162 argument into expr and maybe-help-text.
163 (-reader-process-expanded-1!): Reorganize.
164 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
165 * types.scm (parse-type): Ditto.
166 * utils-cgen.scm (single-location->simple-string): New function.
167 (<context>): Replace members file,lineno with location.
168 (make-prefix-context): Renamed from context-make-prefix, ACU.
169 (make-current-context): New function.
170 (context-append, context-append-name): New functions.
171 (context-make-reader): Delete.
172 (parse-name): Change errtxt argument to context, ACU.
173 Put context arg first.
174 (parse-comment): Ditto.
175 (parse-number): Change errtxt argument to context, ACU.
176 (arg-list-validate-name, arg-list-check-no-args,
177 arg-list-symbol-arg): Ditto.
179 * read.scm (-cmd-if): Don't assume test is a list.
181 * html.scm (get-insn-properties): Delete errtxt, unused.
183 2009-08-11 Doug Evans <dje@sebabeach.org>
185 * doc/rtl.texi (hardware types): Add pc.
187 2009-08-07 Doug Evans <dje@sebabeach.org>
189 Add -t option for tracing things like commands, pmacro expansion.
190 * dev.scm (cload): New arg #:trace.
191 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
192 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
193 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
194 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
195 (-reader-process-expanded-1!): Trace commands if requested.
196 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
197 (-set-trace-options!): New function.
198 (-init-reader!): New function.
199 (cpu-load): New arg trace-options, all callers updated.
200 Call -init-reader! and -set-trace-options!.
201 (cgen-usage): Improve output formatting.
202 (common-arguments): New option -t.
204 * utils-cgen.scm (single-location->string): Renamed from
205 pretty-print-single-location. All callers updated.
206 (location->string): Renamed from pretty-print-location.
208 (source-properties-location->string): New function.
209 * doc/running.texi: Document -t.
211 2009-08-06 Doug Evans <dje@sebabeach.org>
213 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
214 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
215 * utils.scm: ... here.
217 2009-08-05 Doug Evans <dje@sebabeach.org>
219 Track source location better, for better error messages.
220 * pmacros.scm (-pmacro-eval): Delete, unused.
221 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
222 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
223 (scan-list, scan): Ditto.
224 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
225 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
226 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
227 (scan-list1): New function.
228 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
229 * read.scm (<reader>): New member `location'.
230 (-reader-lookup-command): Renamed from reader-lookup-command,
232 (reader-error): Rewrite to produce better source location info.
233 (current-reader-location): New function.
234 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
235 All callers updated. Record source location of expression.
236 (reader-process-expanded!): Renamed from reader-process-expanded.
238 (-reader-process!): Renamed from reader-process. New arg `loc'.
239 All callers updated. Record source location of define-pmacro.
240 * utils-cgen.scm (<location>): New class.
241 (single-location): New (pseudo) class.
242 (pretty-print-single-location, pretty-print-location): New functions.
243 (location-top, location-push-single, location-push): New functions.
244 (unspecified-location, current-input-location): New functions.
245 (location-property): New object property.
246 (location-property-set!): New function.
247 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
249 * testsuite/location-1.test: New testcase.
250 * testsuite/run-tests.sh: Fix fail count handling.
251 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
252 to expect cgen to fail.
254 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
256 * read.scm (-cmd-include): Renamed from include. All callers updated.
257 (-cmd-if): Renamed from cmd-if. All callers updated.
258 Use reader-process-expanded! on then/else clauses instead of eval1.
260 2009-07-22 Doug Evans <dje@sebabeach.org>
262 * modes.scm (TI,OI): New modes.
263 * types.scm (parse-type): Improve error checking. Don't hardwire
265 * utils.scm (non-negative-integer?): New function.
267 * pmacros.scm (-pmacro-builtin-find): New predicate.
268 (pmacros-init!): Add .find.
269 * doc/pmacros.tex: Document .find.
270 * testsuite/pmacros-1.test: Test .find.
272 2009-07-20 Doug Evans <dje@sebabeach.org>
274 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
275 commented out printfs.
276 * rtl.scm (rtl-finish!): Whitespace tweaks.
277 * model.scm (parse-insn-timing): Tweak logging message.
278 * operand.scm: Comment and whitespace tweaks.
279 (op:type): Tweak error message.
280 (op-ifield): Tweak logging message.
281 (-derived-operand-parse, anyof-merge-semantics): Ditto.
282 * read.scm: Whitespace cleanup.
283 * utils.scm: Whitespace cleanup.
285 2009-07-19 Doug Evans <dje@sebabeach.org>
287 Fix binding of nested pmacro parameters.
288 * pmacros.scm (-pmacro-env-make): New arg prev-env.
290 (-pmacro-bulid-lambda): Ditto.
291 * doc/pmacros.texi: Update.
292 * testsuite/pmacros-1.test: Add testcase.
294 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
296 (-multi-ifield-make-default-extract): Ditto.
298 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
299 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
300 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
302 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
303 * doc/rtl.texi: Update.
305 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
307 Rename builtin boolean pmacros, for consistency with rtl.
308 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
309 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
310 * doc/pmacros.texi: Update.
311 * testsuite/pmacros-1.test: Update.
313 2009-07-17 Doug Evans <dje@sebabeach.org>
315 Use hash tables to record ifields, operands, insns, macro-insns.
316 * attr.scm (attr-builtin!): Tweak some comments.
317 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
318 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
320 (<multi-ifield>): New constructor.
321 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
322 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
324 (-sub-insn-make!): Add hack to avoid differences in generated code.
325 (multi-insn-instantiate!): Add total number of multi-insns to
327 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
328 minsn-list to foo-table. New member next-ordinal.
329 Update getters/setters.
330 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
332 (-get-next-ordinal!, -get-lowest-ordinal): New function.
333 (-make-ident-object-table, -ident-object-table->list,
334 -ident-object-table-add!, -ident-object-table-lookup): New functions.
335 (current-ifld-list, current-ifld-add! current-ifld-lookup,
336 -ifld-already-defined?): Rewrite.
337 (current-op-list, current-op-add! current-op-lookup,
338 -op-already-defined?): Rewrite.
339 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
340 (current-insn-list, current-insn-add! current-insn-lookup,
341 -insn-already-defined?): Rewrite.
342 (current-minsn-list, current-minsn-add! current-minsn-lookup,
343 -minsn-already-defined?): Rewrite.
344 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
345 (MAX-VIRTUAL-INSNS): Define.
346 (arch-analyze-insns!): Add hack to avoid differences in generated code.
347 Update use of arch-insn-list.
348 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
349 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
351 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
352 <ident>. New constructor.
353 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
355 * sid.scm (-virtual-insn-add!): New function.
356 (-create-virtual-insns!): Call it.
357 (-fill-sim-insn-list!): Rewrite.
358 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
359 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
360 * utils-cgen.scm (<ordered-ident>): New class.
361 (obj-ordinal, obj-set-ordinal!): New functions.
362 (add-ident-methods!): Delete.
364 * model.scm (parse-insn-timing): Change logging message to level 3.
366 2009-07-16 Doug Evans <dje@sebabeach.org>
368 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
369 add a link to define-normal-insn-enum.
371 * doc/porting.texi (Conventions): Add docs on writing integers.
373 * cpu/simplify.inc (*): One line doc strings don't need \n.
374 (df): Invoke define-full-ifield instead of claiming it's an alias.
376 (dnop): Mark as deprecated.
378 * cpu/play.cpu: Add example of hardware `layout'.
379 * doc/porting.tex: Add docs on simplify.inc.
380 * doc/rtl.texi: Cleanup pass over "Simplification macros",
383 * ifield.scm: Whitespace/formatting cleanup.
385 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
387 * read.scm (parse-error): Don't print single entry args as a list.
388 (-reader-process-expanded-1): Convert symbol to string for
391 * insn.scm (multi-insn-instantiate!): Tweak logging message.
393 2009-07-15 Doug Evans <dje@sebabeach.org>
395 * cpu/simplify.inc (dno): New pmacro.
396 * doc/porting.texi: Add section on simplify.inc.
397 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
399 2009-07-15 Doug Evans <devans@sourceware.org>
401 * gen-all-doc: Generate index.html.
403 2009-07-13 Doug Evans <dje@sebabeach.org>
405 Extend pmacro language, add testsuite.
406 * Makefile.am (SUBDIRS): Add testsuite.
407 * Makefile.in: Regenerate.
408 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
409 testsuite/test-utils.sh.
410 * configure: Regenerate.
411 * dev.scm (cload): Handle testsuite app.
412 (load-testsuite): New function.
413 * pmacros.scm: (-pmacro-debug?): New global.
414 (-smacro-table): New global.
415 (-smacro-lookup, -smacro-set!): New functions.
416 (-pmacro-make): New argument `syntactic-form?', all callers updated.
417 (-pmacro-syntactic-form?): New function.
418 (-pmacro-expected-number, -pmacro-verify-number): New functions.
419 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
420 (-pmacro-expected-non-negative-integer): New function.
421 (-pmacro-verify-non-negative-integer): New function.
422 (-pmacro-expand-expr-list): New function.
423 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
424 (-pmacro-process-args): Renamed from -pmacro-invoke.
425 (-pmacro-apply, -smacro-apply): New functions.
426 (-pmacro-expand): Rewrite syntactic form processing.
427 (-pmacro-build-lambda): Reformat.
428 (define-pmacro): Watch for more errors in definition.
429 (pmacro-debug): New function.
430 (pmacro-trace): Set/reset -pmacro-debug?.
431 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
432 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
433 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
434 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
435 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
436 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
437 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
438 (pmacros-init!): Initialize -smacro-table.
439 Rewrite pmacro initialization.
440 * read.scm (reader-process-expanded): Renamed from
441 -reader-process-expanded. All callers updated.
442 Recognize () as a no-op.
443 (cpu-load): Tweak logging messages.
444 * utils.scm (message): Add comment.
445 * cpu/play.cpu: Add some instructions to play with .let.
446 * doc/cgenint.texi: Move some debugging related docs to here from
448 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
449 * testsuite/Makefile.am: New file.
450 * testsuite/Makefile.in: New file.
451 * testsuite/test-utils.sh.in: New file.
452 * testsuite/run-tests.sh: New file.
453 * testsuite/testsuite.cpu: New file.
454 * testsuite/pmacros-1.test: New file.
456 * decode.scm: Comment and formatting tweaks.
457 (-build-decode-table-guts): Add more data to logging message.
459 2009-07-12 Doug Evans <dje@sebabeach.org>
461 Delete files that now live in ../cpu.
462 * cpu/iq10.cpu: Delete.
463 * cpu/iq2000.cpu: Delete.
464 * cpu/iq2000.opc: Delete.
465 * cpu/iq2000m.cpu: Delete.
466 * cpu/m32r.cpu: Delete.
467 * cpu/m32r.opc: Delete.
469 2009-07-09 Doug Evans <dje@sebabeach.org>
471 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
472 All callers updated. Work around -ve shifts by referencing the
475 * utils.scm (message): Handle pairs.
477 2009-07-08 DJ Delorie <dj@redhat.com>
479 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
480 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
481 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
484 2009-07-07 Doug Evans <dje@sebabeach.org>
486 * cpu/play.cpu (add): Use (ifield enum) for one format element.
487 * cpu/play.opc: New file.
489 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
490 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
491 * doc/rtl.texi (Instructions): Update.
493 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
494 (opc-arguments, -OPC): Call set-opc-file-path!.
495 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
496 (set-opc-file-path!): New function.
497 * dev.scm: Mention set-opc-file-path!. Mention doc options.
499 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
500 before passing to gen-c-args.
502 2009-07-06 DJ Delorie <dj@redhat.com>
504 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
505 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
506 unspecified accesses to control registers.
508 2009-07-01 DJ Delorie <dj@redhat.com>
510 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
511 unspecified accesses to control registers.
513 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
514 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
516 2009-06-27 Doug Evans <dje@sebabeach.org>
518 * gen-all-intrinsics: New file.
520 2009-06-24 Doug Evans <dje@sebabeach.org>
522 * All *.scm files: Update copyright year.
523 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
525 2009-06-23 DJ Delorie <dj@redhat.com>
527 * intrinsics.scm: Updates to support IVC2.
528 (belongs-to-group?): Check IVC2 slots.
529 (-slots-attribute): New.
530 (targets::attributes): Add SLOTS.
531 (target:add-well-known-intrinsics): Add CPMOV.
532 (md-insn): Add CPTYPE and CRET?.
533 (add-md-insn): Likewise.
534 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
535 duplicate insns with different bit patterns.
536 (write-cgen-insn?): Add cret? support.
537 (intrinsics.h): Add vector types.
538 (runtime-op): Add vector support.
539 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
541 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
542 * cpu/mep-ivc2.cpu: Update all insns to include type information.
543 (h-cr-ivc2): Default to typeless.
544 (h-ccr-ivc2): Fix register width.
545 (SLOTS): Fix values and default.
546 (ivc2_*): Add control register names.
547 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
549 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
550 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
552 2009-06-22 Doug Evans <dje@sebabeach.org>
554 * semantics.scm (insn-build-known-values): Fix typo in comment.
556 2009-06-21 Doug Evans <dje@sebabeach.org>
558 * rtl-xform.scm (rtx-simplify-insn): New function.
559 * html.scm (gen-insn-docs): Call it.
560 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
561 * iformat.scm (ifmt-analyze): Minor simplification.
563 * semantics.scm (semantic-compile): Change arg sem-code-list to
565 (semantic-attrs): Ditto.
566 * iformat.scm (ifmt-analyze): Update.
567 (ifmt-compute!): Update.
568 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
570 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
571 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
572 * semantics.scm (rtx-simplify): Ditto.
573 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
574 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
575 (-simplify-expr-fn): Move to rtl-xform.scm.
576 (-solve-expr-fn, rtx-solve): Ditto.
577 * rtl-xform.c: New file.
580 * rtl-c.scm (delay): Add FIXME, tweak formatting.
581 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
582 (-rtx-traverse, rtx-traverse): Ditto.
584 2009-06-20 Doug Evans <dje@sebabeach.org>
586 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
588 * configure.in: Update version to 1.1.
589 * configure: Regenerate.
590 * read.scm (-CGEN-VERSION): Update to 1.1.0.
592 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
593 Doug Evans <dje@sebabeach.org>
595 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
596 (cgen-desc.c): Ditto.
597 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
598 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
599 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
600 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
601 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
602 (cgen-cpuall.h, cgen-ops.c): Ditto.
603 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
604 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
605 (cgen-sem-switch.c): Ditto.
606 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
607 * sim-model.c (cgen-model.c): Ditto.
609 2009-06-18 Doug Evans <dje@sebabeach.org>
611 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
613 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
615 * dev.scm (cload): Change #:arch argument to take the path to the
616 .cpu file instead of just the name of the architecture.
617 * read.scm (arch-path): Remove trailing '/'.
618 (cpu-load): Set `arch-path' to directory of .cpu file.
619 (-cgen): Don't set `arch-path' here.
621 * doc/porting.texi: Update.
623 2009-06-14 Doug Evans <dje@sebabeach.org>
625 * gen-all-doc: Use files in ../cpu where possible.
627 * Makefile.am (ARCHFILE): Fix path.
628 * Makefile.in: Regenerate.
629 * html.scm: Use "pre" instead of "plaintext".
631 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
632 * doc/app.texi: Cleanup pass.
633 * doc/cgen.texi: Cleanup pass.
634 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
635 * doc/intro.texi: Cleanup pass.
636 * doc/mdate-sh: New file.
637 * doc/opcodes.texi: Cleanup pass.
638 * doc/pmacros.texi: Cleanup pass.
639 * doc/porting.texi: Cleanup pass.
640 * doc/rtl.texi: Cleanup pass.
641 * doc/running.texi: Cleanup pass. Document more runtime options.
642 * doc/stamp-vti: Update.
643 * doc/version.texi: Update.
645 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
646 (GUILE): Fix definition.
647 * Makefile.in: Regenerate with automake 1.9.6.
648 * aclocal.m4: Regenerate with aclocal 1.9.6.
649 * configure.in (AC_PREREQ): Set to 2.59.
650 (GENINSRC_NEVER): Define.
651 * configure: Regenerate with autoconf 2.59.
652 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
653 (cgen.info,cgen.dvi): Delete.
654 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
655 (noinst_TEXINFOS): Add cgenint.texi.
656 (DOCFILES): Add missing files.
657 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
658 * doc/Makefile.in: Regenerate with automake 1.9.6.
660 * guile.scm: Add "." to %load-path if >= guile version 1.8.
662 * attr.scm: Removing trailing whitespace.
663 * cgen-intrinsics.scm: Ditto.
664 * cgen-sim.scm: Ditto.
670 2009-05-28 DJ Delorie <dj@redhat.com>
672 * cpu/mep.opc (parse_signed16_range): New.
673 (parse_unsigned16_range): New.
674 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
676 2009-05-26 DJ Delorie <dj@redhat.com>
678 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
680 (f-ivc2-ccrn-c3hi): New.
681 (f-ivc2-ccrn-c3lo): New.
682 (f-ivc2-ccrn-c3): New.
683 (ivc2c3ccrn): Use it.
685 2009-05-22 DJ Delorie <dj@redhat.com>
687 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
688 (mep_config_map): Regenerate.
690 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
693 (cmovc): move to after field definitions, use ivc2-specific
695 (cpmovi_b_P0S_P1): New.
697 2009-05-19 DJ Delorie <dj@redhat.com>
699 * cpu/mep.opc: Regenerate configuration.
700 (parse_cdisp10): Only check CPU flags, not COP flags.
701 (check_configured_mach): Likewise.
703 2009-05-13 DJ Delorie <dj@redhat.com>
705 * intrinsics.scm (insns.md): Add RTL predicates.
706 (intrinsics.h): Remove old C intrinsics.
708 2009-04-29 DJ Delorie <dj@redhat.com>
711 * mep-core.cpu: Regenerated. Add support for deferred register
713 (SLOT): Add IVC2 slot types.
714 (sim-syscall): Rename to something more appropriate.
715 * mep-ext-cop.cpu: Regenerate.
716 * mep.opc: Regenerate. Add "coprocessor supported" define area.
717 (print_slot_insn): New.
718 (mep_examine_ivc2_insns): New.
719 (mep_print_insn_set_ivc2_mode): New.
720 (mep_print_insn): Support IVC2 slotting.
722 2009-04-20 DJ Delorie <dj@redhat.com>
724 * intrinsics.scm (intrinsics-analyze!): Include aliases.
725 (guess-mode): Drop COP* syntax.
726 (need-insn): Add "--syscall--" to the list.
727 (enum-type): Drop COP* syntax.
728 (intrinsics.h): Likewise.
729 (intrinsic-protos.h): Change file header to allow it to be
732 2009-04-17 DJ Delorie <dj@redhat.com>
734 * cpu/mep-c5.cpu (f-12s20): Change to signed.
735 (lhucpm1): Limit to C5 mach.
736 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
737 * cpu/mep-core.cpu (extend-cdisp10): New.
738 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
740 2009-04-08 DJ Delorie <dj@redhat.com>
742 * cpu/mep-c5.cpu: New.
743 * cpu/mep-core.cpu: Add C5 support.
744 * cpu/mep.opc: Likewise.
746 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
748 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
749 about calling memset with a zero length.
751 2009-02-03 DJ Delorie <dj@redhat.com>
753 * cpu/mep-core.cpu: Update to new MeP configuration.
754 * cpu/mep-ext-cop.cpu: Likewise.
755 * cpu/mep.opc: Likewise.
757 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
759 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
761 2008-06-17 Dave Brolley <brolley@redhat.com>
763 * cpu/xstormy16.cpu (h-pc): Add a set handler.
766 2007-11-13 Dave Brolley <brolley@redhat.com>
768 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
770 2007-11-05 Dave Brolley <brolley@redhat.com>
772 * intrinsics.scm,cgen-intrinsics.scm: New application which
773 generates code to support intrinsic functions for insns in the
774 mep architecture in gcc.
776 2007-09-21 Dave Brolley <brolley@redhat.com>
778 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
779 (rn3us): CDATA attribute now LONG.
781 2007-08-21 Dave Brolley <brolley@redhat.com>
783 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
786 2007-07-05 Nick Clifton <nickc@redhat.com>
788 * utils.scm (copyright-fsf): Update copyright notice to refer to
791 2007-05-22 Nick Clifton <nickc@redhat.com>
793 * doc/cgen.texi: Use @copying around the copyright notice.
794 * doc/internals.texi: Likewise.
796 2007-02-05 Dave Brolley <brolley@redhat.com>
798 * *mep*: New cpu description for Toshiba Media Processor (MeP).
800 2007-02-05 Dave Brolley <brolley@redhat.com>
802 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
803 in the generated code for @arch@_cgen_init_asm if it is defined.
805 * Contribute the following changes:
806 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
808 * attr.scm (<string-attribute>): New attribute class.
809 (attr-kind): Handle <string-attribute>.
810 (parse-simple-attribute): New function.
811 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
812 (<bitset-attribute> 'parse-value): Likewise.
813 (<boolean-attribute> 'parse-value): Likewise.
814 (<enum-attribute> 'parse-value): Likewise.
815 (<string-attribute> 'parse-value): New function.
816 (-attr-parse): Handle <string-attribute>.
817 (-attr-read): Likewise.
818 (<string-attribute> 'gen-value-for-defn-raw): New function.
819 (<string-attribute> 'gen-value-for-defn): New function.
821 2006-11-07 Dave Brolley <brolley@redhat.com>
823 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
826 2006-10-18 Dave Brolley <brolley@redhat.com>
828 * Contribute the following changes:
830 2006-07-11 Dave Brolley <brolley@redhat.com>
832 * cpu/sh64-compact.cpu (movual, movual2): New insns.
834 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
835 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
836 hardware or memory mode which was used.
837 * sid-cpu.scm (hw-need-write-stack?): New function.
838 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
839 identify hardware which uses write stacks.
840 (useful-mode-names): Renamed to write-stack-memory-mode-names.
841 Initialized to an empty list.
842 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
843 hw-need-write-stack?.
844 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
845 (define-getters <hardware-base>): Define used-in-delay-rtl?.
846 (used-in-delay-rtl?): New method of <hardware-base>.
847 (hw-used-in-delay-rtl?): New function.
849 2006-06-20 Dave Brolley <brolley@redhat.com>
851 * sid.scm (gen-attr-type): Removed.
852 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
853 (SH2a-MACH): Add sh5.
854 (sh2a-nofpu-models): Add units for sh5.
855 (sh2a-fpu-models): Likewise.
857 2006-06-15 Dave Brolley <brolley@redhat.com>
859 * cpu/sh-sim.cpu: New file.
860 * cpu/sh-sid.cpu: New file.
861 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
862 (All fields): Remap for (insn-lsb0? #f)
863 (All insns): Add timing specs.
864 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
865 'xattrs' and .splice it in.
866 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
867 (h-frc,h-drc): Add PROFILE attribute.
869 (h-vbr): New hardware.
870 (All fields): Remap for (insn-lsb0? #f)
871 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
872 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
873 (fpscr): Use h-fpscr.
874 (fsdm,fsdn): Use h-fsd.
875 (dshci): Add xtiming argument and splice it in.
876 (dr,xd): pmacros removed.
877 (All insns): Add timing specs, *-MACH attribibutes,
878 SH4{A}-GROUP attributes.
879 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
880 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
881 we're being processed for sim or sid.
882 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
883 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
884 (define-isa compact): Add (isa-parallel-insns 2).
885 (define-isa media): Add (isa-parallel-insns 2). Add
886 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
887 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
889 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
890 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
891 (SH4al-MACH, SH5-MACH): New pmacros.
892 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
893 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
894 (sh5-media-fp-units, common-model, common-model-with-fp)
895 (sh3-model, sh3e-model): New pmacros.
896 (define-model sh2): New model.
897 (define-model sh2e): New model.
898 (define-model sh3): New model.
899 (define-model sh3e): New model.
900 (define-model sh2a-nofpu): New model.
901 (define-model sh2a-fpu): New model.
902 (define-model sh4-nofpu): New model.
903 (define-model sh4): New model.
904 (define-model sh4a-nofpu): New model.
905 (define-model sh4a): New model.
906 (define-model sh4al): New model.
907 (define-model sh5-media): New model.
908 (define-model sh5): Add all units.
909 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
910 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
911 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
912 (h-pc): Add PROFILE attribute.
915 (h-gr,h-grc): Likewise.
916 (h-cr): Set h-sr in setter.
917 (h-frbit): Get/Set h-fpscr.
918 (h-szbit,h-prbit): Likewise.
919 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
920 Add getter and setter.
921 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
922 Adjust getter and setter.
923 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
924 Adjust getter and setter.
925 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
926 (h-fsd,h-fmov): New hardware.
928 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
930 * doc/app.texi, doc/internals.texi, doc/intro.texi,
931 doc/notes.texi, doc/porting.texi, doc/running.texi,
932 doc/sim.texi: Fix some typos.
934 2006-07-14 Dave Brolley <brolley@redhat.com>
936 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
937 hardware or memory mode which was used.
938 * sid-cpu.scm (hw-need-write-stack?): New function.
939 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
940 identify hardware which uses write stacks.
941 (useful-mode-names): Renamed to write-stack-memory-mode-names.
942 Initialized to an empty list.
943 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
944 hw-need-write-stack?.
945 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
946 (define-getters <hardware-base>): Define used-in-delay-rtl?.
947 (used-in-delay-rtl?): New method of <hardware-base>.
948 (hw-used-in-delay-rtl?): New function.
950 2006-06-20 Dave Brolley <brolley@redhat.com>
952 * sid.scm (gen-attr-type): Removed.
954 2006-05-10 Dave Brolley <brolley@redhat.com>
956 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
957 support for (if (application-is? <appname>) (...) (...)).
958 (-cgen): Add trailing "/" to arch-path.
959 * utils.scm (dirname): Removed. dirname is a primitive function.
961 2006-05-09 Dave Brolley <brolley@redhat.com>
963 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
964 'entire_insn' not 'base_insn'.
965 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
967 * sim.scm (-gen-arch-model-decls): Likewise.
968 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
969 abuf->written if profiling.
970 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
971 object->string om the mode.
972 (-hw-gen-write-stack-decl): Likewise.
973 * read.scm (include): Use arch-path as file location.
974 (arch-path): Define it with a default setting.
975 (-cgen): Update arch-path when "-a" option is specified.
976 * utils.scm (dirname): New function.
978 2006-05-05 Steve Ellcey <sje@cup.hp.com>
980 * configure.in: Remove AC_ARG_PROGRAM.
981 * configure: Regenerate with autoconf 2.59.
983 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
985 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
988 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
990 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
991 or an error message otherwise.
992 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
993 Fix up comments to correctly describe the functions.
995 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
996 Anil Paranjape <anilp1@kpitcummins.com>
997 Shilin Shakti <shilins@kpitcummins.com>
999 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1001 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1003 2006-02-10 Nick Clifton <nickc@redhat.com>
1005 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1007 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1009 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1011 (-hw-gen-write-stack-decl): Likewise.
1013 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1015 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1016 non-(adata-integral-insn? CURRENT-ARCH) case.
1018 2005-10-28 Dave Brolley <brolley@redhat.com>
1020 Contribute the following changes:
1021 2005-09-19 Dave Brolley <brolley@redhat.com>
1023 * attr.scm (gen-value-for-defn-raw): New methods.
1024 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1025 gen-value-for-defn-raw.
1026 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1028 2002-12-13 Dave Brolley <brolley@redhat.com>
1030 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1031 (-gen-attr-accessors): New function.
1032 (gen-obj-attr-defn): Update terminating initializer.
1033 (gen-obj-attr-end-defn): New function.
1034 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1035 * sid-cpu.scm (cgen-desc.h): Generate code to include
1036 "opcode/cgen-bitset.h"
1037 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1039 * desc.scm ('gen-defn): Update terminating initializer.
1040 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1041 terminatinig initializer.
1042 (gen-hw-decls): Ditto.
1043 (gen-operand-decls): Ditto.
1044 (gen-insn-decls): Ditto.
1045 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1046 (gen-insn-table): Update terminating initializer.
1047 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1048 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1049 * attr.scm (charmask-bytes): New function.
1050 (bitset-attr->charmask): New function.
1051 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1052 differences for SID-SIMULATOR.
1053 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1054 (<enum-attribute>): Ditto.
1056 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1058 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1060 2005-10-24 DJ Delorie <dj@redhat.com>
1062 * operand.scm (-anyof-merge-syntax): Print a more useful error
1065 2005-10-19 Nick Clifton <nickc@redhat.com>
1067 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1070 2005-10-18 Andreas Schwab <schwab@suse.de>
1072 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1074 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1076 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1079 2005-08-02 Dave Brolley <brolley@redhat.com>
1081 * rtl-c.scm (s-unop): Don't dereference
1082 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1083 (s-binop, s-convop, s-cmpop): Likewise.
1085 2005-07-29 Dave Brolley <brolley@redhat.com>
1087 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1088 if with-profile or with-parallel-write.
1089 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1090 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1093 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1095 * cpu/fr30.opc (print_register_list): Correct format strings.
1096 * cpu/ip2k.opc: Likewise.
1098 2005-07-05 Nick Clifton <nickc@redhat.com>
1100 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1101 unsigned in order to avoid compile time warnings about sign
1104 2005-07-01 Nick Clifton <nickc@redhat.com>
1106 * desc-cpu.scm: Update to ISO C90 function declaration style.
1107 * opc-asmdis.scm: Likewise.
1108 * opc-ibld.scm: Likewise.
1109 * opc-itab.scm: Likewise.
1110 * cpu/fr30.opc: Likewise.
1111 * cpu/i960.opc: Likewise.
1112 * cpu/ip2k.opc: Likewise.
1113 * cpu/iq2000.opc: Likewise.
1114 * cpu/m32r.opc: Likewise.
1115 * cpu/openrisc.opc: Likewise.
1116 * cpu/sh.opc: Likewise.
1117 * cpu/sparc.opc: Likewise.
1118 * cpu/xstormy16.opc: Likewise.
1120 2005-06-15 Dave Brolley <brolley@redhat.com>
1122 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1123 (cgen-cpu.h): Call it.
1125 Contributed on behalf of Graydon Hoare
1126 2001-06-05 graydon hoare <graydon@redhat.com>
1128 * utils.scm (foldl): Define.
1132 (intersection): Simplify.
1133 * sid.scm : Set APPLICATION to SID-SIMULATOR.
1134 (-op-gen-delayed-set-maybe-trace): Define.
1135 (<operand> 'gen-set-{quiet,trace}): Delegate to
1136 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1137 up and needs cleaning.
1138 (-with-parallel?): Hardwire with-parallel to #t.
1139 (<operand> 'cxmake-get): Replace with lookahead-aware code
1140 * sid-decode.scm: Remove per-insn writeback fns.
1141 (-gen-idesc-decls): Redefine sem_fn type.
1142 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1143 with write stack stuff.
1144 (cgen-write.cxx): Replace per-insn writebacks with single write
1145 stack writeback. Add write stack reset function.
1146 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1148 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1149 estate attribute set.
1150 (delay): Set #:delayed attribute to calculated delay, update
1151 maximum delay of cpu, check (delay ...) usage.
1152 * operand.scm (<operand>): Add delayed slot to <operand>.
1153 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1154 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1155 * doc/rtl.texi (Expressions): Add section on (delay ...).
1157 2005-06-13 Jim Blandy <jimb@redhat.com>
1159 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1162 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1164 * doc/porting.texi: Change all mention of md_apply_fix3 and
1165 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1168 2005-05-18 Dave Brolley <brolley@redhat.com>
1170 * utils-sim.scm (-gen-decode-default-entry): New function.
1171 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1172 code to check that all opcodes bits match.
1173 (-gen-decoder-switch): Use -gen-decode-default-entry.
1175 2005-05-16 Jim Blandy <jimb@redhat.com>
1177 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1178 fetched by one of our GETIMEM* methods.
1179 * utils-gen.scm (-extract-chunk-specs): Always fetch full
1180 base-insn-sized chunks.
1182 2005-05-10 Nick Clifton <nickc@redhat.com>
1184 * Update the address and phone number of the FSF organization in
1185 the GPL notices in the following files:
1186 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1187 cpu/powerpc.cpu, slib/random.scm
1189 2005-05-06 Jim Blandy <jimb@redhat.com>
1191 * pprint.scm, cos-pprint.scm: Add documentation.
1193 * pprint.scm (pprint): Don't wipe out elide-table after each call.
1195 * pprint.scm, cos-pprint.scm: New files.
1197 2005-04-04 Nick Clifton <nickc@redhat.com>
1199 * opcodes.scm (-gen-parse-address): Initialise value to zero to
1200 avoid a compile time warning.
1202 2005-03-18 Nick Clifton <nickc@redhat.com>
1204 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1205 "percent-operand" from "%operand" as the latter confuses xgettext
1206 into thinking that it is a C printf formating directive, which
1207 prevents proper translation.
1209 2005-02-23 Nick Clifton <nickc@redhat.com>
1211 * opcodes.scm (gen-parse-number): Add a cast to the desired
1212 pointer signed'ness in order to prevent compile time warnings.
1213 * cpu/ip2k.opc: Fixed compile time warnings about differing
1214 signed'ness of pointers passed to functions.
1215 * cpu/iq2000.opc: Likewise.
1216 * cpu/m32r.opc: Likewise.
1217 * cpu/openrisc.opc: Likewise.
1218 * cpu/xstormy16.opc: Likewise.
1220 2005-02-22 Alan Modra <amodra@bigpond.net.au>
1222 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1223 (cgen-desc.h): ..to here, after opcode/cgen.h include.
1225 2005-02-16 Dave Brolley <brolley@redhat.com>
1227 * utils.scm: Update copyright years.
1228 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1229 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1230 * operand.scm (-derived-operand-parse): Move logit message from level 1
1233 2005-02-15 Nick Clifton <nickc@redhat.com>
1235 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1236 prevent compile time warning messages.
1237 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1238 * utils-gen.scm (attr-int-gen-defn): Likewise.
1239 (attr-gen-defn): Likewise.
1240 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1241 (print_dollarhex16): Remove unused function.
1243 2005-02-15 Jim Blandy <jimb@redhat.com>
1245 * guile.scm (cgen-call-with-debugging): Doc fix.
1247 Make backtraces work more reliably.
1248 * guile.scm: Set up debugging parameters, and enable debugging and
1249 source positions while loading.
1250 (cgen-call-with-debugging, cgen-debugging-stack-start): New
1252 * read.scm: Don't set debugging parameters here.
1253 (catch-with-backtrace): Function deleted.
1254 (-cgen): Simply note the presence or absence of the -b option.
1255 Pass the flag to cgen-call-with-debugging, so debugging is turned
1256 off here if the user didn't request it, for faster computation.
1257 (cgen): Call cgen-debugging-stack-start here, instead of
1258 catch-with-backtrace.
1260 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1262 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1263 Don't write out the trailing -s here.
1264 * Makefile.in: Regenerated.
1265 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1266 fixup.scm here; let the caller decide which Scheme's customization
1268 * dev.scm: Load guile.scm, not fixup.scm.
1269 * fixup.scm: Deleted; contents have all moved to guile.scm.
1272 * guile.scm (debug-write): New function.
1274 2005-02-14 Jim Blandy <jimb@redhat.com>
1276 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1277 transformer procedure, not eval. Transformer procedures take one
1280 2005-02-11 Nick Clifton <nickc@redhat.com>
1282 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1283 to 'bfd_vma *' in order avoid compile time warning message.
1285 2005-02-09 Jim Blandy <jimb@redhat.com>
1287 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
1288 corresponding change in the sim/common directory.)
1290 2005-02-07 Jim Blandy <jimb@redhat.com>
1292 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
1293 changes in the opcodes directory.)
1295 * guile.scm: New file, containing Guile-specific definitions and
1296 adaptations. This is loaded by the app-specific shell scripts.
1297 Initially identical to fixup.scm.
1298 * cgen-sid.scm: Don't load fixup.scm here.
1300 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1303 2005-01-27 Jim Blandy <jimb@redhat.com>
1305 * utils.scm (string/symbol->append): Renamed from 'concat'.
1306 * opcodes.scm (gen-switch): Use new name.
1307 * insn.scm (-sub-insn-make!): Same.
1308 * rtl.scm (rtx-dump): Same.
1309 * semantics.scm (semantic-compile): Same.
1311 2005-01-20 Jim Blandy <jimb@redhat.com>
1313 * opcodes.scm (gen-switch): Use concat instead of string-map.
1315 * utils.scm (concat): New function.
1316 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1317 * rtl.scm (rtx-dump): Same.
1318 * semantics.scm (semantic-compile): Same.
1320 2004-12-16 Jim Blandy <jimb@redhat.com>
1322 * utils-cgen.scm (parse-name): Don't assume that string-map can be
1323 applied to symbols. Process everything as strings, and then
1324 convert to a symbol at the end.
1326 * read.scm (debug-repl): Temporarily redirect input and output to
1327 /dev/tty while we debug, so we don't interfere with whatever CGEN
1328 is reading or writing.
1329 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1332 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
1334 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1335 will work with newer versions of guile.
1337 2004-10-27 Nick Clifton <nickc@redhat.com>
1339 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1340 * cpu/iq2000.cpu: Likewise.
1342 2004-07-21 DJ Delorie <dj@redhat.com>
1344 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1346 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
1348 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1349 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1351 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1353 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1355 2004-03-22 Dave Brolley <brolley@redhat.com>
1357 * utils.scm (copyright-fsf): Update copyright years.
1358 (copyright-red-hat): Ditto.
1359 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1361 (-op-gen-set-trace-parallel): Ditto.
1363 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
1365 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1366 disassembling codes for 0x*2 addresses.
1368 2004-01-29 Dave Brolley <brolley@redhat.com>
1370 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1371 zeroes in the extra bit positions and generate 'opcode-mask' with ones
1372 in the extra bit positions.
1374 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1376 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1378 2003-12-04 Alan Modra <amodra@bigpond.net.au>
1380 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1381 "short" being 16 bit.
1382 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
1383 internationalize error message.
1384 (parse_lo16): Likewise. Remove useless code.
1386 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1388 * cpu/m32r.cpu : Add new model m32r2.
1389 Add new instructions.
1390 Replace occurrances of 'Mitsubishi' with 'Renesas'.
1391 Changed PIPE attr of push from O to OS.
1392 Care for Little-endian of M32R.
1393 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1394 Care for Little-endian of M32R.
1395 (parse_slo16): signed extension for value.
1397 2003-10-26 Dave Brolley <brolley@redhat.com>
1399 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1400 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1401 (-gen-extract-fn): Call -gen-record-profile-args.
1403 2003-10-21 Dave Brolley <brolley@redhat.com>
1405 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1407 * decode.scm (-opcode-slots): Correct typo in logit call.
1409 2003-10-09 Jim Blandy <jimb@redhat.com>
1411 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1412 for @arch@_cgen_hw_table. GDB needs to be able to find this.
1414 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1416 2003-10-06 Dave Brolley <brolley@redhat.com>
1418 * gen-all-doc: Add fr550.
1420 2003-09-11 Doug Evans <dje@sebabeach.org>
1422 * Makefile.am (ARCHFILE): New var.
1423 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1424 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1425 * Makefile.in: Regenerate.
1427 2003-09-08 Dave Brolley <brolley@redhat.com>
1429 On behalf of Doug Evans <dje@sebabeach.org>
1430 Pass in paths to input files, instead of assuming they live in
1431 $srcdir/cpu. Plus misc. option processing cleanup.
1432 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1433 Add pre-process pass to all options.
1434 * cgen-gas.scm (gas-arguments): Ditto.
1435 * cgen-sid.scm (sim-arguments): Ditto.
1436 * cgen-sim.scm (sim-arguments): Ditto.
1437 * cgen-stest.scm (stest-arguments): Ditto.
1438 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
1439 (-opc-file-path): New global.
1440 (opc-file-path): New fn.
1441 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1442 All callers updated.
1443 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1444 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1445 Replace srcdir arg with opc-file. All callers updated.
1446 * read.scm (-opt-spec-update): Delete.
1447 (opt-get-first-pass,opt-get-second-pass): New fns.
1448 (-cgen): Process application-specific arguments in two passes.
1450 2003-08-29 Dave Brolley <brolley@redhat.com>
1452 * cpu/frv.cpu: Removed.
1453 * cpu/frv.opc: Removed.
1455 2003-08-21 Nick Clifton <nickc@redhat.com>
1457 * cpu/frv.cpu (mbtoh): Replace input parameter to
1458 u-media-dual-expand and u-media-dual-btoh with output parameter.
1459 (cmbtoh): Add profiling hack.
1461 2003-08-19 Michael Snyder <msnyder@redhat.com>
1463 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1465 2003-08-07 Michael Meissner <gnu@the-meissners.org>
1467 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1468 the elements for the END record of CGEN_OPINST, silencing warnings.
1470 2003-07-15 Doug Evans <dje@sebabeach.org>
1472 Add guile 1.6.4 support.
1473 - empty list must be quoted
1474 - string functions have stricter type checking
1475 - eval now takes a second argument
1476 - symbol-bound? is deprecated
1477 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1478 (bitset-attr->list): Ensure arg to string-cut is a string.
1479 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1480 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1481 * cos.scm (-class-list): Must quote empty list.
1482 (-class-parent-classes,-class-compute-class-desc): Ditto.
1483 (class-make,make,object-reset!): Ditto.
1484 (method-make-make!): Call eval1 instead of eval.
1485 (method-make-forward!,method-make-virtual-forward!): Ditto.
1486 * decode.scm (subdtable-add): Use stringsym-append instead of
1488 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1489 (-build-decode-table-entry): Fetch string name of insn.
1490 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1491 (-gen-mach-table-defns): Ditto for mach.
1492 (gen-ifld-defns): Ditto for ifld.
1493 (gen-hw-table-defns): Ditto for hw.
1494 (gen-operand-table): Ditto for op.
1495 (gen-insn-table-entry): Ditto for insn.
1496 * desc.scm (gen-attr-table-defn): Ditto for attr.
1497 (<keyword>,gen-defn): Don't pass symbols to string-append.
1498 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1500 (enum-vals-upcase): Use symbol-upcase to build result.
1501 (-enum-parse): Use stringsym-append to build errtxt.
1502 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1503 (eval1): New function.
1504 (symbol-bound?): Provide own version if >= guile 1.6.
1505 * hardware.scm (define-keyword): Use string-append instead of
1507 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
1508 cgen.html,cgen-insn.html): Convert current-arch-name to a string
1510 (gen-list-entry): Handle either symbol or string `name' arg.
1511 (gen-obj-doc-header): Fetch string name of `o' arg.
1512 (define-cpu-intro): Ditto for cpu.
1513 (gen-mach-intro): Ditto for mach.
1514 (gen-model-intro): Ditto for model.
1515 (gen-isa-intro): Ditto for isa.
1516 (gen-machine-doc-1): Ditto for isa.
1517 (gen-reg-doc-1): Convert mach to string first.
1518 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
1519 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
1521 (gen-insn-categories): Fetch string name of mach. Convert
1522 enum-val-name to string first.
1523 (gen-insn-docs): Fetch string name of mach.
1524 * ifield.scm (ifld-ilk): Result is a string.
1525 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
1526 Fetch string name of ifld.
1527 (-sfmt-search-key): Similarily for ifld and op.
1528 * insn.scm (syntax-make): Fetch string name of syntax element.
1529 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
1530 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
1531 * mode.scm (mode:c-type): Result is a string.
1532 (mode:enum): Fetch string name of mode.
1533 (-mode-parse): Use stringsym-append to build errtxt.
1534 * model.scm (model:enum): Fetch string name of model.
1535 (-model-parse): Use stringsym-append to build errtxt.
1536 (parse-insn-timing): Must quote empty list.
1537 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
1538 (-gen-minsn-opcode-entry): Ditto.
1539 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
1541 (read-cpu.opc): Convert current-arch-name to a string before using.
1542 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
1543 (<derived-operand>): Must quote empty list.
1544 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
1545 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
1547 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
1548 (-pmacro-sym): Must convert symbols to strings before passing to
1550 (-pmacro-str): Ditto.
1551 (pmacros-init!): Use eval1 instead of eval.
1552 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
1553 (keep-isa-atlist?): Ditto.
1554 (cmd-if): Use eval1 instead of eval.
1555 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
1556 (-rtl-c-get): Fetch string name of src.
1557 (s-unop): Ditto for mode.
1558 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
1559 (-gen-par-temp-defns,subword): Ditto.
1560 (join): Use stringsym-append instead of string-append.
1561 * rtl-traverse.scm (rtx-option?): Convert option to string first.
1562 (rtx-traverse-debug): Fetch string name of rtx-obj.
1563 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
1564 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
1565 (rtx-pretty-name): Result is a string.
1566 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
1567 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
1568 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
1570 (-gen-sfrag-case): Fetch string name of user.
1571 * sid-model.scm (unit:enum): Fetch string name of unit.
1572 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
1573 (<hw-memory>,gen-set-quiet): Ditto.
1574 (gen-mode-defs): Ditto.
1575 (sim-finish!): Convert current-arch-name to a string before using.
1576 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
1577 (-gen-no-scache-semantic-fn): Ditto.
1578 (cgen-defs.h): Fetch string name of isa.
1579 (cgen-read.c): Convert current-arch-name to a string before using.
1580 (cgen-write.c): Ditto.
1581 * sim-model.scm (unit:enum): Fetch string name of unit.
1582 (gen-model-fn-decls): Use stringsym-append instead of string-append.
1583 (-gen-model-timing-table): Fetch string name of model.
1584 (-gen-mach-model-table): Ditto.
1585 (-gen-mach-defns): Fetch string name of mach.
1586 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
1587 (<hw-memory>,cxmake-get): Fetch string name of mode.
1588 (<hw-memory>,gen-set-quiet): Ditto.
1589 (gen-mode-defs): Ditto.
1590 (sim-finish!): Must quote empty list.
1591 * utils-cgen.scm (<ident>): Must quote empty list.
1592 (obj:str-name): New fn.
1593 (parse-comment): Result is a string.
1594 (parse-symbol): Result is a symbol.
1595 (parse-string): Result is a string.
1596 (keyword-list?): Convert arg to string before calling string-ref.
1597 (keyword-list->arg-list): Ditto.
1598 (gen-attr-name): Convert attr-name to string first.
1599 (alpha-sort-obj-list): Use symbol<? instead of string<?.
1600 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
1601 (gen-define-ifmt-ifields): Ditto for fld.
1602 * utils.scm (gen-c-symbol): Ensure str is a string before calling
1604 (gen-file-name): Ditto.
1605 (symbol-downcase,symbol-upcase,symbol<?): New fns.
1606 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
1607 (reduce): Call eval1 instead of eval.
1608 * cpu/m32r.cpu (addi): Don't use `#.'.
1610 * gen-all-sim: Fix some typos.
1612 2003-07-08 Doug Evans <dje@sebabeach.org>
1614 * gen-all-doc: Ensure run from cgen src dir.
1615 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
1616 * gen-all-sid: Similarily, in ./tmp-sid.
1617 * gen-all-sim: Similarily, in ./tmp-sim.
1619 2003-06-20 Doug Evans <dje@sebabeach.org>
1621 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
1623 2003-06-19 Doug Evans <dje@sebabeach.org>
1625 * mach.scm (-ifld-already-defined?): New proc.
1626 (current-ifld-add!): Use it.
1627 (-op-already-defined?): New proc.
1628 (current-op-add!): Use it.
1629 (-insn-already-defined?): New proc.
1630 (current-insn-add!): Use it.
1631 (-minsn-already-defined?): New proc.
1632 (current-minsn-add!): Use it.
1633 (obj-isa-list): New proc.
1634 (isa-supports?): Use it.
1636 2003-06-10 Doug Evans <dje@sebabeach.org>
1638 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
1639 * cpu/m32r.cpu (all insns): Ditto.
1641 * mach.scm (current-*-add!): Disallow redefinition. Make result
1644 * gen-all-doc: Split arm and frv docs up a bit.
1646 * cpu/arm.cpu: Add IDOC attribute.
1647 * cpu/frv.cpu: Ditto.
1648 * cpu/i960.cpu: Ditto.
1649 * cpu/openrisc.cpu: Ditto.
1650 * cpu/xstormy16.cpu: Ditto.
1651 * cpu/m32r.cpu: Ditto.
1652 (all insns): Explicitly specify IDOC attribute.
1654 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
1655 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
1656 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
1657 * Makefile.in: Regenerate.
1658 * attr.scm (<integer-attribute>:parse-value-def): Implement.
1659 (-attr-read): Defer computing default value until we know the type.
1660 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
1661 (<attr-list>:attr-present?): New method.
1662 (atlist-attr-present?,obj-attr-present?): New fns.
1663 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
1664 (attr-builtin!): New insn attr IDOC.
1665 * cgen-doc.scm (doc-arguments): New args -I,-N.
1666 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
1667 Support comment as fourth element of enum value.
1668 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
1669 * html.scm (gen-html-header): New arg kind, all callers updated.
1670 (gen-table-of-contents): New arg insn-file, all callers updated.
1671 (gen-list-entry,gen-doc-header): New fn.
1672 (get-operands): Delete.
1673 (gen-iformat-table): Rewrite.
1674 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
1675 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
1676 (get-insn-properties,guess-insn-idoc-attr!): New fn.
1677 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
1678 (get-insns-for-category,gen-categories-insn-lists): New fns.
1679 (gen-insn-docs): Simplify each insn's semantics first.
1680 Print insn tables sorted by IDOC categories.
1681 (*insn-html-file-name*): New global.
1682 (cgen-insn.html): New fn.
1684 * insn.scm (<insn>): Create a setter for the `tmp' member.
1685 * semantics.scm (insn-build-known-values): Renamed from
1686 -build-known-values. All callers updated.
1688 * rtl.scm: Move traveral/evaluation support to ...
1689 * rtl-traverse.scm: New file.
1690 * read.scm: Maybe-load rtl-traverse.scm.
1692 * rtl.scm (-rtx-valid-types): Add SETRTX.
1694 * rtx-funcs.scm (nop,parallel): Fix mode.
1696 * utils.scm (eqv-lookup-index): New fn.
1697 (assq-lookup-index): Renamed from lookup-index. All callers updated.
1699 * dev.scm (load-doc): Set APPLICATION.
1701 2003-06-10 Dave Brolley <brolley@redhat.com>
1703 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
1704 * sid-decode.scm: Generate #include of config.h into
1705 @prefix@-decode.cxx.
1706 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
1708 2003-06-07 Doug Evans <dje@sebabeach.org>
1710 * gen-all-sid: New file.
1711 * gen-all-opcodes: New file.
1713 2003-06-05 Nick Clifton <nickc@redhat.com>
1715 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
1716 version of the FRinti operand.
1717 (FRintjeven): Likewise for FRintj.
1718 (FRintkeven): Likewise for FRintk.
1719 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
1720 media-quad-arith-sat-semantics, media-quad-arith-sat,
1721 conditional-media-quad-arith-sat, mdunpackh,
1722 media-quad-multiply-semantics, media-quad-multiply,
1723 conditional-media-quad-multiply, media-quad-complex-i,
1724 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
1725 conditional-media-quad-multiply-acc, munpackh,
1726 media-quad-multiply-cross-acc-semantics, mdpackh,
1727 media-quad-multiply-cross-acc, mbtoh-semantics,
1728 media-quad-cross-multiply-cross-acc-semantics,
1729 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
1730 media-quad-cross-multiply-acc-semantics, cmbtoh,
1731 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
1732 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
1733 cmhtob): Use new operands.
1734 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
1735 (parse_even_register): New function.
1737 2003-06-04 Doug Evans <dje@sebabeach.org>
1739 Better handling of 64 bit and mixed 32/64 bit architectures.
1740 * hardware.scm (hw-update-word-modes!): New fn.
1741 * mach.scm (define-cpu)): Call mode-set-word-modes!,
1742 hw-update-word-modes!.
1743 (state-word-bitsize): Replace FIXME with requested check.
1744 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
1745 * mode.scm (mode-find): Ignore INT,UINT.
1746 (-mode-word-sizes-kind): New global.
1747 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
1748 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
1749 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
1751 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
1752 unusable, correct values set later.
1753 (mode-finish!): Remove cruft.
1754 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
1755 * opcodes.scm (opcodes-init!): Ditto.
1756 * rtx-funcs.scm (annul): Fix mode of pc.
1757 * cpu/ia64.cpu: Remove cruft that sets word modes.
1758 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
1760 2003-06-03 Nick Clifton <nickc@redhat.com>
1762 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
1763 immediate value not unsigned.
1765 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
1767 * cpu/sh.cpu: Amend comments to refer to SuperH.
1768 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
1769 * cpu/sh64-media.cpu: Likewise.
1770 (Saturation): Update manual reference.
1772 2003-05-15 Doug Evans <dje@sebabeach.org>
1774 * Makefile.am (srcroot): New var.
1776 * Makefile.in: Regenerate.
1777 * cgen-doc.scm: New file.
1778 * html.scm: New file.
1779 * gen-all-doc: New file.
1780 * dev.scm (cload): Handle DOC application.
1782 * machs.scm (machs-for-cpu): New fn.
1783 * model.scm (models-for-cpu): New fn.
1784 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
1786 (iota): Rewrite to be identical to pmacro version. All uses updated.
1787 * utils-cgen.scm (alpha-sort-obj-list): New fn.
1789 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
1790 (-gen-decode-bits): Instead put in better fix here.
1792 * cpu/i960.cpu (index): Rename to indx. All uses updated.
1794 2003-05-01 DJ Delorie <dj@redhat.com>
1796 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
1798 (set-alignfix-mem): Likewise.
1800 2003-04-16 Dave Brolley <brolley@redhat.com>
1802 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
1803 * utils.scm (copyright-fsf): Update generate copyright years.
1804 (copyright-cygnus): Ditto.
1805 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
1807 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
1809 (<operand>'gen-profile-code): New parameter 'when'.
1810 (<iunit>'gen-profile-code): Ditto.
1811 (<insn>'gen-profile-code): Ditto.
1812 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
1813 'insn_reference' for the 'after' function.
1814 * model.scm (unit:enum): Moved to sim-model.scm.
1815 * sim-model.scm (unit:enum): Moved from model.scm.
1816 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
1817 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
1818 * sid-model.scm (unit:enum): New version for sid.
1819 (gen-model-class-name): New function.
1820 (gen-model-unit-fn-decl): New function.
1821 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
1822 (gen-model-unit-fn-name): New parameter 'when'.
1823 (-gen-model-insn-fn-name): Ditto.
1824 (-gen-model-insn-qualified-fn-name): New function.
1825 (-gen-model-insn-fn-decl): New function.
1826 (-gen-model-insn-fn-decls): New function.
1827 (-gen-model-insn-fn): New parameter 'when'. Call
1828 -gen-model-insn-qualified-fn-name.
1829 (-gen-model-insn-fns): Generate the constructor for the model. Generate
1830 functions for modelling insn before and after execution.
1831 (-gen-model-class-decls): New function.
1832 (" (gen-model-class-name model) "): New function.
1833 (gen-model-classes): New function.
1834 (-gen-insn-timing): Generate functions for modelling insn before and after
1836 (-gen-insn-unit-timing): Generate class-qualified names.
1837 (-gen-model-timing-table): Ditto.
1838 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
1839 not needed (yet) by sid.
1840 (cgen-model.h): New function.
1842 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
1844 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
1845 * cpu/sh64-compact.cpu: Likewise.
1846 * cpu/sh64-media.cpu: Likewise.
1848 2003-03-21 DJ Delorie <dj@redhat.com>
1850 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
1851 which indicates if the sign flag is set from bit 15 or 7.
1853 (set-psw): New argument ws, propogate it.
1854 (set-psw-nowrite): Likewise.
1855 (set-mem-psw): Likewise.
1856 (set-psw-carry): Likewise. Use temporaries to prevent
1857 prematurely overwriting needed inputs.
1858 (set-psw-rrotate17): Fix logic.
1859 (shrgrgr): Preserve carry for zero-bit shifts.
1860 (shrgrimm): Likewise.
1861 (shlgrgr): Likewise.
1862 (shlgrimm): Likewise.
1863 (asrgrgr): Likewise.
1864 (asrgrimm): Likewise.
1867 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
1869 * sid.scm: Set APPLICATION to SID-SIMULATOR.
1871 2002-03-05 DJ Delorie <dj@redhat.com>
1873 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
1874 prematurely overwriting needed inputs.
1875 (set-psw-sub): Likewise.
1877 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
1879 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
1881 2003-02-18 DJ Delorie <dj@redhat.com>
1883 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
1884 (movlmemimm): Just mask the address.
1885 (movhmemimm): Likewise.
1886 (movlmemgr): Likewise.
1887 (movhmemgr): Likewise.
1888 (set-psw): Always set the psw last.
1889 (set-psw-carry): Likewise.
1890 (set-psw-add): Likewise.
1891 (set-psw-sub): Likewise.
1893 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
1894 of 16 patterns from the set-psw-rotate17 function.
1895 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
1896 movgriipostincgr, movgriipredecgr): Set psw correctly.
1897 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
1898 movfgriipostincgr, movfgriipredecgr): Fix semantics.
1899 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
1901 2003-02-11 Dave Brolley <brolley@redhat.com>
1903 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
1904 @arch@_cgen-ifld_table.
1905 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
1906 @arch@_cgen-ifld_table.
1908 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
1910 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
1912 2003-01-09 Graydon Hoare <graydon@redhat.com>
1914 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
1917 2003-01-07 Graydon Hoare <graydon@redhat.com>
1919 * utils-gen.scm (attr-int-gen-defn): Define.
1921 2002-12-21 Doug Evans <dje@sebabeach.org>
1923 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
1924 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
1926 * dev.scm (cload): Update location of .cpu files.
1928 2002-12-19 Doug Evans <dje@sebabeach.org>
1930 * utils-sim.scm (gen-profile-sym): New fn.
1931 (<operand>,sbuf-profile-sym): New method.
1932 (<operand>,sbuf-profile-elm): Use it.
1933 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
1934 of hardcoding symbol name.
1935 (<operand>,gen-profile-code): Ditto.
1936 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
1939 * mode.scm (mode-sem-mode): New fn.
1940 * operand.scm (op:new-mode): Update. mode-name.
1941 (op-natural-mode?) New fn.
1942 * rtl.scm (hw): Set hw-name,mode-name.
1944 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
1946 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
1947 as size of IDESC-TABLE-VAR.
1948 (@prefix@_init_idesc_table): Ditto.
1949 * sim-model.scm (-gen-mach-defns): Ditto.
1950 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
1952 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
1954 * insn.scm (-parse-insn-format-symbol): Improve error message.
1955 (-parse-insn-format): Ditto.
1957 * gen-all-sim: New script.
1959 2002-12-16 DJ Delorie <dj@delorie.com>
1961 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
1963 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
1965 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
1966 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
1967 (parse_immediate16): Handle immediate16 values, which now include
1968 @hi(label) and @lo(label)
1970 2002-12-03 Alan Modra <amodra@bigpond.net.au>
1972 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
1973 Add braces and cast for union field.
1974 (gen-multi-ifield-nodes): Add braces and cast for union field.
1975 (cgen_operand_table): Similarly fix sentinel.
1976 (cgen_cpu_close): Constify "insns". Formatting.
1977 (cgen-desc.c): Include xregex.h.
1978 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
1980 <opc.c>: Include safe-ctype.h.
1981 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
1982 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
1983 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
1984 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
1985 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
1986 (parse_addr16): Correct type of "value". Formatting.
1987 (parse_addr16_p): Likewise.
1988 (parse_addr16_cjp): Likewise.
1989 (parse_lit8): Likewise.
1990 (parse_bit3): Formatting.
1991 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
1992 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
1993 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
1995 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
1996 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
1997 (print_dollarhex8): Likewise.
1998 (print_dollarhex16): Likewise.
1999 (print_dollarhex_addr16h): Likewise.
2000 (print_dollarhex_addr16l): Likewise.
2001 (print_dollarhex_p): Likewise.
2002 (print_dollarhex_cj): Likewise.
2003 (print_decimal): Likewise.
2004 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2006 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2008 * doc/rtl.texi (Model variants): Mention current limitations for
2009 unit inputs and outputs.
2010 (Hardware elements) <attribute PROFILE>: Be slightly more
2012 (Instructions) <timing>: input/output overrides have a direction
2015 2002-11-25 DJ Delorie <dj@redhat.com>
2017 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2019 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2021 * cpu/iq10.cpu: New file.
2022 * cpu/iq2000.cpu: Likewise.
2023 * cpu/iq2000.opc: Likewise.
2024 * cpu/iq2000m.cpu: Likewise.
2026 2002-11-19 DJ Delorie <dj@redhat.com>
2028 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2030 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2032 * dev.scm: Call getenv with a string, not a symbol.
2034 2002-10-08 Doug Evans <dje@transmeta.com>
2035 Hans-Peter Nilsson <hp@axis.com>
2037 * types.scm (bitrange-overlap?): Handle lsb0?.
2039 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2041 From Robert Cragie <rcc@jennic.com>:
2042 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2044 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2045 Ben Elliston <bje@redhat.com>
2046 John Healy <jhealy@redhat.com>
2047 Jeff Johnston <jjohnstn@redhat.com>
2048 Alan Lehotsky <alehotsky@redhat.com>
2049 Ubicom Inc. <SupportDesk@ubicom.com>
2051 * cpu/ip2k.cpu: New file.
2052 * cpu/ip2k.opc: Likewise.
2054 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2056 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2058 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2060 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2061 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2062 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2063 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2064 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2065 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2066 (-sthi-byte): If there is a single byte to store, store it at
2068 (sthil, sthiq): Fix big-endian behaviour.
2069 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2070 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2071 (saturate): Use Dimode to check if saturation operation is required.
2072 (usaturate): Likewise.
2074 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2075 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2076 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2077 (msadubq): Fix subword index in second operand of first subtraction.
2079 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2081 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2084 2002-06-18 Dave Brolley <brolley@redhat.com>
2086 * cpu/frv.cpu: New cpu description.
2087 * cpu/frv.opc: New cpu support code.
2089 2002-05-21 Dave Brolley <brolley@redhat.com>
2091 * decode.scm (-opcode-slots): Don't consider bits beyond the
2094 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
2096 * cpu/powerpc.cpu: New file.
2098 2002-05-01 Graydon Hoare <graydon@redhat.com>
2100 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2102 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
2104 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2105 results are expanded recursively.
2107 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
2109 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2110 call scan-symbol on it, to enable recursive macro-expansion.
2112 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
2114 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2115 for multiple-isa configurations.
2116 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2118 2002-02-04 Ben Elliston <bje@redhat.com>
2120 * cpu/sh.cpu, cpu/sh.opc: New files.
2121 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2123 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
2125 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2126 (Enumerated constants): Mention that an ifield must not specify a
2128 (Instruction operands): Ditto for index.
2129 (Expressions) <parallel>: Remove misplaced mention of local
2131 <if>: Mention that mode must be specified and non-VOID when the
2134 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
2136 * doc/porting.texi: When referring to *.opc, mention they are in
2137 the cpu subdir. Call top-level directory toplevel, not devo.
2138 Close string in define-normal-insn example.
2140 * doc/pmacros.texi: Fix .substr typo to .substring.
2141 Mention that .sym expansions are not further expanded.
2143 2002-01-22 Graydon Hoare <graydon@redhat.com>
2145 * desc-cpu.scm (ifld-number-cache): Add.
2147 (gen-maybe-multi-ifld-of-op): Add.
2148 (gen-maybe-multi-ifld): Add.
2149 (gen-multi-ifield-nodes): Add.
2150 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2152 2002-01-10 matthew green <mrg@redhat.com>
2154 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2155 (gr-Rb-names): ... to this.
2156 (h-Rb): New hardware piece.
2157 (h-Rbj): Use gr-Rb-names.
2159 (holdx): New instruction.
2161 2002-01-07 Ben Elliston <bje@redhat.com>
2163 * utils.scm (package-cygnus-simulators): Rename from this ..
2164 (package-red-hat-simulators): .. to this.
2165 * opcodes.scm (option-set!): Use package-red-hat-simulators.
2166 * sid-cpu.scm (cgen-desc.h): Likewise.
2167 (cgen-cpu.h): Likewise.
2168 (cgen-defs.h): Likewise.
2169 (cgen-write.cxx): Likewise.
2170 (cgen-semantics.cxx): Likewise.
2171 (cgen-sem-switch.cxx): Likewise.
2172 * sid-decode.scm (cgen-decode.h): Likewise.
2173 (cgen-decode.cxx): Likewise.
2174 * sid-model.scm (cgen-model.cxx): Likewise.
2175 * sid.scm (option-set!): Likewise.
2176 * sim.scm (option-set!): Likewise.
2178 2002-01-07 Ben Elliston <bje@redhat.com>
2180 * utils.scm (copyright-fsf): Add 2002.
2181 (copyright-cygnus): Rename to copyright-red-hat.
2182 (copyright-red-hat): Add 2002.
2183 (CURRENT-COPYRIGHT): Update comment.
2184 * opcodes.scm (option-set!): Update callers.
2185 * sid-model.scm (cgen-model.cxx): Likewise.
2186 * sid-cpu.scm: Likewise.
2187 * sid-decode.scm: Likewise.
2188 * sid.scm (option-set!): Handle "redhat" as an option for
2189 "copyright"; use copyright-red-hat.
2190 * sim.scm (option-set!): Likewise.
2192 2002-01-03 Dave Brolley <brolley@redhat.com>
2194 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2195 number of insns in the list. Update the population count function to
2196 identify and prioritize 3 catgories of useful bits.
2197 (-population-top-few): Don't consider bits with a population count of
2199 (-build-decode-table-entry): Don't call
2200 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
2201 identical insns at the next tree level.
2202 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2203 this function is no longer used.
2204 (filter-non-specialized-ambiguous-insns): New function.
2205 (filter-identical-ambiguous-insns): New function.
2206 (find-identical-insn): New function.
2207 (filter-harmlessly-ambiguous-insns): Removed.
2209 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
2210 matthew green <mrg@redhat.com>
2211 Frank Ch. Eigler <fche@redhat.com>
2212 Nick Clifton <nickc@cambridge.redhat.com>
2214 * cpu/xstormy16.cpu: New file.
2215 * cpu/xstormy16.opc: New file.
2217 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
2219 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2221 2001-11-14 Dave Brolley <brolley@redhat.com>
2223 * utils-gen.scm (-gen-extract-word): Correct computation of the length
2224 of the field being extracted.
2226 2001-10-29 Johan Rydberg <johan@rydberg.com>
2228 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2229 (cos ...) and (sin ..) rtx.
2231 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
2233 * desc-cpu.scm: Do not include ctype.h in generated desc
2234 files. They will inherit safe-ctype.h instead.
2236 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
2238 * desc-cpu.scm: Add missing function prototypes (for generated
2239 C files). Fix compile time warning messages about unused
2240 parameters (for generated C files).
2241 * opc-asmdis.scm: The same.
2242 * opc-ibld.c: The same.
2243 * opc-itab.scm: The same.
2244 * cpu/fr30.opc: The same.
2245 * cpu/m32r.opc: The same.
2246 * cpu/openrisc.opc: The same.
2248 2001-09-17 graydon hoare <graydon@redhat.com>
2250 * insn.scm (syntax-break-out): Correct logic in handling escaped
2253 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
2255 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2256 call @arch@_cgen_build_insn_regex now that regex support is in
2259 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
2261 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2262 (mask-superset?): Look for strict supersets to allow rejection of
2265 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2267 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2268 (cgen-desc.h): Call it.
2269 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2271 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2272 entire_insn for extraction, if it's shorter than base-insn-bitsize.
2274 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2276 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2277 mach->cpu insn-chunk-bitsize.
2278 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2279 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2280 * mach.scm (<cpu>): New field insn-chunk-bitsize.
2281 (-cpu-parse, -cpu-read): Parse/initialize it.
2282 * doc/rtl.texi (define-cpu): Document it.
2284 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
2286 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2288 2001-07-06 Ben Elliston <bje@redhat.com>
2290 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2292 2001-07-05 Ben Elliston <bje@redhat.com>
2296 * read.scm (include): Include files from srcdir/cpu.
2297 (-cgen): Likewise for loading .cpu files.
2298 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2299 * *.cpu: Move all cpu descriptions into cpu subdirectory.
2301 * simplify.inc: Likewise.
2303 2001-07-04 Ben Elliston <bje@redhat.com>
2305 * read.scm (include): Log "Including file" message at level 1,
2306 rather than outputting it with (display).
2307 (cpu-load): Log "Loading cpu description" and "Processing cpu
2308 description" messages at levels 1 and 2, respectively, rather than
2311 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
2313 * desc.scm (<keyword> 'gen-defn): Add extra zero into
2314 CGEN_KEYWORD_ENTRY initializers.
2316 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2317 (<operand> 'test-data): Involve both the index and the hardware
2318 in testcase generation.
2319 (<hw-indx> 'test-data): Generate test data from the underlying
2321 (<ifield> 'test-data): Generate test data by computing bit
2322 patterns for the field, then decoding them.
2323 (<hw-address> 'test-data): Allow for new calling convention.
2324 (<hw-iaddress> 'test-data): Likewise.
2325 (<keyword> 'test-data): Convert index values into keywords.
2326 (<hw-asm> 'test-data): Convert index values into integer strings.
2328 * gas-test.scm (cgen-build.sh): Escape '.' as well.
2330 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
2332 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2333 is required for multi-mode hw types (memory).
2335 2001-05-11 Ben Elliston <bje@redhat.com>
2337 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2338 when generating allinsn.d from objdump output. Without it, the
2339 testsuite will treat $ as the regular expression for end of line.
2341 2001-05-09 Ben Elliston <bje@redhat.com>
2343 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2344 with `cgen_cpu_open'; documentation had become out of date.
2345 * doc/rtl.texi (Instruction operands): Likewise.
2347 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
2349 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2350 various-base-length instruction sets.
2352 2001-04-02 Ben Elliston <bje@redhat.com>
2354 * sid-cpu.scm (-last-insn): New function.
2355 (-gen-sem-switch-engine): Loop through idesc while less than or
2356 equal to the last instruction enum, not less than the MAX enum.
2357 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2358 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2359 table's size to be the last instruction enum plus one, not
2361 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2362 instruction onto the instruction list.
2364 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2365 using the size of the table and its elements.
2366 (-gen-decode-insn-globals): Define the idesc table's size to be
2367 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2368 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2369 last instruction enum plus one, not @CPU@_INSN_MAX.
2371 2001-03-28 Ben Elliston <bje@redhat.com>
2373 * doc/version.texi (UPDATED, EDITION): Update.
2374 * doc/stamp-vti: Likewise.
2376 2001-03-26 Ben Elliston <bje@redhat.com>
2378 * doc/credits.texi (Credits): Update.
2380 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2381 specified prefix and, if necessary, escape `$' in gas-build.sh to
2382 prevent unwanted shell variable expansion.
2384 2001-03-24 Ben Elliston <bje@redhat.com>
2386 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2387 (<keyword>,test-data): Likewise.
2388 (<hw-address>,test-data): Likewise.
2389 (<hw-iaddress>,test-data): Likewise.
2390 (-collate-test-set): New function.
2391 (build-test-set): Use it.
2392 (gen-gas-test): Generate five test cases per instruction.
2393 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2395 * read.scm: Load "slib/random" if random is not defined.
2396 * slib/random.scm: New file.
2398 * utils.scm: Remove comments about the Hobbit compiler.
2399 (copyright-cygnus): Add 2001.
2400 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2401 (package-gnu-simulators): Tidy.
2403 2001-03-23 Ben Elliston <bje@redhat.com>
2405 * cgen-gas.scm: Inline documentation improvements.
2407 2001-03-21 Ben Elliston <bje@redhat.com>
2409 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2410 given in a syntax string is undefined.
2412 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2413 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2415 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
2417 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2418 for arg_type CGEN_CPU_OPEN_BFDMACH.
2420 2001-03-20 Ben Elliston <bje@redhat.com>
2422 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2423 instruction onto the instruction list. Define MAX_INSNS to be the
2424 value of the last instruction enum plus one.
2426 2001-03-14 Nick Clifton <nickc@redhat.com>
2428 * utils.scm (copyright-fsf): Add 2001. Remove (C).
2430 2001-03-05 Dave Brolley <brolley@redhat.com>
2432 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2433 if the number of ifields is greater than zero.
2435 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
2437 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2438 Emit LIKELY/UNLIKELY branch probability hints.
2439 * sid-decode.cpu (-gen-record-args): Ditto.
2441 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
2443 * desc-cpu.scm (-gen-hash-defines): Rename
2444 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2446 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
2448 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2450 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2451 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2453 * sid.scm (<operand> gen-write): Use unsigned long long expression
2455 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2456 (<unit> gen-profile-code): Ditto.
2458 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
2460 * doc/rtl.texi (Expressions): Document the (index-of ...) and
2463 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2465 * operand.scm (<operand> pretty-sem-name): New field.
2466 (<operand> make): Initialize it from hw-name.
2467 (op:set-pretty-sem-name!): New function.
2468 (<operand> gen-pretty-name): Default to fetching new field.
2469 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
2470 sem-name setting from -rtx-hw-name.
2472 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2474 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2475 its subsequent gen-pretty-name.
2477 * read.scm: Increase thread working stack limit and backtrace
2480 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2482 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2484 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
2486 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2487 current insn plus 4.
2488 (h-delay-insn): New hardware register.
2489 (l-jal): Uses h-delay-insn instead of pc when setting link register.
2493 * openrisc.opc (parse_hi16): Sign extend value.
2494 (parse_lo16): Likewise.
2496 2001-01-06 Ben Elliston <bje@redhat.com>
2498 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2499 instead of @cpu@ and @CPU@ to generically prefix symbol names.
2500 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2501 (-gen-semantic-fn-table): Likewise.
2502 (-gen-scache-semantic-fn): Likewise.
2503 (-gen-no-scache-semantic-fn): Likewise.
2504 (cgen-read.c): Likewise.
2505 (cgen-sem-switch.c): Likewise.
2506 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
2507 is a filename prefix.
2508 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
2509 (-gen-decode-insn-globals): Likewise.
2510 (-gen-idesc-decls): Likewise.
2511 (cgen-decode.h): Likewise.
2512 (cgen-decode.c): Likewise.
2513 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
2514 (gen-cpu-insn-enum): Likewise.
2515 (sim-finish!): Likewise.
2517 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
2519 * openrisc.cpu: New file.
2520 * openrisc.opc: Likewise.
2522 2000-12-12 Ben Elliston <bje@redhat.com>
2524 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
2526 2000-12-07 Ben Elliston <bje@redhat.com>
2528 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
2529 "insn" when there are zero ifields to extract.
2531 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
2533 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
2534 used by simple/non-scache simulators.
2535 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
2536 regardless of with-scache?.
2537 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
2539 2000-12-03 Ben Elliston <bje@redhat.com>
2541 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
2542 (cgen-desc.c): Likewise.
2544 2000-12-01 Greg McGary <greg@mcgary.org>
2546 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
2548 2000-12-01 Ben Elliston <bje@redhat.com>
2550 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
2551 definitions if run without with-multipla-isa?.
2552 (cgen-defs.h): New function. Emit an ISA-specific defs file.
2553 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
2555 2000-11-24 Ben Elliston <bje@redhat.com>
2557 * sim-cpu.scm (-gen-hardware-struct): New function.
2558 (-gen-hardware-types): If with-multiple-isa is specified, emit all
2559 hardware elements wich have share one or more ISAs with the ISAs
2562 * sim.scm (-with-multiple-isa?): New symbol.
2563 (with-multiple-isa?): New function.
2564 (option-init!): Initialise -with-multiple-isa?.
2565 (option-set!): Handle with-multiple-isa option.
2567 2000-11-21 Ben Elliston <bje@redhat.com>
2569 * utils.scm (copyright-fsf): Add the year 2000.
2571 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
2573 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
2574 unneeded "\n\n" from F() macro definition.
2576 2000-11-15 Greg McGary <greg@mcgary.org>
2578 * utils-cgen.scm (gen-define-with-symcat): New function.
2579 * desc-cpu.scm (gen-ifld-defns): Use it.
2580 (gen-hw-table-defns): Use it.
2581 (-gen-hash-defines): Use it.
2582 (gen-operand-table): Use it.
2583 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
2584 * opc-itab.scm (-gen-ifmt-table): Use it.
2585 (-gen-insn-opcode-table): Use it.
2586 (-gen-macro-insn-table): Use it.
2587 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
2588 * sim-cpu.scm (cgen-semantics.c): Use it.
2589 (cgen-sem-switch.c): Use it.
2591 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2593 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
2594 request to emit calls to insn extractors as functions rather than
2595 branches to inline blocks.
2596 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
2597 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
2599 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
2600 to extractor clauses.
2602 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2604 * decode.scm (-distinguishing-bit-population): Significantly
2605 improve popularity heuristic. Renamed from
2606 (-mask-bit-population): Gone.
2607 (-population-above-threshold): Sort new bit numbers in order of
2609 (-population-top-few): Allow up to three more bits to be selected
2610 than requested. Correct selection order to prefer better bits.
2611 Correct bug in fewer-than-requested case. Keep threshold as
2613 (decode-best-get-bits): Pass also the insn-values.
2615 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
2616 future optimization.
2618 * utils.scm (message): Format nested lists better.
2620 2000-11-09 Doug Evans <dje@casey.transmeta.com>
2622 * dev.scm: Add srcdir to %load-path.
2624 * rtx-funcs.scm (subword): Mode of argument can be different
2625 than mode of result, so don't use OP0 to specify argument's mode.
2627 2000-11-02 Ben Elliston <bje@redhat.com>
2629 * doc/porting.texi (Building a GAS test suite): Document my change
2632 2000-11-01 Ben Elliston <bje@redhat.com>
2634 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
2636 2000-10-31 Ben Elliston <bje@redhat.com>
2638 * gas-test.scm (cgen-build.sh): Allow the generated script to run
2639 with no command line arguments if the gas build directory can be
2642 2000-10-26 Doug Evans <dje@casey.transmeta.com>
2644 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
2645 op-ifld -> op-ifield.
2647 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
2649 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
2651 2000-10-13 matthew green <mrg@cygnus.com>
2653 * utils-cgen.scm (get-ifetch): Move from here ...
2654 * sim.scm (get-ifetch): ... to here.
2655 * sid.scm (get-ifetch): Copy and port to c++.
2657 2000-10-06 Dave Brolley <brolley@redhat.com>
2659 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
2660 ifld-start + ifld-word-offset.
2661 (gen-ifld-extract): Check adata-integral-insn? before checking whether
2662 the field is beyond the base number of bits.
2663 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
2664 (gen-extract-ifields): Ditto.
2665 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
2666 characters in the regular expression.
2668 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
2670 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
2671 preprocessor constant.
2673 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
2675 * slib/logical.scm: New file from slib. Provides robust bitwise
2676 logical operations for large integers.
2677 * read.scm: maybe-load it.
2679 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
2681 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
2682 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
2683 single-isa predicate, but support keep-isa filtering.
2685 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2687 * rtl-c.scm (s-sequence): Handle nested c-calls in both
2688 statement-expression and comma-expression contexts.
2689 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
2691 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2693 * decode.scm (-population-top-few): Signal error gracefully if
2694 decoding is about to become ambiguous.
2696 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2698 * doc/rtl.texi (decode-assist): Describe this field as optional.
2700 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2702 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
2705 2000-09-05 Dave Brolley <brolley@redhat.com>
2707 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
2708 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
2710 2000-08-29 Dave Brolley <brolley@redhat.com>
2712 * utils-gen.scm (gen-ifld-extract): Pass total-len if
2713 adata-integral-insn is true for this architecture.
2715 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
2717 * hardware.scm (<hw-immediate> get-index-mode): Define method.
2718 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
2719 * rtl-c.scm (-c-rtl-get): Improve an error message.
2720 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
2722 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
2724 * Makefile.in (DIST_COMMON): Regenerated.
2725 * ifield.scm (<derived-ifield> needed-iflds): New method.
2726 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
2727 sfmts built from <derived-ifield>s.
2728 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
2729 type symbol 'derived-ifield, not an unparseable string.
2730 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
2731 (-sfmt-contents): Add tracing.
2733 From Doug Evans <dje@transmeta.com>:
2734 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
2737 2000-08-20 Doug Evans <dje@casey.transmeta.com>
2739 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
2740 (rtl-c-expr-parsed,rtl-c-expr): New fns.
2741 (-rtl-c-get): Rename from rtl-c-get.
2742 (rtl-c-get): New fn for getter logging.
2744 2000-07-28 Ben Elliston <bje@redhat.com>
2748 2000-07-25 Ben Elliston <bje@redhat.com>
2750 * doc/credits.texi (Credits): Add Frank Eigler.
2752 2000-07-24 Dave Brolley <brolley@redhat.com>
2754 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
2756 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
2757 (<keyword>): Initialize all elements fully.
2758 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
2760 (-gen-mach-table-defns): Ditto.
2761 (-gen-ifld-defns): Ditto.
2762 (-gen-operand-table): Ditto.
2763 (-gen-insn-table): Ditto.
2764 (-gen-cpu-open): Nothing to do for the mach table.
2766 2000-07-13 Ben Elliston <bje@redhat.com>
2768 * doc/version.texi (UPDATED): Update.
2770 2000-07-05 Ben Elliston <bje@redhat.com>
2772 * configure.in (AC_PATH_PROG): Remove.
2773 * configure: Regenerate.
2774 * Makefile.am (GUILE): Locate guile dynamically.
2775 * Makefile.in: Regenerate.
2776 * doc/Makefile.in: Likewise.
2778 2000-07-03 Ben Elliston <bje@redhat.com>
2780 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
2781 * opc-itab.scm (cgen-opc.c): Likewise.
2783 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
2785 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
2786 guile 1.4 compatibility.
2787 (rtx-env-dump): Comment out buggy display calls.
2789 2000-06-15 matthew green <mrg@redhat.com>
2791 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
2793 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
2795 * Makefile.in: Regenerated.
2797 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
2798 (gen-ifld-defns): Ditto.
2799 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
2800 * rtl.c (rtl-finish!): Ditto.
2801 * opc-itab.scm (-gen-ifield-decls): Ditto.
2802 * opcodes.scm (gen-switch): Exclude derived operands.
2803 * operand.scm (op-iflds-used): Expand derived operands.
2804 (hw-index-derived): New dummy function to create dummy object.
2805 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
2806 constructor. Set object's hw-name and index fields.
2807 (-anyof-merge-subchoices): Set instance object's index also.
2808 (-anyof-name): New helper function.
2809 (anyof-merge-semantics): Correct replacement of operand names in
2811 (op-ifield): Tolerate derived-operands and their funny indices better.
2812 * ifield.scm (ifld-known-values): Expand derived ifields.
2813 (non-multi-ifields, non-derived-ifields): New utility functions.
2814 (ifld-decode-mode): Tolerate objects with unbound decode field.
2815 * iformat.scm (compute-insn-length): Expand derived ifields.
2816 (compute-insn-base-mask): Ditto.
2817 * insn.scm (insn-base-ifields): Remove.
2818 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
2819 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
2820 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
2821 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
2822 (-frag-test-data): Ditto.
2823 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
2824 (-gen-sem-switch-engine); Ditto.
2825 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
2826 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
2827 (-gen-record-args): Tolerate unbound op-ifield.
2828 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
2829 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
2830 Exclude multi-insns.
2831 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
2832 * utils-sim.scm (op-extract?): Handle derived operands.
2834 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
2835 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
2836 * hardware.scm (hardware-for-mode): New function.
2838 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
2839 cleaning up decode tables.
2840 (mask-superset?): Little helper function for above.
2841 * decode.scm (-build-decode-table-entry): Call it.
2842 (-opcode-slots): Add some more tracing.
2843 * arm.cpu: Disable decode-splits construct due to implementation
2844 conflict with `filter-harmlessly-ambiguous-insns'
2846 * decode.scm (-population-top-few): New function for better decode
2847 bit generation. Includes minor helper functions.
2848 (decode-get-best-bits): Call it instead.
2849 (OLDdecode-get-best-bits): Renamed previous version of above.
2852 2000-06-13 Ben Elliston <bje@redhat.com>
2854 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
2855 for the Guile library directory.
2856 * configure: Regenerate.
2857 * Makefile.in, doc/Makefile.in: Regenerate.
2859 * Makefile.in, doc/Makefile.in: Regenerate.
2860 * configure.in: Remove unnecessary tests. Move to version 1.0.
2861 * acconfig.h, config.in: Remove.
2862 * configure, aclocal.m4: Regenerate.
2863 * doc/stamp-vti, doc/version.texi: Likewise.
2864 * AUTHORS: New file.
2866 2000-06-07 Ben Elliston <bje@redhat.com>
2868 * fixup.scm (symbol-bound?): Reduce debugging output.
2870 2000-06-02 matthew green <mrg@redhat.com>
2872 * insn.scm (insn-base-ifields): Returns all the instruction fields for
2873 a given instruction, replacing derived fields with their subfields.
2874 (insn-value): Use `insn-base-ifields' to find all constant values.
2875 (multi-insn-instantiate!): Comment some debug messages.
2877 2000-06-01 Ben Elliston <bje@redhat.com>
2879 * doc/rtl.texi (Expressions): Document a hazard with the choice of
2880 symbol names used in a (c-call ..) rtx.
2882 * sim-test.scm (build-test-set): Return (()) for an instruction
2883 with no operands, so it too is included in the generated test set.
2885 2000-05-31 Ben Elliston <bje@redhat.com>
2887 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
2888 (sim-test): Likewise.
2889 * Makefile.in: Regenerate.
2891 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
2893 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
2894 stack traceback, in an order that resembles gdb's `bt'.
2896 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
2898 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
2899 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
2900 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
2902 * ifield.scm (multi-ifield): Define workable field-mask and field-value
2904 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
2905 * iformat.scm (ifmt-expanded-ifields): Gone.
2906 (ifields-base-ifields): New function. Call ifld-base-ifields for real
2908 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
2911 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
2914 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
2916 * sid.scm (with-any-profile?): New function clone.
2918 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
2920 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
2922 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
2924 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
2925 (-multi-ifield-read): Parse them.
2926 (define-full-multi-ifield): Pass #f/#f as defaults for them.
2927 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
2928 (multi-ifield gen-extract): Add decode hook.
2929 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
2931 * insn.scm (syntax-break-out): More correctly handle \-escaped
2933 (syntax-make-elements): Ditto.
2934 * opc-itab.scm (compute-syntax): Ditto.
2936 2000-05-17 Ben Elliston <bje@redhat.com>
2938 * gas-test.scm (cgen-build.sh): Log the correct script filename.
2940 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
2942 * gas-test.scm (build-test-set): Return (()) for an instruction
2943 with no operands, so it too is included in the generated test set.
2945 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
2947 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
2948 IFMT_OPERANDS and SYNTAX_BYTES.
2950 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
2952 * sim.scm (with-any-profile?): New function.
2953 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
2954 to decide whether or not to include profiling counters.
2956 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
2958 Fuller derived-operand support for opcodes.
2959 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
2960 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
2961 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
2962 (gen-operand-table): Omit derived- and anyof- operands from table.
2963 (gen-insn-table): Omit multi-insns from table.
2964 * iformat.scm (ifmt-expanded-fields): New function to expand
2965 subfields of derived-ifields.
2966 (ifmt-compute!): Ignore remaining multi-insns.
2967 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
2969 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
2970 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
2971 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
2972 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
2973 (gen-switch): Omit anyof-operands.
2974 * operand.scm (-anyof-syntax): New function.
2975 (-anyof-merge-syntax): Call it.
2976 * utils.scm (collect): New idiomatic function.
2978 2000-05-10 Ben Elliston <bje@redhat.com>
2980 * m68k.cpu: New file (work in progress).
2982 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
2984 * Makefile.am (all-local): New target. Create stamp-cgen.
2985 * Makefile.in: Regenerated.
2986 * doc/Makefile.in: Regenerated.
2988 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
2990 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
2991 (-operand-parse-setter): Ditto.
2992 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
2993 for CACHE-ADDR operands.
2994 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
2995 trace entries. Widen byte-wide values for printing.
2996 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
2997 Widen byte-wide values for printing. Hexify memory addresses.
2999 2000-04-23 matthew green <mrg@redhat.com>
3001 * m32r.cpu: Fix a typo.
3003 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3005 * ia64.cpu (define-model): Change merced to Itanium.
3006 (f-qp): Change quilifying to qualifying.
3007 (movbr_ph, movbr_pvec): Delete.
3008 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3010 2000-04-07 Ben Elliston <bje@redhat.com>
3012 * doc/porting.texi (Building a simulator test suite): Clarify
3013 where generated test cases are placed.
3015 2000-04-07 Ben Elliston <bje@redhat.com>
3017 * Makefile.am (gas-test): Remove dependency on `cgen'.
3019 * Makefile.in: Regenerate.
3021 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3023 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3024 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3025 type reconfiguration.
3026 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3029 2000-03-30 Ben Elliston <bje@redhat.com>
3031 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3033 2000-03-24 Ben Elliston <bje@redhat.com>
3035 * Makefile.am (stamp-cgen): Reinstate target.
3036 * Makefile.in: Regenerate.
3038 2000-03-22 Ben Elliston <bje@redhat.com>
3040 * slib/ppfile.scm: Remove; unused.
3041 * slib/defmacex.scm: Likewise.
3043 2000-03-21 Ben Elliston <bje@redhat.com>
3045 * doc/internals.texi (Source file overview): Document.
3047 * Makefile.am (GUILEDIR): Remove.
3048 (CGEN): Ditto. Callers use $(GUILE) instead.
3049 (GUILEFLAGS): Ditto.
3051 (APPDESCFILES): Ditto.
3052 (OPCODESFILES): Ditto.
3054 (pkgdata_SCRIPTS): Ditto.
3055 (stamp-cgen): Remove target.
3056 * Makefile.in: Regenerate.
3058 * configure.in: Remove header and library tests.
3059 * configure: Regenerate.
3060 * config.in: Likewise.
3062 2000-03-20 Ben Elliston <bje@redhat.com>
3064 * read.scm: Cease loading "hob-sup.scm".
3065 * utils.scm: Inherit the fastcall family of procedures (for now).
3066 * hob-sup.scm: Remove.
3068 2000-03-20 Ben Elliston <bje@redhat.com>
3070 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3071 * configure: Regenerate.
3072 * gdbinit.in: Remove.
3074 2000-03-17 Ben Elliston <bje@redhat.com>
3076 * Makefile.am (CGEN): Use guile, not cgen.
3077 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3078 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3079 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3080 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3081 (HOB_OBJS): Likewise.
3082 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3083 (CGENOBJS): Likewise.
3084 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3085 (hobbit, hobbit.o, hobbit.c): Remove targets.
3086 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3087 (CLEANFILES): Update.
3088 * acconfig.h (WITH_HOBBIT): Remove.
3089 * configure.in: Do not test for 3 arg scm_make_vector. Remove
3090 option --with-cgen-hobbit.
3091 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3092 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3093 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3094 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3095 * Makefile.in: Regenerate.
3096 * config.in: Likewise.
3097 * aclocal.m4: Likewise.
3098 * configure: Likewise.
3099 * README (Hobbit support): Remove.
3100 * doc/internals.texi (Conventions): Do not mention Hobbit.
3101 * doc/porting.texi (Supported Guile versions): Likewise.
3103 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
3105 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3106 callback convention to new sid sidutil::basic_cpu code.
3107 (-gen-sfrag-engine-fn): Ditto.
3108 * sid.scm (-create-virtual-insns!): Ditto.
3109 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3111 (cxmake-skip): Implement properly for pbb mode.
3113 2000-03-03 Ben Elliston <bje@redhat.com>
3115 * doc/internals.texi: New file.
3117 2000-02-29 Ben Elliston <bje@redhat.com>
3119 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3120 * doc/porting.texi: Formatting tweaks.
3122 2000-02-25 Nick Clifton <nickc@cygnus.com>
3124 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3127 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
3129 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3132 2000-02-23 Andrew Haley <aph@cygnus.com>
3134 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3137 2000-02-24 Ben Elliston <bje@redhat.com>
3139 * doc/rtl.texi (Derived operands): Add some cindex entries.
3141 2000-02-23 Ben Elliston <bje@redhat.com>
3143 * ia32.cpu (dndo): Move general purpose macro from here ..
3144 * simplify.inc (dndo): .. to here.
3146 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
3148 * arm.cpu (h-tbit): Add c-call setter function.
3151 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
3153 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3154 (-frag-cost-compute!): Ditto.
3155 * utils.scm (copyright-cygnus): Add Y2K.
3156 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3158 2000-01-25 Nick Clifton <nickc@cygnus.com>
3160 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3161 flags field of the CGEN_CPU_TABLE structure.
3163 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
3165 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3166 All references updated.
3168 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
3170 * ia32.cpu: Rewrite addressing mode support.
3172 * ifield.scm (<ifield>): New member `follows'.
3173 (ifld-known-values): New proc.
3174 (<ifield>): New method set-word-offset!.
3175 (ifld-set-word-offset!): New proc.
3176 (ifld-new-word-offset): New proc.
3177 (<ifield>): New method next-word.
3178 (<multi-ifield>): New method next-word.
3179 (ifld-next-word): New proc.
3180 (ifld-precedes?): New proc.
3181 (-ifield-parse): New args word-offset,word-length,follows.
3182 All callers updated. Handle CISC-style vs RISC-style ifields.
3183 (-ifield-read): Recognize word-offset,word-length,follows specs.
3184 (-ifld-parse-follows): New proc.
3185 (-multi-ifield-make-default-insert): New proc.
3186 (-multi-ifield-make-default-extract): New proc.
3187 (-multi-ifield-parse): Provide default values for insert,extract
3188 handlers if not specified.
3189 (<derived-ifield>): New class.
3190 (derived-ifield?): New predicate.
3191 (ifld-derived-operand?): New predicate.
3192 (f-anyof): New global.
3193 (ifld-anyof?,ifld-anyof-operand?): New predicates.
3194 (f-derived,ifld-derived?): Delete.
3195 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
3196 * insn.scm (-sub-insn-ifields): New proc.
3197 (-sub-insn-make!): New proc.
3198 (multi-insn-instantiate!): Provide initial implementation.
3199 (-insn-parse): If insn contains "anyof" operands, create a
3200 <multi-insn> object instead of a plain <insn>.
3201 (-parse-insn-format-symbol): Rewrite derived operand handling.
3202 Add anyof operand handling.
3203 (-parse-insn-format-ifield-spec): Rewrite.
3204 (-parse-insn-format-operand-spec): Delete.
3205 (-parse-insn-format-list): Delete support for `(operand value)'.
3206 (anyof-operand-format?): Replaces derived-operand-format?.
3207 * operand.scm (-operand-parse-getter): Improve error messages.
3208 (-operand-parse-setter): Ditto.
3209 (<derived-operand>): New members args,syntax,base-ifield,encoding,
3211 (<anyof-operand>): Change baseclass from <derived-operand> to
3212 <operand>. Delete member values. New members base-ifield,choices.
3213 (anyof-operand?): New predicate.
3214 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3215 (-derived-operand-parse): Rewrite.
3216 (-derived-operand-read): Rewrite.
3217 (-anyof-parse-choice): New proc.
3218 (-anyof-operand-parse): Rewrite.
3219 (-anyof-operand-read,define-anyof-operand): New procs.
3220 (<anyof-value>): Rewrite.
3221 (-anyof-initial-known): New proc.
3222 (anyof-satisfies-assertions?): New proc.
3223 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3224 (-anyof-merge-getter,-anyof-merge-setter): New procs.
3225 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3226 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3227 (-anyof-value-from-derived): New proc.
3228 (-anyof-all-choices-1,anyof-all-choices): New procs.
3229 (operand-init!): Create define-anyof-operand reader command.
3231 * insn (syntax-break-out): Take syntax as argument instead of insn.
3232 All callers updated.
3233 (syntax-make): Move here, from ???.
3235 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3236 bitrange-foo. All uses updated.
3237 (bitrange-next-word): New proc.
3239 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3241 * rtl.scm (rtx-canonicalize): Provide initial implementation.
3242 (rtx-make-const,rtx-make-enum): New procs.
3243 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
3244 (rtx-mem-addr,rtx-mem-sel): New procs.
3245 (rtx-change-address): New proc.
3246 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3247 (rtx-make-set,rtx-single-set?): New procs.
3248 (rtx-combine): New proc.
3250 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
3251 (rtx-traverse-with-locals): Ditto.
3252 (-rtx-traverse,-rtx-traverse-*): Ditto.
3254 * rtl.scm (define-subr): New proc.
3255 (rtl-init!): Create reader command `define-subr'.
3257 * cos.c (_object_mi_p): Ensure argument is an object.
3258 (indent): New function.
3259 (_object_print_elms): Add pretty-printing support.
3260 (_object_print): Ditto.
3262 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3263 (*floats-s->c-fun-table*): Ditto.
3264 * hobbit.c,hobbit.h: Rebuild.
3265 * hob-sup.c (fastcall7): New proc.
3266 * hob-sup.h (fastcall7): Declare.
3267 * hob-sup.scm (fastcall7): New macro.
3269 * mach.scm (<arch>): New member subr-list.
3270 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3271 (arch-finish!): Reverse recorded subr list.
3273 * read.scm (debug-env): New global.
3274 (debug-var-names,debug-var,debug-repl-env): New procs.
3275 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
3276 (debug-quit): Renamed from `continue'.
3278 * simplify.inc (dsmf): New pmacro.
3280 * utils.scm (plus-scan): New proc.
3281 (split-bits): Rewrite.
3282 (split-value): New proc.
3284 1999-10-13 Doug Evans <devans@casey.cygnus.com>
3286 * doc/Makefile.am (DOCFILES): Add notes.texi.
3287 * doc/Makefile.in: Rebuild.
3289 1999-10-11 Doug Evans <devans@casey.cygnus.com>
3291 * ifield.scm (ifld-derived?): New proc.
3292 (f-derived): New global.
3293 (ifield-builtin!): Create ifield f-derived.
3294 (<multi-insn>): New class.
3295 (multi-insn?): New predicate.
3296 (multi-insn-instantiate!): New proc.
3297 (-insn-parse): Create <multi-insn> objects for insns with derived
3299 (-parse-insn-format-symbol): Handle derived ifields.
3300 (-parse-insn-format-ifield-spec): New proc.
3301 (-parse-insn-format-operand-spec): New proc.
3302 (-parse-insn-format-list): Simplify.
3303 (-parse-insn-format): No longer allow (ifield-object value) spec.
3304 (derived-operand-format?): New proc.
3305 (insn-alias?): New proc.
3306 (non-alias-insns): Rewrite.
3307 (insn-real?): Renamed from real-insn?, all callers updated.
3308 (virutal-insns): Rewrite.
3309 (multi-insns): New proc.
3310 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3311 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3312 Return #f if operand doesn't have an index or if index is not an
3314 (hw-index-anyof): New proc.
3315 (-operand-parse): Allow integer indices.
3316 (<derived-operand>): New class.
3317 (derived-operand?): New predicate.
3318 (<anyof-operand>): New class.
3319 (<anyof-value>): New class.
3320 (-anyof-parse-value,-anyof-operand-parse): New procs.
3321 (-derived-operand-parse,-derived-operand-read): New procs.
3322 (define-derived-operand,define-full-derived-operand): New procs.
3323 (operand-init!): New reader command define-derived-operand.
3325 * utils.scm (list-take): Handle negative amount.
3326 (element?): Rewrite.
3328 1999-10-10 Doug Evans <devans@casey.cygnus.com>
3330 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3332 1999-10-04 Richard Henderson <rth@cygnus.com>
3334 * ia64.cpu: Checkpoint.
3336 1999-09-29 Doug Evans <devans@casey.cygnus.com>
3338 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3340 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
3341 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
3343 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
3345 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3346 PC returned by sim_engine_invalid_insn.
3348 1999-09-28 Doug Evans <devans@casey.cygnus.com>
3350 * ia32.cpu: New file.
3352 1999-09-25 Doug Evans <devans@casey.cygnus.com>
3354 * utils.scm (bit-set?): Fix off by one error.
3356 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3358 * rtl.scm (hw): Check for valid hardware element before trying to
3361 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
3362 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3363 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3364 * thumb.cpu (*): arm_compute_operand2_foo renamed to
3365 compute_operand2_foo.
3367 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3368 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3369 Call delayed_branch/branch methods instead of assigning to `vpc'.
3370 (<hw-pc>,cxmake-skip): Call skip method.
3371 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3372 (<pc>,cxmake-skip): Ditto.
3373 (-create-virtual-insns!): Ditto.
3374 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3376 (op:record-profile): Specify #:output-language "c++".
3377 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3379 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3381 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3382 (gen-semantic-code): Ditto.
3383 (-gen-sem-case,-gen-sfrag-code): Ditto.
3384 (-gen-hardware-types): Delete class @cpu@_cpu_base.
3385 (cgen-cpu.h): File is now #included by main cpu class, rather than
3387 (cgen-defs.h): New proc.
3388 (-gen-scache-semantic-fn): Change result type to sem_status.
3389 New local `status'. Call done_cti_insn/done_insn method at end.
3390 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3392 (cgen-sem-switch.cxx): Ditto.
3393 * sid-decode.scm (-gen-idesc-decls): Update return type of
3395 (cgen-decode.h): Add using namespace @arch@.
3396 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3398 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3399 (estate-output-language-c?,estate-output-language-c++?): New procs.
3400 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3401 (estate-make-for-normal-rtl-c++): New proc.
3402 (rtl-c++-parsed,rtl-c++): New proc.
3403 (s-c-call): Invoke cpu class method if c++.
3404 (join): Use s-c-raw-call.
3406 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3409 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3410 * rtl.scm (<eval-state>): New member `modifiers'.
3411 (<eval-state>,vmake!): Handle #:modifiers.
3412 (estate-with-modifiers): New proc.
3414 * rtl.scm (rtx-side-effects?): New proc.
3415 (rtx-canonical-bool): Don't change expr if it has side effects.
3416 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3419 1999-09-23 Doug Evans <devans@casey.cygnus.com>
3421 * sim.scm (gen-scache-type): Fix typo in last patch.
3423 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
3425 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3427 1999-09-05 Doug Evans <devans@casey.cygnus.com>
3429 * sid.scm (<hw-pc>,cxmake-skip): New method.
3430 (<pc>,cxmake-skip): New method.
3432 * decode.scm (decode-build-table): Delete args startbit,index-list.
3433 All callers updated.
3434 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3435 All callers updated.
3436 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3437 to decode-get-best-bits.
3438 * sid-decode.scm (-gen-decode-fn): Ditto.
3440 * hardware.scm (hw-bits): New proc.
3441 (-hw-parse): New arg layout. All callers updated.
3442 (define-full-hardware): New arg layout. All callers updated.
3443 (-hw-validate-layout): New proc.
3444 (-hw-create-[gs]etter-from-layout): New procs.
3445 (<hw-register>,parse!): Handle layout spec.
3446 * types.scm (type-bits): New proc.
3448 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3449 UNARY, BINARY, TRINARY rtxs.
3451 * attr.scm (<enum-attribute>,parse-value): Allow strings.
3452 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3453 Support '- as "unused spot" indicator.
3455 1999-09-03 Doug Evans <devans@casey.cygnus.com>
3457 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3459 1999-09-02 Doug Evans <devans@casey.cygnus.com>
3461 * rtx-funcs.scm (subword): Fix mode spec of `value'.
3463 * rtl.scm (-rtx-traverse-operands): Fix debugging message
3465 (tstate-make): New arg `depth'. All callers updated.
3466 (tstate-depth,tstate-set-depth!): New procs.
3467 (tstate-incr-depth!,tstate-decr-depth!): New procs.
3468 (-rtx-traverse-operands): Indent debugging output by traversal depth.
3469 (-rtx-traverse): Ditto. Keep track of traversal depth.
3471 1999-09-01 Doug Evans <devans@casey.cygnus.com>
3473 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3474 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3475 * utils-sim.scm: Decoder generator support moved here.
3476 (-decode-equiv-entries?,-decode-sort-entries): New procs.
3477 (-gen-decoder-switch): Sort entries for more fall-throughs.
3479 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3480 * Makefile.in: Rebuild.
3481 * sim-test.scm (build-sim-testcase): Add logging message.
3482 * dev.scm (cload): Recognize SIM-TEST application.
3483 (load-stest): Set APPLICATION to SIM-TEST.
3485 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3487 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3488 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3489 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3491 * insn.scm (syntax-break-out): Handle ${foo}.
3493 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
3495 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3496 (bin_PROGRAMS): Define.
3497 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3498 (cgen-hob.c): Prepend $(srcdir)/ here.
3499 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3500 (libcpu_a_SOURCES): Delete.
3501 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3502 (CGEN_HOB_OBJ,CGENOBJS): New variables.
3503 * configure.in (LIBS): Replace -Wl,-rpath with -R.
3504 Add AC_CHECK_LIB(guile,main).
3505 * Makefile.in: Rebuild.
3506 * doc/Makefile.in: Rebuild.
3507 * aclocal.m4: Rebuild.
3508 * config.in: Rebuild.
3509 * configure: Rebuild.
3511 1999-08-28 Doug Evans <devans@casey.cygnus.com>
3513 Rename rtx functions from name: to name, accept optional leading
3515 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
3516 * attr.scm (-attr-eval): Update.
3517 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
3518 (<hw-register>,mode-ok?): Disallow VOID.
3519 (<hw-immediate>,mode-ok?): Disallow VOID.
3520 (<hw-address>,mode-ok?): Disallow VOID.
3521 * mode.scm (mode-name?): New proc.
3522 (VOID): Renamed from VM.
3523 (DFLT): Renamed from DM.
3524 (mode-builtin!): Update.
3525 * opcodes.scm (<ifield>,gen-insert): Update.
3526 (<ifield>,gen-extract): Update.
3527 (<multi-ifield>,gen-insert,gen-extract): Update.
3528 * operand.scm (op:mode): Update.
3529 (<pc>,make!): Update.
3530 (op:new-mode): Update.
3531 (-operand-read): Update.
3532 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
3533 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
3534 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
3535 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
3536 (rtx-make): Call -rtx-munge-mode&options.
3537 (rtx accessors): Rewrite.
3538 (rtx-pretty-name): Update.
3539 (-rtx-traverse-*): Update.
3540 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
3541 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
3542 (-rtx-make-traverse-table): Update.
3543 (-rtx-traverse-operands): Update.
3544 (-rtx-option?,-rtx-option-list?): New procs.
3545 (-rtx-munge-mode&options): New proc.
3546 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
3547 (-rtx-traverse): Update.
3548 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
3549 (rtx-compile-time-constant?): Update.
3550 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
3551 (rtx-value): Update.
3552 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
3553 * rtx-funcs.scm (*): Update.
3554 * rtl-c.scm (rtl-c-get): Update.
3555 (rtl-c-set-quiet,rtl-c-set-trace): Update.
3556 (s-c-call,s-c-raw-call): Update.
3557 (s-boolifop,s-convop,s-if,s-cond): Update.
3558 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
3559 (-par-replace-set-dests,-par-replace-set-srcs): Update.
3560 (s-parallel,s-sequence): Update.
3561 (rtl-c-build-table): Update.
3562 * sem-frags.scm (-frag-hash-compute!): Update.
3563 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
3564 for temporary bug compatibility with previous version.
3565 (-frag-expr-locals,-frag-expr-stmts): Update.
3566 (-frag-compute-desired-frags,-frag-pick-best): Update.
3567 * semantics.scm (-simplify-expr-fn): Update.
3568 (rtx-simplify): Update.
3569 (-rtx-ref-type): Update. Account for modifiers.
3570 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
3571 (-build-ifield-operand!): Update.
3572 (-build-known-values): Update.
3573 (semantic-compile): Update.
3574 (-gen-reg-access-defns): Update.
3575 (gen-semantic-code,-gen-sem-case): Update.
3576 (-gen-sfrag-code,-gen-sfrag-case): Update.
3577 * sim-cpu (gen-semantic-code): Update.
3578 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
3579 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
3580 (-hw-cxmake-get): Update.
3581 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3582 (<hw-index>,cxmake-get): Update.
3583 (<operand>,gen-type,gen-read,cxmake-get): Update.
3584 (<operand>,gen-set-quiet,gen-set-trace): Update.
3585 (<pc>,cxmake-get): Update.
3586 (sim-finish!): Update.
3587 * utils-gen.scm (-gen-ifld-extract-base): Update.
3588 (-gen-ifld-extract-beyond): Update.
3589 (gen-multi-ifld-extract): Update.
3590 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
3591 * sid.scm (<hw-pc>,gen-write): Update.
3592 (-gen-decode-insn-globals): Update.
3593 (-hw-cxmake-get): Update.
3594 (<hw-register>,cxmake-get-raw): Update.
3595 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3596 (<hw-index>,cxmake-get): Update.
3597 (<operand>,gen-type,gen-read,cxmake-get): Update.
3598 (<operand>,gen-set-quiet,gen-set-trace): Update.
3599 (<pc>,cxmake-get): Update.
3600 (-create-virtual-insns!): Update.
3601 (-decode-split-build-assertion): Update.
3603 * simplify.inc: Update.
3605 1999-08-20 Doug Evans <devans@casey.cygnus.com>
3607 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
3608 Prefix queue function name with sim_ instead of @cpu@_.
3610 * sim.scm (-with-parallel-only?): New global.
3611 (option-init!): Initialize it.
3612 (option-set!): Set it.
3613 (with-parallel-only?): New proc.
3614 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
3615 and writeback markers if with-parallel-only.
3616 (-gen-idesc-init-fn): Update.
3617 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
3620 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
3622 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
3623 with the invalid insn handler.
3625 * utils.scm (list-maybe-ref): New proc.
3627 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
3629 (-mach-parse): Signal error if mach wasn't specified in define-arch.
3631 * i960.cpu (test*-*): Delete `expr' arg.
3632 (test-op,branch-op): Update.
3634 1999-08-09 Doug Evans <devans@casey.cygnus.com>
3636 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
3637 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
3639 (gen-reg-access-defn): Ditto.
3640 (-gen-hw-addr): Rewrite.
3641 (-op-gen-queued-write): Rewrite.
3642 * sim-cpu.scm (-gen-cpu-reg-access-decls):
3643 (-gen-scache-semantic-fn): Handle with-generic-write.
3644 (-gen-no-scache-semantic-fn): Ditto.
3646 1999-08-08 Doug Evans <devans@casey.cygnus.com>
3648 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
3650 * sim.scm (-with-generic-write?): New global.
3651 (option-init!): Initialize it.
3652 (option-set!): Set it.
3653 (with-generic-write?): New proc.
3654 (-gen-hw-addr): New proc.
3655 (-op-gen-queued-write): New proc.
3656 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
3658 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
3660 (-gen-sem-switch): Preserve existing with-parallel? value.
3661 (-gen-sem-parallel-switch): Ditto.
3662 (-gen-write-case): Add /indent support.
3663 (cgen-write.c): Rewrite.
3665 * utils.scm (-current-print-state): New global.
3666 (make-print-state): New proc.
3667 (pstate-indent,pstate-set-indent!): New procs.
3668 (pstate-cmd?,pstate-cmd-do): New procs.
3669 (/indent): New global.
3670 (/indent-set,/indent-add): New procs.
3671 (string-write): Set -current-print-state.
3672 (-string-write): New arg pstate, all callers updated.
3673 Handle print-state commands.
3674 (-string-list-flatten): New proc.
3675 (string-list->string): Use it.
3677 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
3678 (-gen-sem-fn-table-entry): New proc.
3679 (-gen-semantic-fn-table): New proc.
3680 (-gen-scache-semantic-fn): Make fn static.
3681 (-gen-no-scache-semantic-fn): Ditto.
3682 (cgen-semantics.c): Define macro SEM_FN_NAME.
3683 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
3684 FAST,FULL. Update @cpu@_insn_sem contents.
3685 (-gen-semf-fn-name): Delete.
3686 (-gen-sem-fn-decls): Delete.
3687 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
3688 @cpu@_semf_init_idesc_table.
3689 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
3691 (cgen-decode.h): Print sfmt enum.
3692 * sid-decode.scm (-gen-semf-fn-name): Delete.
3693 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
3695 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
3696 (ifmt-compute!): Ditto.
3697 * sim-decode.scm (-gen-decoder-switch): Ditto.
3698 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
3699 (-gen-decoder-switch): Ditto.
3701 * insn.scm (insn-virtual?): New proc.
3703 * enum.scm (gen-enum-decl): Speed up, build string as list and then
3705 * mach.scm (<arch>): attr-list is now a pair of lists.
3706 (current-attr-list): Rewrite.
3707 (current-attr-add!,current-attr-lookup): Rewrite.
3708 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
3710 1999-08-06 Richard Henderson <rth@cygnus.com>
3712 * ia64.cpu: Initial checkpoint.
3714 1999-08-06 Doug Evans <devans@casey.cygnus.com>
3716 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
3717 (pmacros-init!): Update .apply help string.
3719 1999-08-03 Doug Evans <devans@casey.cygnus.com>
3721 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
3722 (<hw-pc>,cxmake-skip): New method.
3723 (<pc>,cxmake-skip): New method.
3724 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
3725 (gen-argbuf-type): New member `skip_count'.
3726 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
3727 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
3729 * utils-sim.scm: New file.
3730 * dev.scm (load-sim): Load it.
3731 (load-sid): Load it.
3732 * cgen-sid.scm: Load it.
3733 * cgen-sim.scm: Load it.
3734 * iformat.scm (<sformat>): New member sbuf, not initialized by
3736 * rtx-funcs.scm (skip): Rewrite.
3737 * rtl-c.scm (skip): Rewrite.
3738 * m32r.cpu (sc,snc): Update `skip' usage.
3739 * mode.scm (mode-real-mode): New proc.
3740 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
3741 Distinguish fragments by the <sformat-abuf> they use.
3742 * sim.scm (gen-profile-index-type): Delete.
3743 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
3744 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
3745 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
3746 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
3747 (-gen-argbuf-elm): Rewrite.
3748 (-gen-argbuf-hw-elm): Delete.
3749 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
3751 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
3752 (sim-init!): Initialize them.
3753 (sim-analyze-insns!): Set them.
3754 (current-sbuf-list): New proc.
3755 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
3756 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
3757 * sim-model.scm (-gen-model-insn-fn): Ditto.
3758 * sim-decode.scm (-gen-extract-decls): Delete.
3759 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
3760 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
3762 (<hw-register,gen-extract,gen-trace-extract): Ditto.
3763 (<hw-address,gen-extract,gen-trace-extract): Ditto.
3764 (-gen-op-extract,-gen-op-trace-extract): New procs.
3765 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
3766 gen-sfmt-argvars-foo and rewrite.
3767 (-gen-record-args): Rewrite.
3768 (-gen-extract-case): Tweak.
3769 * sid.scm (gen-profile-index-type): Delete.
3770 (ifield argbuf support): Move to utils-sim.scm.
3771 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
3772 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
3773 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
3774 (-sim-sformat-argbuf-list): New global.
3775 (sim-init!): Initialize it.
3776 (sim-analyze-insns!): Set it.
3777 (current-sbuf-list): New proc.
3778 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
3779 (-gen-argbuf-hw-elm): Delete.
3780 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
3782 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
3783 (-gen-extract-decls): Delete.
3784 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
3786 (<hw-register,gen-extract,gen-trace-extract): Ditto.
3787 (<hw-address,gen-extract,gen-trace-extract): Ditto.
3788 (-gen-op-extract,-gen-op-trace-extract): New procs.
3789 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
3790 gen-sfmt-argvars-foo and rewrite.
3791 (-gen-record-args): Rewrite.
3792 (-gen-extract-case): Tweak.
3794 * cgen-gh.c (gh_putc,gh_puts): New functions.
3795 * cgen-gh.h (gh_putc,gh_puts): Declare them.
3796 * cos.c (_object_print_elms,_object_print): Use them.
3797 * hob-sup.c (fastcall_print): Use them.
3798 * configure.in: Check for scm_gen_puts, scm_puts.
3799 * config.in: Rebuild.
3800 * configure: Rebuild.
3801 * aclocal.m4: Rebuild.
3802 * Makefile.in: Rebuild.
3804 * dev.scm (load-opc): Use load instead of maybe-load.
3805 (load-gtest,load-sim,load-stest): Ditto.
3808 1999-07-23 Doug Evans <devans@casey.cygnus.com>
3810 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
3811 up to avoid g++ 'goto crosses initialization' warning.
3812 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
3813 (-gen-sfrag-case): Update use of NEXT_FRAG.
3815 1999-07-22 Doug Evans <devans@casey.cygnus.com>
3817 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
3819 * read.scm: Load sem-frags.scm.
3820 * sem-frags.scm (*): Lots rewritten.
3821 * sid.scm (-with-sem-frags?): New global
3822 (with-sem-frags?): New proc.
3823 (option-init!): Initialize -with-sem-frags?.
3824 (option-set!): Recognize with-sem-frags.
3825 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
3826 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
3828 (-gen-sfrag-engine-decls): New proc.
3829 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
3830 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
3831 (-gen-sfrag-engine): New proc.
3832 (-gen-sem-case): Emit setup-semantics if specified.
3833 (-gen-sem-switch-engine): Update init/use of computed goto label.
3834 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
3836 (-gen-idesc-decls): Replace sem_address with cgoto.
3837 (-gen-scache-decls): Rewrite definition of `execute' member.
3838 * arm.cpu (arm isa): Enable decode-splits.
3839 * arm7.cpu (multiply insns): Rename result to mul-result.
3841 Rename decode-specialize to decode-split.
3842 * decode.scm (*): Update.
3843 * insn.scm (*): Update.
3844 * mach.scm (*): Update.
3845 * sid.scm (*): Update.
3847 1999-07-19 Doug Evans <devans@casey.cygnus.com>
3849 Record objects as a smob.
3850 * cos.c (scm_tc16_object): New static global.
3851 (cos_init): Initialize it.
3852 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
3853 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
3854 (_object_tag): Delete.
3855 (_object_make_smob): New function.
3856 (_object_make_x,_object_make_with_values_x): Rewrite.
3857 (_object_elements,_object_class_desc): Rewrite.
3858 (_object_copy,object_p): Rewrite.
3859 (_object_specialize): Rewrite.
3860 (_object_print_elms,_object_print): New functions.
3861 (object_smob): New static global.
3862 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
3864 * cos.c (_make_x_symbol): New static global.
3865 (object_make): Use it.
3866 (cos_init): Initialize it.
3868 1999-07-15 Doug Evans <devans@casey.cygnus.com>
3870 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
3871 instead to determine whether to use FLD macro.
3872 (<rtl-c-eval-state>): New member ifield-var?.
3873 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
3874 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
3875 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
3877 * rtl.scm (rtx-sequence-assq-locals): New proc.
3879 * cos.scm (-object-error): Don't crash on non-objects.
3881 * Makefile.am (CLEANFILES): Add hobbit.
3882 * Makefile.in: Rebuild.
3884 * rtl-c.scm (s-c-call): Delete unnecessary code.
3886 1999-07-14 Doug Evans <devans@casey.cygnus.com>
3888 * rtl-c.scm (ifield): Always reference value via `FLD'.
3890 * cos.c (elm_bound_p): Return problem SCM boolean values.
3892 * utils-cgen.scm (display-argv): New proc.
3893 * cgen-opc.scm (cgen): Call it.
3894 * cgen-sim.scm (cgen): Ditto.
3895 * cgen-gas.scm (cgen): Ditto.
3896 * cgen-stest.scm (cgen): Ditto.
3897 * cgen-sid.scm (cgen): Ditto.
3899 1999-07-05 Doug Evans <devans@casey.cygnus.com>
3901 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
3902 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
3903 (-gen-extract-switch): Initialize result to 1.
3904 * opcodes.scm (gen-ifield-default-type): New proc.
3905 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
3907 (<hw-index>,gen-insert): Handle non-ifield indices.
3908 (<hw-index>,gen-extract): Ditto.
3909 (<hw-asm>,gen-parse): Ditto.
3910 (<hw-asm>,gen-print): Ditto.
3911 (<keyword>,gen-parse): Ditto.
3912 (<keyword>,gen-print): Ditto.
3913 (<operand>,gen-fget): Ditto.
3914 (<operand>,gen-fset): Ditto.
3916 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
3917 (-gen-hw-index): Ditto.
3918 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
3919 (-gen-hw-index): Ditto.
3921 * sem-frags.scm: New file.
3923 * attr.scm (attr-parse): Add better checking of input.
3925 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
3927 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
3929 * ifield.scm (ifld-nil?): New proc.
3931 * operand.scm (<operand>): New members getter,setter.
3932 (<operand>,make!): New args getter,setter. All uses updated.
3933 (op:getter,op:setter): New procs.
3934 (<hw-index>,field-start): Return 0 for non-ifield indices.
3935 (<hw-index>,field-length): Return 0 for non-ifield indices.
3936 (-operand-parse-getter,-operand-parse-setter): New procs.
3937 (-operand-parse): New args getter,setter. All callers updated.
3938 Always use hw-index-scalar for scalar operands.
3939 (-operand-read): Handle getter,setter.
3940 (define-full-operand): New args getter,setter. All uses updated.
3941 * semantics.scm (-build-ifield-operand!): Update.
3942 (-build-index-of-operand!): Update.
3943 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
3944 * simplify.inc (define-normal-operand): Update.
3946 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
3947 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
3948 (s-binop,s-cmpop,s-convop): Ditto.
3949 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
3950 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
3951 (fcc-tests): New insn-enum.
3952 (fcc-value): Rename from fcc-type.
3953 * sparcfpu.cpu: New file. All fp support moved here.
3955 * rtl.scm (<rtx-func>): New member class.
3956 (rtx-class-*?): New procs.
3957 (def-rtx-node): New arg class. All callers updated.
3958 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
3959 * rtx-funcs.scm (*): Specify class.
3961 * utils-cgen.scm (context-make-reader): New proc.
3963 * utils.scm (assert-fail-msg): New variable.
3965 (list-drop,list-tail-drop): New procs.
3967 1999-06-22 Doug Evans <devans@casey.cygnus.com>
3969 * desc-cpu.scm (-gen-hash-defines): Restore generation of
3970 CGEN_MIN_INSN_SIZE deleted on March 22.
3972 * ifield.scm (<ifield>,needed-iflds): New method.
3973 (<multi-ifield>,needed-iflds): New method.
3974 (ifld-needed-iflds): New proc.
3975 (multi-ifield?): New proc.
3976 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
3977 (-sfmt-search-key): Include insn length in key.
3978 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
3979 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
3980 (-ifmt-lookup-ifmt!): Compute key here.
3981 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
3982 All callers updated.
3983 (ifmt-build): Delete arg desc. New args search-key,iflds.
3984 All callers updated.
3985 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
3986 in-ops,out-ops,sorted-used-iflds. All callers updated.
3987 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
3989 * operand.scm (op-iflds-used): New proc.
3990 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
3992 And from sid.scm,sid-cpu.scm as well.
3993 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
3994 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
3995 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
3996 (gen-extracted-ifld-value): Ditto.
3997 (-extract-chunk-specs): Ditto.
3998 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
3999 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4000 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4001 (-extract-insert-subfields): New function.
4002 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4003 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4004 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4005 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4007 (-gen-no-scache-semantic-fn): Ditto.
4008 (-gen-sem-case): Ditto.
4009 (-gen-read-case): Update calls to gen-define-ifields,
4010 gen-extract-ifields.
4011 * sim-decode.scm (-gen-record-args): Update.
4012 (-gen-sfmt-argvars-assigns): Update.
4013 (-gen-extract-case): Update.
4014 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4015 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4017 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4018 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4019 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4020 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4021 gen-define-ifields, gen-extract-ifields.
4022 (-gen-record-args): Update.
4023 (gen-sfmt-argvars-assigns): Update.
4024 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4025 with gen-define-ifields. Ditto for gen-extract-foo.
4026 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4027 procs rather than method calls.
4029 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4031 * sid.scm (-create-virtual-insns!): New local `context', pass it
4034 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4035 (operand name) not (operand object), (local name) not (local object).
4036 (rtx-traverse-with-locals): New proc.
4037 (-compile-expr-fn): New proc.
4038 (rtx-compile): Rewrite.
4039 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4040 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4041 (rtl-c-set-trace): Ditto.
4042 (operand define-fn): Recognize operand name argument.
4043 (local define-fn): Recognize sequence temp name argument.
4044 * rtx-funcs.scm (operand): Argument is operand name, not object,
4045 so call current-op-lookup.
4046 (local): Similarily, so call rtx-temp-lookup.
4048 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4049 (rtx-operand?): Ditto.
4050 (rtx-pretty-name): Ditto.
4051 (rtx-local-obj): Flag symbol argument as an error.
4052 (rtx-local-name): New proc.
4053 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4055 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4057 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4060 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4063 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4064 (*floats-s->c-fun-table*): Ditto.
4065 * hobbit.c,hobbit.h: Rebuild.
4066 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4067 * semantics.scm (rtx-simplify): Use /fastcall-make.
4069 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4071 * insn.scm (<insn>): Delete members condition, compiled-condition.
4072 (<insn>,make!): Update
4073 (<insn> getters,setters): Update.
4074 (-insn-parse,insn-read,define-full-insn): Update.
4075 * minsn.scm (minsn-make-alias): Update.
4076 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4077 (ifmt-compute!): Ditto.
4078 * sim.scm (sim-finish!): Update.
4079 * simplify.inc: (define-normal-insn): Update.
4080 * sid-cpu.scm (gen-semantic-code): Update.
4082 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4083 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4084 (ifmt-compute!): Ditto.
4086 1999-06-16 Doug Evans <devans@casey.cygnus.com>
4088 * minsn.scm (minsn-compute-iflds): Print better error message for
4091 1999-06-12 Doug Evans <devans@casey.cygnus.com>
4093 * rtl.scm (tstate->estate): Don't copy over expr-fn.
4095 * Makefile.am (HOBFLAGS): New variable.
4096 (cgen-hob.c): Use it.
4098 (libcpu_a_SOURCES): Add hob-sup.c.
4099 (hob-sup.o): New rule.
4100 * Makefile.in: Rebuild.
4101 * cgen.c: #include hob-sup.h.
4102 (cgen_init_c): Call hobbit_init_support.
4103 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4104 (*special-scm->c-functions*): Add them.
4105 (display-c-expression): Handle *c-symbol*.
4106 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4107 (*floats-s->c-fun-table*): Ditto.
4108 (normalize): Recognize /fastcall-make.
4109 (normalize-fastcall-make): New proc.
4110 * hobbit.c,hobbit.h: Rebuild.
4111 * hob-sup.scm: New file.
4112 * hob-sup.c: New file.
4113 * hob-sup.h: New file.
4114 * read.scm: Load hob-sup.scm.
4115 * rtl.scm (-rtx-name-list): New variable.
4116 (rtx-name-list): New proc.
4117 (rtx-lookup): Try symbol first.
4118 (def-rtx-node): Add name to -rtx-name-list.
4119 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4120 (-rtx-traverse-anymode): New proc.
4121 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4122 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4123 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4124 (-rtx-traverse-{symornum,object}): New procs.
4125 (-rtx-make-traverse-table): Rewrite.
4126 (-rtx-traverse-operands): Rewrite arg-types handling.
4127 Handle #f result of traverser.
4128 (-rtx-traverse): Renamed from -rtx-traverse-normal.
4129 Move debug handling here.
4130 (-rtx-traverse-debug): Delete.
4131 (rtl-finish!): Change -rtx-traverse-table into list of handlers
4133 * semantics.scm (semantic-compile:process-expr!): Fix call to
4135 * utils.scm (map1-improper): New proc.
4137 1999-06-08 Doug Evans <devans@casey.cygnus.com>
4139 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4141 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4142 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4143 (<operand>,cxmake-get): Tweak.
4144 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
4146 1999-06-07 Doug Evans <devans@casey.cygnus.com>
4148 * thumb.cpu (dnti): Delete timing spec.
4151 * arm.cpu (arm isa): New fields condition, setup-semantics.
4152 (thumb isa): New field setup-semantics.
4153 (h-gr): Add attribute CACHE-ADDR.
4154 * arm7.cpu (dnai): Delete condition.
4155 (eval-cond): Delete.
4157 * mach.scm (<isa>): New member setup-semantics.
4158 (-isa-parse-setup-semantics): New proc.
4159 (-isa-parse): New arg setup-semantics.
4160 (-isa-read): Recognize setup-semantics.
4162 * sid-cpu.scm (gen-extract-fields): Split into two:
4163 gen-extract-ifields, gen-extract-ifmt-ifields.
4164 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
4165 tracing begin/end messages (done by caller now).
4166 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
4167 tracing begin/end messages (done by x-before,x-after virtual insns).
4168 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
4169 end so don't have to look it up again next time.
4170 * sid-decode.scm (-decode-expr-ifield-values): New proc.
4171 (-decode-expr-ifield-tracking-key): New proc.
4172 (-decode-expr-ifield-tracking): New proc.
4173 (-decode-expr-ifield-values-used): New proc.
4174 (-decode-expr-ifield-mark-used!): New proc.
4175 (-gen-decode-expr-set-itype): New proc.
4176 (-gen-decode-expr-entry): Rewrite.
4177 (-gen-decode-table-entry): New proc.
4178 (-gen-decoder-switch): Use it.
4179 (-gen-virtual-insn-finder): New proc.
4180 (-gen-argbuf-elm): Move here from sid.scm.
4181 (-gen-argbuf-hw-elm): Ditto.
4182 (-gen-argbuf-fields-union): Add entries for chain,before insns.
4183 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4184 conditional-execution isas.
4185 (-gen-decode-fn): Record conditional-exec ifield.
4186 * sid.scm (-current-pbb-engine?): New global.
4187 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4188 (<ifield>,gen-ifld-extract): New arg `indent'.
4189 (<multi-ifield>,gen-ifld-extract): Ditto.
4190 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
4191 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4192 (-gen-arch-model-decls): Only scan real insns.
4193 (scache-engine-insns,pbb-engine-insns): New procs.
4194 (-create-virtual-insns!): New proc.
4195 (sim-finish!): Call it.
4196 (-decode-specialize-insn?): New proc.
4197 (-decode-specialize-build-assertion): New proc.
4198 (-decode-specialize-insn-1): New proc.
4199 (-decode-specialize-insn): New proc.
4200 (-fill-sim-insn-list!): New proc.
4201 (sim-analyze!): Create copies of insns to be specialized.
4202 * utils-cgen.scm (obj-set-name!): New proc.
4204 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4205 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4207 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
4209 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4210 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4211 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4212 (attr): Rewrite test for insn owner.
4213 (member): New rtx function.
4214 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4215 as separate function.
4216 (rtx-ifield?,rtx-ifield-name): New procs.
4217 (rtx-operand-obj): Rewrite.
4218 (rtx-operand-name): New proc.
4219 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4220 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4221 (tstate-make): New args owner, known. All callers updated.
4222 (tstate-known-lookup): New proc.
4223 (rtx-traverse): New arg owner. All callers updated.
4224 (rtx-make-bool): New proc.
4225 (rtl-find-ifields): Rewrite.
4226 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4227 * semantics.scm: ... here.
4228 (rtx-const-equal,rtx-const-list-equal): New procs.
4229 (-build-known-values): New proc.
4230 (semantic-compile): New arg `insn'. Call rtx-simplify.
4231 (semantic-attrs): Ditto.
4232 * rtx-funcs.scm (member,number-list): New rtx functions.
4234 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4235 Rewrite. Delete arg `all-attrs'. All callers updated.
4236 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
4238 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4240 * decode.scm (subdtable-add): Handle `expr' entries.
4241 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
4242 (exprtable-entry-*): Update.
4243 (exprtable-entry-iflds): New proc.
4244 (exprentry-cost): New proc.
4245 (exprtable-sort,-gen-exprtable-name): New procs.
4246 (exprtable-make): New arg `name'. All callers updated. use vector.
4247 (exprtable-*): Update.
4248 (-build-decode-table-entry): Don't issue collision warning if all are
4249 specialized insns. Sort exprtable entries before building table.
4251 * read.scm (-reader-process-expanded-1): Move pretty printing of
4252 input to logging level 4.
4254 * utils.scm (string-list->string): New proc.
4256 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4258 (insn-read): Delete leading '-' in name. All callers updated.
4259 (real-insn?): New proc.
4260 (real-insns): Rewrite.
4261 (insn-has-ifield?): New proc.
4262 (insn-builtin!): Create insn attribute SPECIALIZED.
4264 * mach.scm (<arch>): Delete member app-data.
4265 (current-raw-insn-list): New proc.
4266 (insn-list-car,insn-list-splice!): New procs.
4267 (<decode-specialize>): New class.
4268 (-isa-parse-decode-specialize): New proc.
4269 (-isa-parse-decode-specializes): New proc.
4270 (<isa>): New members `condition', `decode-specializes'.
4271 (-isa-parse-condition): New proc.
4272 (-isa-parse): New args condition, decode-specializes.
4273 (-isa-read): Recognize condition, decode-specializes.
4274 (-isa-add-decode-specialize!): New proc.
4275 (modify-isa): New proc.
4276 (isa-conditional-exec?,state-conditional-exec?): New procs.
4277 (arch-init!): New reader command `modify-isa'.
4279 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4280 (mode-signed,mode-unsigned?): New procs.
4282 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
4284 * types.scm (<array>): New method get-shape.
4285 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4287 (hw-shape,hw-num-elms): New procs.
4288 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4289 if there's more than 255 registers.
4290 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4292 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4295 1999-05-21 Doug Evans <devans@casey.cygnus.com>
4297 * cgen-sid.scm (sim-arguments): Add -X.
4298 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4299 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4300 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
4301 Simplify by supporting pbb engine only.
4302 (-gen-sem-switch-init): New proc.
4303 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4304 (cgen-sem-switch.cxx): New proc.
4305 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4306 with with-pbb?. Support dual scache/pbb engines.
4307 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4308 Support dual scache/pbb engines.
4309 (cgen-decode.h): Generate semantic fn decls if with-scache?.
4310 * sid.scm (*) with-pbb? replaces with-sem-switch?.
4311 (sim-finish!): Create pbb support virtual insns if with-pbb?.
4313 1999-05-10 Ben Elliston <bje@cygnus.com>
4315 * arm7.cpu: Remove coprocessor related fields, operands and insn
4316 definitions for now. Take the undefined instruction trap instead.
4317 (ldmda-wb): New instruction.
4318 (ldmib-wb): Likewise.
4319 (ldmdb-wb): Likewise.
4320 (stmdb-wb): Likewise.
4321 (stmib-wb): Likewise.
4322 (stmda-wb): Likewise.
4324 1999-05-08 Doug Evans <devans@casey.cygnus.com>
4326 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4327 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4329 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4330 hobbit can't handle optional third arg.
4332 1999-05-07 Doug Evans <devans@casey.cygnus.com>
4334 * arm.cpu (h-tbit): Delete set spec.
4335 (h-mbits): Don't call arm_mbits_set in set spec.
4336 * arm.sim: New file.
4337 * hardware.scm (modify-hardware): New proc.
4338 (hardware-init!): Add modify-hardware command.
4339 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4340 (-hw-gen-set-quiet): Ditto.
4341 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
4342 hardware attribute. Load $arch.sim file if present.
4343 * utils-cgen.scm (keyword-list?): New proc.
4344 (keyword-list->arg-list,arg-list-validate-name): New procs.
4345 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4347 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4349 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4352 * attr.scm (obj-prepend-atlist!): New proc.
4354 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4356 * sid.scm (<operand>,profilable?): Use op:type.
4357 * sim.scm (<operand>,profilable?): Use op:type.
4359 1999-05-04 Doug Evans <devans@casey.cygnus.com>
4361 * utils.scm (find-index,find): Be more stack friendly.
4363 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4366 1999-05-01 Doug Evans <devans@casey.cygnus.com>
4368 * arm.cpu (h-gr-usr): New hardware element.
4369 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4370 (arm-mode): New keyword.
4371 (h-mbits): Add set spec.
4372 (h-spsr): Implement get/set specs.
4374 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4375 (-reader-process-expanded-1): Pretty print logging output.
4377 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4378 (cgen-cpu.h): Print enums before hardware elements.
4379 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4380 * sid-decode.scm (cgen-decode.cxx): Ditto.
4381 * sid-model.scm (cgen-model.cxx): Ditto.
4383 * utils-cgen.scm (context-error): Accept variable number of
4386 * rtx-funcs.scm (error:): New rtx function.
4387 * rtl-c.scm (s-case-vm): New proc.
4388 (-gen-non-vm-case-get,s-case-non-vm): New procs.
4389 (s-case): Simplify, handle non-VM result.
4390 (error:): New rtx function.
4392 1999-04-30 Doug Evans <devans@casey.cygnus.com>
4394 * arm.cpu (h-pc): Add set spec to zero bottom bits.
4395 (test-hi,test-ls): Fix cbit handling.
4396 (shift-type,h-operand2-shifttype): Move here ...
4397 * arm7.cpu: ... from here.
4398 (set-cond,set-cond-maybe,dnix): Delete, unused.
4399 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4400 * arm.cpu: ... to here.
4401 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4402 (alu-cmn): Use set-add-flags.
4403 (alu-tst): Use set-zn-flags.
4404 (alu-cmp): Use set-sub-flags.
4405 (lsl,lsr,asr): Set condition codes.
4406 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4407 (alu-op): Split into three: alu-logical-op,alu-arith-op,
4409 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4410 All callers updated.
4411 (sub-sp): Rename from add-sp-neg.
4412 (f-lbwl-offset): Delete.
4413 (f-lbwl-hi,f-lbwl-lo): New ifields.
4414 (lbwl-hi,lbwl-lo): Update.
4415 (bl-hi): Add 4 to pc.
4416 (push-reg,pop-reg): Simplify.
4417 (push,push-lr): Push registers in correct order.
4418 (pop,pop-pc): Pop registers in correct order.
4419 (save-reg-inc,load-reg-inc): Simplify.
4420 (ldmia): Save registers in correct order.
4422 1999-04-30 Ben Elliston <bje@cygnus.com>
4424 * arm7.cpu (f-op-hdt): Remove; unused.
4425 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4426 (f-ror-imm8): New multi-ifield.
4427 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4429 (f-uimm12): New field.
4430 (ror-imm8): New operand.
4432 (hdt-offset8): Reinstate operand.
4433 (offset4-hi,offset4-lo): Remove.
4434 (set-cond): Remove macro; unused.
4435 (set-cond-maybe): Likewise.
4436 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4437 (store-word/byte): Likewise.
4438 (load-halfword): Use hdt-offset8 multifield operand instead of two
4439 4-bit operands that are explicitly combined by semantic code.
4440 (do-halfword-store): Bug fix. Set address when not preindexing.
4441 (store-halfword): Also use hdt-offset8 operand.
4442 (arith-op): Avoid clobbering source registers when one of them is
4443 the destination register.
4444 (arith-imm-op): Likewise.
4445 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4446 (teq-imm): Likewise.
4447 (ldm-p): Rename to ldmdb.
4448 (stm-pw): Rename to stmdb-wb.
4449 (multi-action): New macro; test reg-list bits and execute a
4450 semantic fn if the bit is set.
4451 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4452 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4453 (all insns): Use dnai entries for simplicity rather than dni.
4454 (*): Use short-form of (const ..).
4456 1999-04-29 Doug Evans <devans@casey.cygnus.com>
4458 * rtl.scm (<rtx-func>): Rename member type to style. Rename
4459 member eval to evaluator.
4460 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
4461 (tstate-make): Delete arg op-fn. All callers updated.
4462 (tstate-op-fn,tstate-set-op-fn!): Delete.
4463 (rtx-traverse): Delete op-fn arg. All callers updated.
4464 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4465 split out of -simplify-for-compilation.
4467 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4468 (cgen_DEPENDENCIES): Add stamp-cgen.
4469 (stamp-cgen): New rule.
4470 * Makefile.in: Rebuild.
4472 * rtl-c.scm (enum:): Define emitter for.
4473 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4475 (rtx-constant-value,rtx-enum-value): New procs.
4476 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4477 (rtx-compile-time-constant?): Return #t for enums.
4478 (rtx-true?,rtx-false?): Handle enums.
4479 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4480 building result by hand.
4481 (rtx-simplify-eq-attr-insn): Ditto.
4482 * rtx-funcs.scm (enum:,enum): New rtx functions.
4484 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4486 (arch-analyze-insns!): New proc.
4487 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4488 of calling ifmt-compute! directly.
4489 * sid.scm (-sim-insns-analyzed?): Delete.
4490 (sim-analyze!): Call arch-analyze-insns! instead of calling
4491 ifmt-compute! directly.
4492 * sim.scm (-sim-insns-analyzed?): Delete.
4493 (sim-analyze!): Call arch-analyze-insns! instead of calling
4494 ifmt-compute! directly.
4496 * utils.scm (string-take-with-filler): New proc.
4497 (string-take): Use it.
4499 * pgmr-tools.scm: New file.
4500 * read.scm: Load it.
4501 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4503 * insn.scm (insn-base-mask): Renamed from insn:mask.
4504 All callers updated.
4505 (insn-base-mask-length): Renamed from insn:mask-length.
4506 All callers updated.
4507 (insn-foo): Renamed from insn:foo. All callers updated.
4508 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
4509 * iformat.scm (compute-insn-base-mask-length): Renamed from
4510 compute-insn-mask-length. All callers updated.
4511 (compute-insn-base-mask): Renamed from compute-insn-mask.
4512 All callers updated.
4514 * enum.scm (-enum-parse-prefix): New proc.
4515 (<enum>,make!): Don't parse enum values here.
4516 (-enum-parse): Do it here. Call -enum-parse-prefix.
4517 (define-full-insn-enum): Ditto.
4518 (enum-vals-upcase): New proc.
4519 * hardware.scm (define-keyword): Make enum prefix uppercase.
4520 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
4522 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
4523 (<ifield>,field-extract): New method.
4524 (<multi-ifield>,field-extract): New method.
4525 (ifld-extract): New proc.
4526 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
4527 (ifld-extract-fn-name): Renamed from ifld-extract.
4529 * ifield.scm (ifld-new-value): Renamed from ifield-make.
4530 All callers updated.
4532 * ifield.scm (ifld-lsb0?): New proc.
4533 (sort-ifield-list): New arg up?. All callers updated.
4534 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
4535 rather than global state.
4537 1999-04-27 Doug Evans <devans@casey.cygnus.com>
4539 * insn.scm (pretty-print-insn-format): New proc.
4541 * Makefile.in: Rebuild.
4542 * aclocal.m4: Rebuild
4543 * configure: Rebuild.
4545 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
4547 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
4548 * configure: Rebuild.
4549 * aclocal.m4: Rebuild.
4550 * Makefile.in: Rebuild.
4551 * doc/Makefile.in: Rebuild.
4552 * doc/version.texi: Rebuild.
4554 1999-04-25 Doug Evans <devans@casey.cygnus.com>
4556 * utils.scm (bits->bools): New proc.
4558 1999-04-23 Doug Evans <devans@casey.cygnus.com>
4560 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
4561 subfield's gen-ifld-extract-decl method.
4563 1999-04-23 Ben Elliston <bje@cygnus.com>
4565 * arm7.cpu (ldrsh-pu): Remove.
4566 (do-halfword-load): New pmacro.
4567 (load-halfword): Likewise.
4568 (do-halfword-store): Likewise.
4569 (store-halfword): Likewise.
4570 (strh-*): New instructions.
4571 (ldrsb-*): Likewise.
4573 (ldrsh-*): Likewise.
4575 1999-04-22 Doug Evans <devans@casey.cygnus.com>
4577 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
4580 * arm7.cpu (do-word/byte-store): Fix typo.
4582 1999-04-22 Ben Elliston <bje@cygnus.com>
4584 * arm7.cpu (do-word/byte-load): Handle cases where the destination
4585 register is the program counter (R15).
4587 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
4588 (str-*): Implement using store-word-byte. Remove older versions.
4589 (bic): Use the `inv' rtx for obtaining bitwise complements.
4590 (bic-imm): Likewise.
4592 (mvn-imm): Likewise.
4593 (store-indev-reg): Remove crufty pmacro.
4594 (load-indiv-reg): Likewise.
4595 (ldm-p): Reverse the order of register processing for decrement.
4597 (stbi): Remove; handled by the str-* insns.
4599 1999-04-21 Doug Evans <devans@casey.cygnus.com>
4601 * thumb.cpu (cmp): Fix carry bit computation.
4604 1999-04-20 Doug Evans <devans@casey.cygnus.com>
4606 * arm.cpu (h-tbit): Specify set spec.
4608 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
4609 (set-sub-flags): Interpret "carry bit" as a borrow.
4610 (all sub/cmp insns): Carry bit is actually a borrow bit.
4611 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
4612 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
4614 (hireg-add,hireg-cmp,hireg-move): Ditto.
4616 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
4617 (-CGEN-LANG-VERSION): Ditto.
4619 1999-04-18 Doug Evans <devans@casey.cygnus.com>
4621 * pmacros.scm (-pmacro-make): New arg `default-values',
4622 all callers updated.
4623 (-pmacro-default-values): New proc.
4624 (-pmacro-process-keyworded-args): New proc.
4625 (-pmacro-process-args): New proc.
4626 (-pmacro-invoke): Process arguments before expanding macro.
4627 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
4628 (define-pmacro): Handle default values specified in arg list.
4629 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
4630 (rtx-boolif-op-arg[01]): New procs.
4631 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
4632 (rtx-simplify): Handle not,orif,andif.
4633 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
4634 * utils.scm (alist-copy): New proc.
4635 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
4637 (swi): Explicitly set pc.
4639 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
4641 1999-04-17 Ben Elliston <bje@cygnus.com>
4643 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
4644 correctly adjusts the program counter now.
4646 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
4647 (f-signed?): Rename from `f-hdt-signed?'.
4648 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
4649 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
4650 (f-hdt-offset8): Use new field names.
4651 (ldr): Use `imm12' field, not `offset12', since we do our own
4653 (str, str-*): Likewise.
4654 (ldu-*): Remove most; better not implemented than broken.
4656 (ldrsh-pu): New insn.
4660 (ldm-p): Likewise; replace (load-indiv-reg) version.
4662 1999-04-15 Doug Evans <devans@casey.cygnus.com>
4664 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
4665 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
4666 (*): Explicitly specify mode in c-call.
4667 (logical-op): Recognize sets of h-gr[15] as sets of pc.
4669 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
4670 (arith-imm-op): New pmacro.
4671 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
4672 * thumb.cpu (bx-rs,bx-hs): Rewrite.
4674 1999-04-14 Doug Evans <devans@casey.cygnus.com>
4676 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
4678 * rtl.scm (rtl-find-ifields): Implement.
4680 * utils-gen.scm: New file.
4681 * read.scm: Load it.
4682 * desc.scm: Move generic attribute code to utils-gen.scm.
4683 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
4684 * Makefile.in: Rebuild.
4686 * arm7.cpu (R15-OFFSET): New attribute.
4688 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
4689 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
4690 for reg-shift version.
4692 (data processing insns): Reorganize. Use dnai.
4694 * attr.scm (attr-kind): New proc.
4695 (attr-list-enum-list): Rewrite.
4696 (-attr-sort): Split result into two lists, bools and non-bools.
4697 (current-attr-list-for): Update.
4699 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
4700 * sid-cpu.scm (-gen-attr-decls): New proc.
4701 (-gen-insn-attr-decls): New proc.
4702 (cgen-desc.h): New proc.
4703 (cgen-cpu.h): Put everything in @cpu@ namespace.
4704 (gen-parallel-exec-type): Change prefix of parexec struct from
4706 (-gen-trace-record-type): Ditto for trace_record struct.
4707 (-gen-write-case): Update.
4708 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
4709 @prefix@. Update scache struct references.
4710 (-gen-sem-case): Update scache struct references.
4711 (-gen-sem-switch-fn): Update idesc struct reference.
4712 Update insn_type enum reference.
4713 (cgen-write.cxx): Update scache,argbuf references.
4714 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
4715 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
4716 from @cpu@ to @prefix@.
4717 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
4718 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
4719 from @CPU@ to @PREFIX@.
4720 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
4721 from @CPU@ to @PREFIX@.
4722 (-gen-decode-insn-globals): Generate insn attributes.
4723 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
4724 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
4725 semantic fn typedef.
4726 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
4727 Change prefix of scache struct from @cpu@ to @prefix@.
4728 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
4729 Change prefix of idesc struct from @cpu@ to @prefix@.
4730 Change prefix of insn_type enum from @cpu@ to @prefix@.
4731 (-gen-argbuf-fields-union): Change prefix of sem_fields union
4732 from @cpu@ to @prefix@.
4733 (-gen-scache-decls): Change prefix of scache struct from
4734 @cpu@ to @prefix@. Update idesc struct name.
4735 Update decode,execute methods.
4736 (-gen-extract-case): Update to type name changes.
4737 (-gen-decode-fn): Ditto.
4738 (cgen-decode.h): Put everything in @cpu@ namespace (except
4739 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
4740 (cgen-decode.cxx): Add using namespace @cpu@.
4741 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
4742 model_mark_get/set from @cpu@ to @prefix@.
4743 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
4745 (gen-model-fn-decls): Update idesc struct name. Change prefix
4746 of model_insn_before/after from @cpu@ to @prefix@.
4747 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
4748 Update insn_word type name.
4749 (-gen-model-timing-table): Update INSN_TIMING struct name.
4750 (-gen-model-init-fn): Update MODEL_DATA struct name.
4751 (-gen-mach-defns): Update name of init_idesc_table fn.
4752 (cgen-model.cxx): Add using namespace @cpu@.
4753 * sid.scm (gen-cpu-class): Delete.
4754 (gen-attr-type): New proc.
4755 (gen-obj-attr-sid-defn): New proc.
4756 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
4757 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
4759 (gen-cpu-insn-enum): Update name of insn enum.
4760 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
4762 (swi): Rename @cpu@_swi to @prefix@_swi.
4764 * decode.scm (-build-decode-table-entry): Remove heuristic for
4765 distinguishing insns, and use insn ifield-assertion specs.
4767 * desc-cpu.scm (gen-A-attr-mask): Simplify.
4768 (gen-ifld-defns): Boolean attributes begin at number 0 now.
4769 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
4770 * opc-itab.scm (-gen-macro-insn-table): Ditto.
4771 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
4772 all callers updated.
4773 (gen-attr-name): New proc
4774 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
4775 (gen-obj-attr-defn): Delete num_nonbools count.
4777 * iformat.scm (ifmt-analyze): Handle insn-condition.
4778 (ifmt-compute!): Ditto.
4779 * insn.scm (<insn>): Specify default value for condition,
4780 post-cond-trap,compiled-condition,compiled-semantics.
4781 (<insn>,make!): New arg condition.
4782 (<insn>): Add getters for condition,compiled-condition.
4783 (-insn-parse): New arg condition, all callers updated.
4784 (-insn-read): Recognize condition spec.
4785 (define-full-insn): New arg condition.
4786 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
4787 * semantics.scm (semantic-compile): Change arg sem-code to
4789 (semantic-attrs): Ditto.
4790 * sim.scm (sim-finish!): Update calls to define-full-insn.
4791 * simplify.inc (define-normal-insn): Update call to define-full-insn.
4792 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
4793 * sid.scm (sim-finish!): Update call to define-full-insn.
4795 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
4797 * Makefile.am (sim-cpu): Allow specification of ISA.
4798 * Makefile.in: Rebuild.
4800 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
4802 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
4804 1999-04-10 Doug Evans <devans@casey.cygnus.com>
4806 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
4808 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
4810 * attr.scm (atlist?): New proc.
4811 (-attr-eval): Rewrite.
4812 (attr-parse): New proc.
4813 (atlist-parse): Use it.
4815 * decode.scm (exprtable-entry-make): New proc.
4816 (exprtable-entry-insn,exprtable-entry-expr): New procs.
4817 (exprtable-make,exprtable-insns): New procs.
4819 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
4821 (hardware-builtin!): Make h-memory a vector.
4823 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
4824 All callers updated.
4825 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
4827 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
4829 (-insn-parse): Set semantics to #f if not specified.
4830 (define-insn,define-full-insn): Take out code that ignores ALIAS's
4832 (-parse-insn-format): Recognize `=' iformat spec.
4834 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
4835 (isa-max-insn-bitsize): Ditto.
4837 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
4839 (<ifield>,gen-extract): Ditto.
4840 (<multi-ifield>,gen-insert,gen-extract): Ditto.
4841 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
4842 (gen-define-ifmt-ifields): New proc.
4843 (gen-semantic-code): Rewrite.
4844 * sid-decode.scm (-gen-decode-expr-entry): New proc.
4845 (-gen-decoder-switch): Handle expression tables.
4846 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
4848 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
4849 instead of gen-define-fields.
4850 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
4852 (<multi-ifield,gen-ifld-extract-decl): Ditto.
4853 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
4854 (-gen-ifld-extract-beyond): Ditto.
4855 (<multi-ifield>,gen-ifld-extract): Ditto.
4856 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
4857 rtl evaluation code.
4858 (op:read): Build an <eval-state> to pass to gen-read.
4859 (op:write): Build an <eval-state> to pass to gen-write.
4860 (op:record-profile): Build an <eval-state> to pass to
4862 * sim-cpu.scm (gen-semantic-code): Rewrite.
4863 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
4865 (-gen-ifld-extract-beyond): Ditto.
4866 (<multi-ifield>,gen-ifld-extract): Ditto.
4867 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
4868 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
4869 rtl evaluation code.
4870 (op:read): Build an <eval-state> to pass to gen-read.
4871 (op:write): Build an <eval-state> to pass to gen-write.
4872 (op:record-profile): Build an <eval-state> to pass to
4875 * operand.scm (<operand>): Give `selector' default value of #f.
4876 Give `num' default value of -1. Give `cond?' default value of #f.
4877 (op:new-mode): Delete arg `set?', all uses updated.
4879 * read.scm (reader-error): Handle #f return from port-filename.
4880 (-init-parse-cpu!): Call rtl-c-init!.
4881 (reader-install-builtin!): Call rtl-builtin!.
4883 * rtl-c.scm: New file.
4884 * semantics.scm: New file.
4885 * read.scm: Load them.
4886 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
4888 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
4890 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
4891 (-rtx-num-text,-rtx-max-num): New globals.
4892 (def-rtx-operand-node,define-rtx-operand-node): New procs.
4893 (-rtx-macro-lookup): New proc.
4894 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
4895 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
4896 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
4897 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
4898 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
4899 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
4900 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
4901 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
4902 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
4903 (rtx-pretty-name): New proc.
4904 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
4905 (rtx-traverse-*): Rewrite rtx traversing.
4906 (rtx-eval-*): Rewrite rtx evaluation.
4907 (rtx-compile): New proc.
4908 (rtx-simplify): New proc.
4909 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
4910 * rtx-funcs.scm: C generation moved to rtl-c.scm.
4911 (ifield,index-of): Rewrite.
4912 (name): Renamed from `operand:'.
4913 (operand,xop,local): New rtx's.
4914 (current-insn): Rewrite.
4915 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
4916 (cgen-hob.h): Remove rule for.
4917 (cgen-hob.o): Depend on cgen-hob.c only.
4918 * Makefile.in: Rebuild.
4920 * utils-cgen.scm (vmake): New proc.
4921 (<context>): New class.
4922 (context-make-prefix,context-error): New procs.
4924 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
4926 * i960.cpu: Add some ??? comments.
4927 (xnor, ornot): New instructions.
4928 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
4930 1999-04-08 Doug Evans <devans@casey.cygnus.com>
4932 * cos.scm (-object-error): Print better error message.
4934 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
4935 (-pmacro-env-ref): Renamed from -env-ref.
4937 1999-03-31 Doug Evans <devans@casey.cygnus.com>
4939 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
4941 (hardware-builtin!): Delete h-pc builtin.
4942 * arm.cpu (h-pc): Define.
4943 (h-gr): Delete get,set specs. Make array of 16 regs again.
4944 * arm7.cpu (set-logical-cc-maybe): Delete.
4945 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
4946 (data processing insns): Rewrite.
4947 * m32r.cpu (h-pc): Define.
4948 * fr30.cpu (h-pc): Define.
4949 * i960.cpu (h-pc): Define.
4950 * sparc.cpu (h-pc): Define.
4952 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
4953 (s-parallel): Replace do {...} while (0) with {...}.
4954 (s-sequence): Ditto.
4956 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
4958 (-gen-write-case,-gen-sem-case): Ditto.
4959 (-gen-sem-case): Only specify `written' if profiling or
4960 parallel-write-back.
4961 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
4962 (-gen-sem-switch-fn): New proc.
4963 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
4964 based on with-sem-switch option.
4965 * sid-decode.scm (-gen-decode-insn-globals): Only define
4966 idesc_table_initialized_p if with-sem-switch. Record semantic fn
4967 addresses in idesc_table if !with-sem-switch.
4968 (-gen-sem-fn-decls): Rewrite.
4969 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
4970 member based on with-sem-switch. Only define
4971 `idesc_table_initialized_p' member if with-sem-switch.
4972 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
4973 * sid.scm (-with-sem-switch?): New variable.
4974 (option-init!): Initialize it.
4975 (option-set!): Set it.
4976 (with-sem-switch?): New proc.
4977 (-op-gen-set-trace): Only emit `written' reference if profiling.
4978 (sim-finish!): Use h_pc_set to set pc.
4980 1999-03-30 Doug Evans <devans@casey.cygnus.com>
4982 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
4983 All callers updated.
4984 (arith-carry-cc-binop): New arg set-flags. All callers updated.
4986 * sid.scm (gen-argbuf-type): Delete.
4987 (-gen-argbuf-fields-union): Move to ...
4988 * sid-decode.scm: ... here.
4990 * read.scm (-reader-process-expanded-1): New proc.
4991 (-reader-process-expanded): Call it to catch nested begin's.
4992 (reader-process): Move `begin' handling to -reader-process-expanded.
4994 * insn.scm (-insn-read): Fix name of `format' spec.
4996 * pmacros.scm (.pmacro): New builtin.
4997 (scan-symbol): If procedure macro, return macro rather than its symbol.
4998 (check-macro): Don't do lookup, instead check if (car expr) is
5000 (scan-list): Handle .pmacro.
5001 (scan): No longer re-examine text for another macro invocation.
5002 (-pmacro-build-lambda): New proc.
5003 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5004 another, fetch the other's value (rather than doing it during
5007 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5009 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5010 * Makefile.in: Rebuild.
5012 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5013 (-fill-slot!): Simplify.
5014 (-build-slots): Simplify.
5016 * dev.scm (load-sid): Don't load sid-arch.scm.
5018 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5020 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5023 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5025 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5026 * decode.scm: ... here. New file.
5027 * sid-decode.scm: Use decoder computation code in decode.scm.
5028 * read.scm: Load decode.scm.
5030 * arm.cpu (arm710 model): Add u-exec function unit.
5031 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5032 Add get/set specs to redirect reg 15 to h-pc.
5033 (h-*): Indicate for both ARM and THUMB isas.
5034 (cbit,nbit,vbit,zbit): Ditto.
5035 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5036 (h-cpsr): Make virtual. Add get/set specs.
5037 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5038 (h-spsr): New virtual reg.
5039 * arm7.cpu (shift-type): New explicitly defined keyword.
5040 (h-operand2-shifttype): Use it.
5041 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5042 All callers updated. Don't set cbit.
5043 (logical-op): Add rm to ifield list. Change case to case:. Use
5044 shift-type enum as case choices. Set cbit.
5045 (and,orr,eor,add-imm): Uncomment out.
5046 (undefined): Temporarily comment out.
5047 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5048 (lda-pc,lda-sp): Ditto.
5049 (ldr-pc): Rename from ldr.
5050 (cbranch): Mark insns as being thumb insns.
5052 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5054 * cgen-sid.scm: Don't load sid-arch.scm.
5055 (sim-arguments): Delete unused entries.
5056 * sid-arch.scm: Delete.
5058 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5059 (<insn>,ifld-assertions): New member.
5060 (<insn>,make!): New arg ifld-assertions, all callers updated.
5061 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5062 (insn:fields): Delete.
5063 (-insn-parse): New arg ifld-assertions. All callers updated.
5064 (-insn-read,define-insn): New procs.
5065 (define-full-insn): New arg ifld-assertions. All callers updated.
5066 (insn-init!): New comment define-insn.
5068 * model.scm (-model-parse): Ensure at least one unit specified.
5070 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5071 (<c-expr-temp>,get-name): New method.
5072 (-rtx-make-current-closure,s-closure): New proc.
5073 (hw:): Wrap rtx indices in a closure.
5074 (-gen-case-prefix): New proc.
5076 * rtx-funcs.scm (case:): Fix call to s-case.
5077 (closure): New rtx func.
5079 * hardware.scm (<hardware-base>): New member isas-cache.
5080 (<hardware-base>,get-isas): New method.
5081 (hardware-builtin): Indicate for all isas.
5082 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5083 * mach.scm (current-arch-mach-name-list): Return list of names.
5084 (current-isa-mach-name-list): Ditto.
5085 (define-arch): Install builtin objects here.
5086 * read.scm (keep-atlist?): Only keep if both mach and isa are
5088 (keep-mach-atlist?): New proc.
5089 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5090 (reader-install-builtin!): Renamed from -install-builtin!.
5091 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5092 -gen-cpu-reg-access-defns. Rewrite.
5093 (gen-reg-access-defn): Delete.
5094 (-gen-hardware-struct): New proc.
5095 (-gen-hardware-types): Simplify. Add multiple-isa support.
5096 (gen-semantic-fn,-gen-all-semantics): Delete.
5097 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5098 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5099 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5100 Call sem-analyze-insns!.
5101 (cgen-semantics.cxx): Add multiple-isa support.
5102 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5103 (-gen-scache-decls,-gen-decode-fn): Ditto.
5104 (cgen-decode.h): Call sem-analyze-insns!.
5105 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5106 * sid.scm (-with-multiple-isa?): New variable.
5107 (option-init!): Initialize it.
5108 (option-set!): Set it.
5109 (with-multiple-isa?): New proc.
5110 (gen-cpu-ref): New arg isas. All callers updated.
5111 (gen-cpu-class): New proc.
5112 (*-get-macro,*-set-macro): Delete.
5113 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5114 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5115 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5116 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5117 (-sim-insns-analyzed): New global variable.
5118 (sim-init!): Reset it.
5119 (sim-analyze-insns!): New proc.
5120 (sim-analyze!): Don't do instruction analysis here.
5121 (sim-finish!): Specify isa of x-invalid insn.
5122 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5124 1999-03-22 Doug Evans <devans@casey.cygnus.com>
5126 * thumb.cpu (cpu,mach,model): Delete.
5127 (dntf): New pmacro. Use it for all field definitions.
5128 (dntop): New pmacro. Use it for all operand definitions.
5129 (asr): Correct field list.
5130 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5132 * utils-cgen.scm (define-getters): New macro to simplify
5133 writing class accessors.
5134 (define-setters): Ditto.
5135 (sanitize): Recognize isa elements.
5137 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5138 state-parallel-exec?.
5139 * sid-model.scm (*): Ditto.
5140 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
5141 state-decode-assist.
5143 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5144 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5145 * sim-decode.scm (-gen-decode-switch): Ditto.
5147 * sim-arch.scm (-regs-for-access-fns): Delete.
5148 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5149 (-gen-arch-reg-access-defns): Delete.
5151 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5152 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5153 with state-parallel=exec?.
5154 (cgen-*): Call sim-analyze-insns! here.
5155 * sim-decode.scm (cgen-*): Ditto.
5156 * sim-model.scm (cgen-*): Ditto.
5157 * sim.scm (-sim-insns-analyzed): New global variable.
5158 (sim-init!): Reset it.
5159 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
5160 already done the analysis.
5162 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5165 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5166 (arm arch): Update isa spec.
5167 (arm,thumb isas): Define.
5168 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5169 (arm7tdmi mach): Add isa spec.
5170 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
5171 `const' on word number.
5172 * fr30.cpu (fr30 arch): Update isa spec.
5174 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5176 * i960.cpu (i960 arch): Update isa spec.
5178 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5179 liw-insns,parallel-insns moved to isas spec.
5180 * m32r.cpu (m32r arch): Update isas spec.
5182 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5183 liw-insns,parallel-insns moved to isa spec.
5184 * sparc.cpu (sparc arch): Update isas spec.
5185 (sparc isa): Define.
5186 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5187 decode-assist moved to isa spec.
5188 * sparc64.cpu (sparc64 cpu): Ditto.
5189 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5190 * desc-cpu.scm (-gen-isa-table-defns): New proc.
5191 (-gen-mach-table-defns): Output mach table.
5192 (-gen-hash-defines): Delete insn size macros, except for
5194 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
5195 (cgen-desc.h): Define MAX_ISAS.
5196 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
5197 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
5198 (arch-* accessors): Renamed from arch:*. All callers updated.
5199 (current-arch-isa-name-list): New proc.
5200 (-arch-parse-isas): Renamed from -arch-parse-isa.
5201 (def-isa-attr!): Rewrite.
5202 (<iframe>): New class.
5203 (<itype>): New class.
5205 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5206 (isa-integral-insn?,isa-parallel-exec?): New procs.
5207 (-isa-parse,-isa-read,define-isa): New proc.
5208 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5209 liw-insns moved to <isa>.
5210 (cpu-* accessors): Renamed from cpu:*. All callers updated.
5211 (-cpu-parse,-cpu-read): Update.
5212 (state-*): Renamed from state:*. All callers updated.
5213 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5215 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5216 (state-decode-assist): New proc.
5217 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5218 (-adata-set-derived!): Rewrite.
5219 (adata-integral-insn?): Renamed from adata:integral-insn?. All
5221 (arch-init!): Add define-isa command.
5222 * read.scm (<reader>): Default keep-isa member to (all).
5223 (reader-* accessors): Renamed from reader:*. All callers updated.
5224 (-keep-isa-set!): Call string->symbol on isa name list.
5225 (keep-isa-validate!): Rewrite.
5226 (current-isa): New proc.
5227 (keep-isa?): Recognize "all".
5228 (-init-parse-cpu!): New arg keep-isa. All callers updated.
5229 Call -keep-isa-set!.
5230 (cmd-if): Recognize keep-isa?.
5231 (cpu-load): New arg keep-isa. All callers updated.
5232 (-opt-spec-update): New proc.
5233 (common-arguments): First arg is string, not symbol.
5234 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
5236 * rtl.scm (rtx-get): Default mode of string arg is INT.
5238 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
5240 * rtx-funcs.scm (join:): Pass cpu to handler.
5242 * configure.in (guile_include_dir): Delete.
5243 * configure: Rebuild.
5244 * Makefile.in: Rebuild.
5245 * doc/Makefile.in: Rebuild.
5247 * sid-cpu.scm (-extract-chunk-specs): New proc.
5248 (gen-define-fields): Use it.
5249 (-extract-chunk): New proc.
5250 (-gen-extract-beyond-var-list): Use it.
5251 (gen-extract-fields): Simplify.
5253 1999-03-22 Ben Elliston <bje@cygnus.com>
5255 * arm7.cpu (ldri-p): New instruction.
5256 (swi): Do not vector through 0x8 yet--there is nothing there.
5259 (all): Use (const x) in subreg expressions.
5261 1999-03-19 Ben Elliston <bje@cygnus.com>
5263 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5266 1999-03-17 Doug Evans <devans@casey.cygnus.com>
5268 * fr30.cpu (define-arch): Specify "forced" default-alignment.
5269 * mach.scm (-parse-alignment): Recognize "forced" alignment.
5270 * sim-cpu.scm (-extract-chunk-specs): New proc.
5271 (gen-define-fields): Use it.
5272 (-extract-chunk): New proc.
5273 (-gen-extract-beyond-var-list): Use it.
5274 (gen-extract-fields): Simplify.
5276 Port to guile 1.3.1.
5277 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5278 (LIBIBERTY): New var.
5279 (HOB_OBJS): Add cgen-gh.o.
5280 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5281 * Makefile.in: Rebuild.
5282 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5283 * config.in: Rebuild.
5284 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5285 libncurses, libtermcap.
5286 Add checks for needed functions in guile 1.2 not in guile 1.3,
5287 and vice versa. Add test for 3 argument scm_make_vector.
5288 * configure: Rebuild.
5289 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5290 definitions if guile doesn't have them.
5291 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5292 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
5293 with gh_vector_set_x.
5294 (cgh_qsort): Replace gh_list_length with gh_length.
5295 * cgen-gh.h: Add decls for added functions.
5296 (cgh_qsort): Don't declare if IN_HOBBIT.
5297 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
5298 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5299 scm_make_vector with gh_make_vector.
5300 * cos.scm: Use vector-length instead of length on vectors.
5301 * dev.scm (cload): Make varargs proc with keyword/value args.
5302 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
5303 provide version that works with guile 1.2 or 1.3.
5304 Include private copy of scmhob.h.
5305 * scmhob.h: New file. Keep our own copy for now.
5307 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
5309 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5311 (-rtx-traverse-operands): Dump cx temp stack if debugging.
5312 (-cx-temp-dump-stack): Pretty up output.
5314 * arm.cpu: comment out thumb.cpu until isa support ready.
5315 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5316 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5317 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5319 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5321 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5323 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5324 (<hw-address>,mode-ok?): unsigned/signed are compatible.
5326 * operand (op:new-mode): Improve error message.
5328 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
5329 * arm7.cpu: New file.
5331 1999-03-12 Ben Elliston <bje@cygnus.com>
5333 * arm.cpu: Lots of minor fixes after desk checking.
5335 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5337 * thumb.cpu: snapshot of current work
5339 * rtl.scm (rtx-get): Tweak error message.
5341 1999-03-10 Doug Evans <devans@casey.cygnus.com>
5343 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5344 * Makefile.in: Rebuild.
5346 * cos.c (cos_vector_copy): New function.
5347 (_object_copy): Use it.
5349 * mode.scm (mode:eq?): Clean up.
5350 * rtl.scm (cx-new-mode): Copy attributes.
5351 (rtx-get): Don't make copy if <c-expr> with identical mode.
5353 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5355 (gr-names): h-gr register names moved here.
5357 (cr-names): h-cr register names moved here.
5359 (dr-names): h-dr register names moved here.
5361 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5362 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5363 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5365 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5367 (gr-names): h-gr register names moved here.
5369 (cr-names): h-cr register names moved here.
5371 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5372 (h-accums,h-psw): Ditto.
5373 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5375 (gr-names): h-gr register names moved here.
5376 (h-gr-indices): Delete.
5377 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
5378 (sparc64 h-gr): Ditto.
5379 (h-y): Add get/set specs.
5381 (fp operands): Rewrite.
5382 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5383 (h-tbr,h-cwp,h-wim): Ditto.
5384 * sparc64.cpu (h-fpsr): Add get/set specs.
5385 * sparccom.cpu (ldd-reg+reg): Load value all at once.
5386 (fp-ld-op): New arg `dest', all callers updated.
5387 (*): Replace `make-di' with `join'.
5389 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5391 (gen-semantic-code): Save/restore rtl generator state.
5392 (cgen-cpu.h): Call rtl-gen-init!.
5393 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5394 (-gen-ifld-extract-beyond): Ditto.
5395 (<multi-ifield>,gen-ifld-extract): Ditto.
5396 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5398 (-hw-gen-set-quiet-pc): Ditto.
5399 (<hw-pc>,gen-write): Ditto.
5400 (-hw-cxmake-get): Ditto. Call getter function if present.
5401 (<hw-register>,cxmake-get-raw): New method.
5402 (<hw-register>,gen-set-quiet-raw): New method.
5403 (-hw-gen-set-quiet): New arg `gstate'.
5404 (hw-fun-access?): Delete.
5405 (gen-reg-access-defn): Output function contents.
5406 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5408 (-gen-hw-index): Ditto.
5409 (op:read): Update gen-read invocation.
5410 (op:write): Update gen-write invocation.
5411 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5413 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5414 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5415 (<unit>,gen-profile-code): Update to sim.scm version.
5417 * sim-arch.scm (-regs-for-access-fns): New proc.
5418 (-biggest-reg-mode): New proc.
5419 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5420 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5421 virtual regs separately.
5422 (-gen-cpu-reg-access-defns): Replace fun-access? with new
5424 (gen-semantic-code): Save/restore rtl generator state.
5425 (cgen-cpu.h): Call rtl-gen-init!.
5426 (cgen-cpu.c): Ditto. #include cgen-ops.h.
5427 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
5428 renamed to mach-bfd-name.
5429 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5430 (-gen-ifld-extract-beyond): Ditto.
5431 (<multi-ifield>,gen-ifld-extract): Ditto.
5432 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5433 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5434 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5436 (hw-fun-access?): Delete.
5437 (-hw-gen-set-quiet-pc): New arg `gstate'.
5438 (<hw-register>,gen-get-macro): Rewrite.
5439 (<hw-register>,gen-set-macro): Rewrite.
5440 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5441 (-hw-cxmake-get): New arg `gstate'. Rewrite.
5442 (<hw-register>,cxmake-get-raw): New method.
5443 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
5444 (<hw-register>,gen-set-quiet-raw): New method.
5445 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5447 (-gen-hw-index): Ditto.
5448 (<hw-index>): New arg `gstate'.
5449 (-gen-hw-selector): Update call to rtx-c.
5450 (<pc>): New arg `gstate'.
5451 (op:read): Update gen-read invocation.
5452 (op:write): Update gen-write invocation.
5453 (<operand>,cxmake-get): Handle raw-reg.
5454 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5455 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5456 (<operand>,gen-set-quiet): Handle raw-reg.
5457 (<operand>,gen-set-trace): Handle raw-reg.
5458 (-gen-mach-data): mach:cpu renamed to mach-cpu.
5460 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5461 cgen_operand_type enum.
5462 (gen-operand-table): Add operand type enum. Replace pointer to
5463 hardware element with its enum. Null terminate table.
5464 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5465 Build operand table.
5466 * ifield.scm (-ifield-parse): Recognize ISA attribute.
5467 * mach.scm (<arch-data>): New member `isas'.
5468 (adata-isas): New accessor.
5470 (isa-default-insn-word-bitsize): New accessor.
5471 (isa-enum): New proc.
5472 (current-arch-default-insn-word-bitsize): Delete.
5473 (current-isa-list,current-isa-lookup): New procs.
5474 (-arch-parse-isa): New proc.
5475 (-arch-parse): Rewrite.
5476 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
5477 (define-arch): Define ISA attribute.
5478 (def-isa-attr!,isa-supports?): New procs.
5479 (<mach>): New member `isas'.
5480 (mach-isas): New accessor.
5481 (-mach-parse): New arg `isas', all callers updated.
5482 (-mach-read): Recognize `isas'.
5483 (arch-finish!): Rewrite.
5484 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5485 @arch@_cgen_get_{int,vma}_operand.
5486 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5487 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5488 of pointer to table entry.
5489 * opcodes.scm (gen-switch): Handle multiply defined operands.
5490 * operand.scm (op-sort): New proc.
5492 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5493 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5494 (hw-enum): Accept symbol argument.
5495 (hardware-builtin!): Delete attribute FUN-ACCESS.
5496 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5498 * attr.scm (atlist-source-form): New proc.
5499 (attr-builtin!): New attr `PRIVATE'.
5500 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5501 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5502 if they have `PRIVATE' attribute.
5503 (gen-hw-table-defns): Output definitions of explicitly defined
5505 * hardware.scm (<keyword>): New member print-name. Rename member
5506 `value' to `values', all uses updated.
5507 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
5508 (keyword-parse): Rewrite.
5509 (-keyword-read): New proc.
5510 (define-keyword): New proc.
5511 (-hw-parse-keyword): New proc.
5512 (-hw-parse-indices): Rewrite keyword handling, support new index spec
5514 (-hw-parse-values): Ditto.
5515 (-hw-parse-get,-hw-parse-set): Rewrite.
5516 (hardware-init!): Add new comment define-keyword.
5517 * mach.scm (<arch>): New member `kw-list'.
5518 (arch:kw-list,arch_set-kw-list!): New accessors.
5519 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
5521 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
5522 * mode.scm (mode-class-integral?): New proc.
5523 (mode-class-float?,mode-class-numeric?): New procs.
5524 (mode-integral?,mode-float?,mode-numeric?): New procs.
5525 (mode-compatible?): New proc.
5526 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
5528 (<ifield>,gen-extract): Ditto.
5529 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
5530 (<gstate>): New class.
5531 (gstate-simulator?,gstate-set-simulator?!): New accessors.
5532 (gstate-context,gstate-set-context!): New accessors.
5533 (gstate-macro?,gstate-set-macro?!): New accessors.
5534 (gstate-make,gstate-copy): New procs.
5535 (-rtl-current-gstate): New global.
5536 (current-gstate-simulator?): New proc.
5537 (current-gstate-context,current-gstate-macro?): New procs.
5538 (current-gstate,current-gstate-set!): New procs.
5539 (rtl-gen-init!): Rewrite.
5540 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
5541 (tstate-make): New arg `gstate', all callers updated.
5542 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
5543 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
5544 (tstate-gstate,tstate-set-gstate!): New accessors.
5545 (tstate-copy): New proc.
5546 (tstate-new-cond?,tstate-new-set?): Rewrite.
5547 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
5548 (rtx-traverse): New arg `gstate', all callers updated.
5549 (rtx-strdump): New proc.
5550 (-simplify-for-compilation): New arg `gstate', all callers updated.
5551 (semantic-in-out-operands): Ditto.
5552 (semantic-attrs): Ditto.
5553 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
5554 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
5555 (rtx-value): Rewrite.
5556 (<c-expr>,gen-name): New method.
5557 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
5558 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
5559 (cx-new-mode): New proc.
5560 (-rtx-c-with-tstate): New proc.
5561 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
5563 (-rtx-mode): Rewrite.
5564 (-rtx-mode-compatible?): New proc.
5565 (<c-expr-temp>): New member `value'.
5566 (cx-temp:value): New accessor.
5567 (<c-expr-temp>,make!): Override default method.
5568 (<c-expr-temp>,cxmake-get): Rewrite.
5569 (<c-expr-temp>,gen-set-quiet): Rewrite.
5570 (<c-expr-temp>,gen-set-trace): Rewrite.
5571 (gen-temp-defs): Use cx-temp:value.
5572 (record-temp!): New arg value, all callers updated.
5573 (cx-temp:cx:make): Delete.
5574 (-cx-temp-dump-stack): New proc.
5575 (rtx-get): New arg `gstate', all callers updated. Do mode
5576 compatibility checks. Ensure result has specified mode.
5577 (rtx-set-quiet): New arg `gstate', all callers updated.
5578 (rtx-set-trace): Ditto.
5579 (s-c-call): New arg `tstate', all callers updated.
5580 (s-c-raw-call): Ditto.
5581 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
5582 (s-cmpop,s-if,e-if): Ditto.
5583 (s-subreg): New proc.
5584 (-par-new-temp!): New proc.
5585 (-par-next-temp!): Rewrite.
5586 (-par-replace-set-dests): Use -par-new-temp!.
5587 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
5588 (s-sequence): Use -rtx-c-with-state.
5589 * rtx-funcs.scm (*): Update.
5590 (raw-reg:): New rtx function.
5592 (join:,subreg:): New rtx functions.
5594 * insn.scm (<insn>): New members pre-cond-trap, condition,
5595 post-cond-trap, compiled-condition.
5597 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
5599 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
5601 * utils-cgen.scm (parse-symbol): New proc.
5602 (parse-string): New proc.
5603 (gen-get-macro,gen-set-macro): New arg `index-args'.
5604 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
5605 Prepend \ to newlines.
5607 * utils.scm (alist-remove-duplicates): Delete.
5609 * sid.scm (sim-init!): Delete private debugging code.
5611 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
5613 * cgen-sid.scm: New file for C++ simulator application.
5614 * sid-arch.scm: Ditto.
5615 * sid-cpu.scm: Ditto.
5616 * sid-decode.scm: Ditto.
5617 * sid-model.scm: Ditto.
5619 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
5621 1999-03-05 Ben Elliston <bje@cygnus.com>
5623 * arm.cpu: New file.
5625 1999-03-03 Doug Evans <devans@casey.cygnus.com>
5627 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
5628 * Makefile.in: Rebuild.
5630 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
5631 (-attr-parse): Validate default value.
5633 * read.scm (-CGEN-VERSION): Change to 0.7.1.
5634 (-CGEN-LANG-VERSION): Ditto.
5635 (-keep-all-machs): Renamed from -keep-all, all uses updated.
5636 (<reader>): New member keep-isa plus accessors.
5637 (-keep-isa-set!,keep-isa-validate!): New procs.
5638 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
5639 (common-arguments): New variable.
5640 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
5641 (-debug-repl,continue): New procs.
5642 (-cgen,cgen): New procs.
5643 * cgen-gas.scm: Rewrite.
5644 * cgen-opc.scm: Rewrite.
5645 * cgen-sim.scm: Rewrite.
5646 * cgen-stest.scm: Rewrite.
5648 * gas-test.scm (gas-test-init!): Call opcodes-init!.
5649 (gas-test-finish!): Call opcodes-finish!.
5650 (gas-test-analyze!): Call opcodes-analyze!.
5651 (<hw-asm>): New method test-data.
5652 (<operand>,testdata): Rewrite.
5653 * sim-test.scm (sim-test-init!): Call opcodes-init!.
5654 (sim-test-finish!): Call opcodes-finish!.
5655 (sim-test-analyze!): Call opcodes-analyze!.
5656 (<hw-asm>): New method test-data.
5657 (<operand>,testdata): Rewrite.
5659 1999-03-01 Doug Evans <devans@casey.cygnus.com>
5661 * fixup.scm (reverse!): Define if missing.
5662 * *.scm: Use reverse! instead of list-reverse!.
5664 * utils.scm (leading-id-char?): New proc.
5665 (id-char?): Rewrite.
5666 (chars-until-delimiter): New proc.
5667 * opc-itab.scm (extract-syntax-operands): Rewrite.
5668 (strip-mnemonic): Rewrite.
5669 (compute-syntax): Rewrite.
5671 * pmacros.scm (-pmacro-substr): New proc.
5672 (pmacros-init!): Add builtin .substr.
5674 1999-02-26 Doug Evans <devans@casey.cygnus.com>
5676 * thumb.cpu: New file.
5678 1999-02-24 Doug Evans <devans@casey.cygnus.com>
5680 * Makefile.am (CGENCFLAGS): New variable.
5681 (WITH_HOBBIT): Use automake conditional.
5682 (CGEN_HOB_SRC): New variable.
5683 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
5684 (*.o): Compile with CGENCFLAGS.
5685 (cgen-hob.c): Simplify.
5686 (cgen-nohob.c): New rule.
5687 (hobbit): Renamed from hob.x.
5688 (CLEANFILES): Add cgen-nohob.c.
5689 * Makefile.in: Rebuild.
5690 * doc/Makefile.in: Rebuild.
5691 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
5692 (WITH_HOBBIT): Use AM_CONDITIONAL.
5693 * configure: Rebuild.
5694 * aclocal.m4: Rebuild.
5696 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
5697 with string-write-map.
5699 * sim-cpu.scm (hw-need-storage?): New proc.
5700 (-gen-hardware-types): Use it.
5701 (gen-parallel-exec-elm): Call op-save-index?.
5703 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5705 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
5707 (-gen-ifld-extract-beyond): Ditto.
5708 (<integer>): Delete all references.
5709 (<sim-hardware>): Delete.
5710 (hw-profilable?): New proc.
5711 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
5712 (<hw-register>): Rename method get-index-mode to save-index?.
5713 (<hw-register>): New methods gen-get-macro,gen-set-macro.
5714 (<hw-register>,gen-sym-decl): Make virtual.
5715 (<hw-memory>,gen-sym-decl): Make virtual.
5716 (<hw-memory>): Rename method get-index-mode to save-index?.
5717 (<hw-address>,gen-sym-decl): Make virtual.
5718 (<operand>): New method save-index?.
5719 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
5721 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
5722 prefix added. All uses updated.
5724 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
5725 rather than pointer to table entry.
5727 * opcodes.scm: Remove all attribute support, lives in desc.scm.
5728 Remove all hw-asm,op-asm support.
5729 (-gen-parse-number,-gen-parse-address): New procs.
5730 (<keyword>,gen-parse): Redo function name computation.
5731 (<keyword>,gen-print): Ditto.
5732 (<operand>,gen-function-name): Rewrite.
5733 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
5734 (opcodes-init!): Delete call to add-parser!.
5736 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
5737 Define enum using hardware semantic name.
5738 (-gen-hw-decl,-gen-hw-defn): New procs.
5739 (gen-hw-table-decls): Use -gen-hw-decl.
5740 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
5741 CGEN_HW_ENTRY structs.
5742 (gen-operand-table): Output hw's enum, not pointer to table entry.
5743 (-gen-cpu-open): Build table of selected hardware elements.
5745 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
5746 (<hardware> support): Delete.
5747 (<hw-asm>): Delete, moved to hardware.scm.
5748 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
5749 (<hw-asm>,gen-table-entry): New method.
5750 (<hw-asm>,parse!): Delete.
5751 (<keyword>,gen-table-entry): New method.
5752 (<keyword>,parse!): Delete.
5753 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
5754 for gen-decl,gen-defn,gen-ref,gen-init.
5755 (desc-init!): Don't create parser for operand asm specs.
5757 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
5758 * ifield.scm (<ifield>): New member `mode'.
5759 (<ifield>,make!): New arg `mode'.
5760 (ifld-mode): Rewrite.
5761 (ifld-hw-type): Rewrite.
5762 (<ifield>,min-value): Rewrite.
5763 (<ifield>,max-value): Rewrite.
5764 (-ifield-parse): New arg `mode'.
5765 (-ifield-read): Update.
5766 (define-full-ifield): New arg `mode'.
5767 (define-full-multi-ifield): Ditto.
5768 (-multi-ifield-parse): Ditto.
5769 (-multi-ifield-read): Update.
5770 (define-full-multi-ifield): New arg `mode'.
5771 (ifield-builtin!): Update definition of f-nil.
5772 * simplify.inc (define-normal-ifield): Update call to
5774 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
5775 (define-normal-hardware): Delete arg asm. New args indices, values,
5776 handlers. Update call to define-full-hardware.
5777 (define-simple-hardware,dsh): New pmacros.
5778 (define-normal-operand): Update call to define-full-operand.
5779 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5780 Specify INT/UINT mode instead.
5781 (h-gr,h-cr): Use "indices" instead of "asm".
5782 (h-dr,h-ps): Update keyword syntax.
5783 (h-r13,h-r14,h-r15): Ditto.
5784 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
5785 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
5786 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
5787 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
5788 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5789 Specify INT/UINT mode instead.
5790 (h-gr): Use "indices" instead of "asm".
5791 (h-cc): Update keyword syntax.
5792 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5793 Specify INT/UINT mode instead.
5794 (h-hi16,h-slo16,h-ulo16): Update.
5795 (h-gr,h-cr): Use "indices" instead of "asm".
5796 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
5797 (h-accums): Update keyword syntax.
5798 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
5799 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5800 Specify INT/UINT mode instead.
5801 (h-gr-indices): New pmacro.
5802 (h-gr32,h-gr64): Split up from h-gr.
5803 (h-a): Update type spec. Use values instead of asm spec.
5804 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
5805 (h-y,h-annul-p): Ditto.
5806 (h-asr): Update keyword spec.
5807 (h-lo10,h-lo13,h-hi22): Update.
5808 (get-freg-spec,set-freg-spec): New pmacros.
5809 (h-fr32,h-fr64): Split up from h-fr.
5810 (rdd): Comment out get/set specs.
5811 (lo10,lo13,hi22): Use "handlers" instead of "asm".
5812 * sparc32.cpu (h-psr): Use dsh instead of dnh.
5813 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
5814 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
5815 UNSIGNED. Specify INT/UINT mode instead.
5816 (h-*): Use dsh instead of dnh where appropriate.
5817 (h-ixcc): Update type spec. Use "values" instead of "asm".
5818 (h-p,h-membarmask): Ditto.
5819 (membarmask): Use "handlers" instead of "asm".
5821 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
5822 values,handlers,getters,setters plus accessors.
5823 (hw-mode-ok?,hw-default-mode): New procs.
5824 (<hardware-base>): Rename method new-mode to mode-ok?
5825 (<hardware-base>): New method get-index-mode.
5826 (hw-index-mode): New proc.
5827 (pc?): Delete, moved to operand.scm.
5828 (address?): New proc.
5829 (<hardware>): Delete.
5830 (<hw-asm>): Definition moved here from desc.scm.
5831 (keyword-parse): New proc.
5832 (hardware-parsers): Delete.
5833 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
5834 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
5835 (-hw-parse-get,-hw-parse-set): New procs.
5836 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
5837 indices,values,handlers,get,set. Rewrite.
5838 (-hw-read-extra): Delete.
5840 (define-hardware): Don't add object if not selected.
5841 (define-full-hardware): Ditto.
5842 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
5843 (<hw-register>): Member `type' moved to baseclass. Delete member
5845 (<hw-register>,parse!): Rewrite.
5846 (<hw-register>): Delete methods get-rank,get-mode.
5847 (<hw-register>): Method new-mode renamed to mode-ok?
5848 (<hw-register>): New method get-index-mode.
5849 (<hw-pc>,parse!): Rewrite.
5850 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
5851 (<hw-memory>,parse!): Rewrite.
5852 (<hw-memory>): Delete methods get-rank,get-mode.
5853 (<hw-memory>): Method new-mode renamed to mode-ok?
5854 (<hw-memory>): New method get-index-mode.
5855 (<hw-immediate>): Member `type' moved to baseclass. Delete member
5857 (<hw-immediate>,parse!): Rewrite.
5858 (<hw-immediate>): Delete methods get-rank,get-mode.
5859 (<hw-immediate>): Method new-mode renamed to mode-ok?
5860 (<hw-address>): Delete member hw-asm.
5861 (<hw-address>,parse!): Rewrite.
5862 (<hw-address>): Delete methods get-rank,get-mode.
5863 (<hw-address>): Method new-mode renamed to mode-ok?
5864 (hw-profilable?): Delete.
5865 (hardware-init!): Delete hardware-parsers reference.
5866 Update argument specs of command define-full-hardware.
5867 (hardware-builtin!): Update definitions of hardware builtins.
5868 * operand.scm (<operand>): New members hw-name,mode-name.
5869 Delete member op-asm. New member handlers.
5870 (<operand>,make!): Update.
5871 (op:hw-name,op:mode-name,op:handlers): New procs.
5874 (<operand>): New method get-index-mode.
5875 (<pc>,make!): Update.
5876 (op:new-mode): Rewrite.
5877 (operand-parsers): Delete.
5878 (-operand-parse): Rewrite. Return #f if insn not selected.
5879 (-op-read-extra): Delete.
5880 (-operand-read): Update.
5881 (define-operand,define-full-operand): Update.
5882 (operand-init!): Delete operand-parsers reference.
5883 Update syntax of define-full-operand command.
5885 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
5886 (define-full-insn): Update.
5887 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
5888 (define-full-minsn): Update.
5890 * mode.scm (<mode>): New member class.
5891 (mode:class): New proc.
5893 (-mode-parse): New arg class.
5894 (define-full-mode): Update.
5895 (mode-find): Rewrite.
5896 (mode-make-int,mode-make-uint): New procs.
5897 (mode-init!): Update syntax of define-full-mode command.
5898 (mode-builtin!): Update definitions of builtin modes.
5900 * model.scm (<profile>): Delete.
5902 * read.scm (keep-atlist?): New proc.
5903 (keep-multiple?): New proc.
5904 (<parser-list>): Delete.
5905 (add-parser!,parse-spec!): Delete.
5907 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
5908 (def-rtx-syntax-node): Ditto.
5909 (-rtx-traverse-debug?): New variable.
5910 (tstate-make): New proc.
5911 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
5912 (tstate-new-cond?,tstate-new-set?): New procs.
5913 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
5914 tstate. All callers updated.
5915 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
5916 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
5917 (-build-operand!): Replace arg cond? with tstate.
5918 (-build-reg-operand!,-build-mem-operand!): Ditto.
5919 (-build-index-of-operand!): Update making of <operand> object.
5920 (s-ifield): New arg tstate. All callers updated.
5921 (hw:): New arg tstate. All callers updated. Replace call to
5922 current-hw-lookup with current-hw-sem-lookup-1.
5923 (s-index-of): New arg tstate. All callers updated.
5925 (-rtx-use-sem-fn?): New proc.
5926 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
5928 (s-convop): Only use semantic mode when using semantic cover fns.
5929 (s-cmpop): Call -rtx-use-sem-fn?.
5930 (s-cond,s-case): New arg tstate. All callers updated.
5931 (s-parallel,s-sequence): Ditto.
5933 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
5935 * types.scm (<scalar>): Rewrite implementation.
5936 (<integer>): Delete.
5937 (parse-type): Rewrite.
5939 * utils-cgen.scm (parse-handlers): New proc.
5941 * utils.scm (!=): New proc.
5943 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
5945 * pmacros.scm (-pmacro-expand): Fix typo.
5947 1999-02-12 Doug Evans <devans@casey.cygnus.com>
5949 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
5950 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
5951 * i960.cpu (build-hex2): New pmacro.
5952 (insn-opcode): Simplify.
5953 (insn-opcode2): Ditto.
5955 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
5956 * cgen-stest.scm (catch-with-backtrace): Ditto.
5958 1999-02-11 Doug Evans <devans@casey.cygnus.com>
5960 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
5961 All callers updated.
5962 (-pmacro-invoke): New proc.
5963 (-pmacro-sym,-pmacro-str): New procs.
5964 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
5965 (pmacros-init!): Install builtins .iota, .map, .apply.
5966 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
5967 (h-fr): Simplify register name spec.
5968 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
5969 * utils.scm (num-args-ok?): New proc.
5971 1999-02-10 Doug Evans <devans@casey.cygnus.com>
5973 * pmacros.scm (-pmacro-error): New proc.
5974 (-pmacro-expand): Use it.
5975 (-pmacro-splice): New proc.
5976 (pmacros-init!): Install new builtin .splice.
5978 * sparc.cpu: Include sparc64.cpu when appropriate.
5979 (f-mmask,f-simm11): Moved to sparc64.cpu.
5980 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
5981 (ANNUL attribute): Delete.
5982 (test-* pmacros): New arg cc, all callers updated.
5983 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
5984 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
5986 (ldstub,swap): Moved to sparccom.cpu.
5987 * sparc64.cpu: Add more insns.
5989 1999-02-09 Doug Evans <devans@casey.cygnus.com>
5991 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
5993 (cgen-sem-switch.c): Ditto.
5994 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
5995 moved to cgen-engine.h.
5996 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
5997 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
5998 global. Cache attributes and insn length in IDESC.
5999 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6000 @cpu@_opcode renamed to @cpu@_get_idata.
6001 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6002 done later underneath sim_resume.
6003 (@mach@_mach): Record @cpu@_prepare_run.
6004 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6006 (-hw-gen-set-quiet-pc): Ditto.
6007 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6008 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6009 (<hw-addr>,cxmake-get): Ditto.
6010 (<hw-iaddr>,cxmake-get): Ditto.
6011 (<pc>,cxmake-get): Ditto.
6012 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6013 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6014 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6015 (<hw-pc>,gen-write): Use hw-selector-default.
6016 (<hw-register>,gen-write): Ditto.
6017 (<hw-memory>,gen-write): Ditto.
6018 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6019 (-gen-hw-selector): New proc.
6021 * desc.scm: New file.
6022 * desc-cpu.scm: New file.
6023 * opcodes.scm: Split up into several smaller files.
6024 * opc-asmdis.scm: New file.
6025 * opc-ibld.scm: New file.
6026 * opc-itab.scm: New file.
6027 * opc-opinst.scm: New file.
6028 * Makefile.am (desc): New target.
6029 (opcodes): Update args to cgen-opc.scm.
6030 * Makefile.in: Rebuild.
6031 * aclocal.m4: Rebuild.
6032 * config.in: Rebuild.
6033 * configure.in: Update arg to AC_INIT.
6034 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6035 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6037 * configure: Rebuild.
6038 * cgen-gas.scm: Update files to load.
6039 * cgen-opc.scm: Ditto. Reorganize option letters.
6040 * cgen-sim.scm: Update files to load.
6041 * cgen-stest.scm: Ditto.
6042 * dev.scm (cload): New app "DESC".
6043 (load-opc): Update files to load.
6044 (load-gtest,load-sim,load-stest): Ditto.
6046 * attr.scm (bool-attr?): New proc.
6047 (attr-list-enum-list): New proc.
6048 (-attr-sort): Rewrite.
6049 (attr-builtin!): Give ALIAS attribute a fixed index.
6050 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6051 calculate attribute enum list.
6052 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6054 * insn.scm (-insn-parse): Renamed from parse-insn.
6056 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6059 * mode.scm (-mode-parse): Renamed from parse-mode.
6061 * operand.scm (<operand>): New member `selector'.
6062 (<operand>,make!): Use default selector.
6063 (hw-selector-default): New variable.
6064 (hw-selector-default?): New proc.
6066 * pmacros.scm (pmacros-init!): New proc.
6067 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6068 (-env-set!): Delete.
6069 (-pmacro-expand): New proc apply-macro.
6070 Use it in scan-list,scan. Scan list first, then see if macro
6072 (define-pmacro): Rewrite.
6073 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6075 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6076 selected if (current-mach) seen.
6077 (rtx?): Renamed from rtx-uneval?, all callers updated.
6078 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6080 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6081 selector, all callers updated.
6082 (hw:): New arg selector, all callers updated. Delete old comments
6084 (reg:,mem:): Handle selectors
6085 * rtx-funcs.scm (reg:): Handle selectors.
6087 * read.scm: Renamed from cpu.scm.
6088 (<command>): New class.
6089 (<reader>): New member commands.
6090 (reader-add-command!): New proc.
6091 (reader-lookup-command): New proc.
6092 (reader-error,-reader-process-expanded,reader-process): New procs.
6093 (reader-read-file!): New proc.
6094 (include): Call reader-read-file!.
6096 (cpu-load): Call reader-read-file!.
6097 * utils.scm (num-args): New proc.
6098 * simplify.inc: New file.
6099 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
6100 procs. Move define-normal-foo procs (and abbreviated forms) to
6101 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
6103 * fr30.cpu: Include simplify.inc.
6104 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6105 * i960.cpu: Include simplify.inc.
6106 * m32r.cpu: Include simplify.inc.
6107 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6108 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6109 * sparc.cpu: Include simplify.inc.
6110 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6111 * utils-cgen.scm (parse-error): Moved to read.scm.
6112 (sanitize): Rewrite.
6113 (utils-init!): New proc.
6115 1999-02-02 Doug Evans <devans@casey.cygnus.com>
6117 * sparc.cpu: New file.
6118 * sparc32.cpu: New file.
6119 * sparc64.cpu: New file.
6120 * sparccom.cpu: New file.
6121 * sparc.opc: New file.
6123 1999-01-27 Frank Eigler <fche@cygnus.com>
6125 * utils.scm (gen-copyright): New proc.
6127 1999-01-27 Doug Evans <devans@casey.cygnus.com>
6129 Parameterize rtl parsing, rather than having lots of little handlers.
6130 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6131 Delete member traverse.
6132 (rtx:set-traverse!): Delete.
6133 (-rtx-valid-types,-rtx-valid-matches): New variables.
6134 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6135 instead of expression. All callers updated.
6136 (def-rtx-node): New args arg-types,arg-modes.
6137 (def-rtx-syntax-node): Ditto.
6138 (def-rtx-dual-mode): Ditto.
6139 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6140 All callers updated.
6141 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6142 All callers updated.
6143 (rtx-macro-expand): New proc.
6144 (-rtx-traverse-check-args): Delete.
6145 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6146 an rtx specific traverser.
6147 (-rtx-any-mode?,-rtx-symornum?): New procs.
6148 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6149 (-rtx-traverse-no-mode): Delete.
6150 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6151 (-rtx-traverse-operands): Rewrite.
6152 (-rtx-traverse-expr): Rewrite.
6153 (rtx-traverse): Don't expand macros here, leave for caller to do.
6154 (rtx-simplify): Delete.
6155 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
6157 (rtx-true?,rtx-false?): Ditto.
6158 (-rtx-ref-type): Set dest is operand 1 now.
6159 (-simplify-for-compilation): New proc.
6160 (semantic-in-out-operands): Recognize regno as an alias for index-of.
6161 Expand macros before calling rtx-traverse. Sort operands by name
6162 to avoid unnecessary semantic formats.
6163 (semantic-attrs): New proc.
6164 (rtx-uneval?): Handle (<rtx-func> ...).
6165 (s-boolifop): Delete arg mode. All callers updated.
6166 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6167 (eq-attr): New arg obj.
6169 * m32r.cpu (rach): Update calls to andif.
6171 * minsn.scm (-minsn-parse-expansion): Renamed from
6172 parse-minsn-expansion.
6173 (-minsn-parse): Renamed from parse-minsn.
6174 (-minsn-read): Renamed from read-minsn.
6175 (def-minsn): Don't check APPLICATION here.
6176 (def-full-minsn): New proc.
6177 (define-macro-insn): Check APPLICATION here. Expand macros.
6178 (define-normal-macro-insn): Ditto.
6180 * utils.scm (word-value): New arg start-lsb?.
6181 (word-mask,word-extract): Ditto.
6182 (split-bits,powers-of-2): Use integer-expt instead of expt.
6183 (bit-set?): Handle 32 bit values (which are bignums).
6184 (cg-logand,cg-logxor): New functions.
6185 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6186 (<ifield>,field-value): Update call to word-value.
6187 (<ifield>,min-value): Use integer-expt instead of expt.
6188 (<ifield>,max-value): Ditto.
6190 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6192 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6194 Compute raw instruction format in addition to semantic based format.
6195 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6196 (<iformat> accessors): Rename accessors to ifmt-*.
6197 (<sformat>): New class.
6198 (fmt-enum): Renamed from fmt:enum.
6199 (-ifmt-search-key): Rewrite.
6200 (-sfmt-search-key): New proc.
6201 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6202 Compute iformat and sformat search keys.
6203 (ifmt-build): Update.
6204 (sfmt-build): New proc.
6205 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6206 (ifmt-compute!): Compute instruction format <iformat> based on
6207 instruction fields alone. Compute new semantic format <sformat>
6208 based on instruction fields and semantic information.
6209 (ifmt:lookup): Delete.
6210 * mach.scm (<arch>): New member sfmt-list, plus accessors.
6211 (current-sfmt-list): New proc.
6212 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6213 Rename member fmt to ifmt. New members fmt-desc, sfmt.
6214 (insn-length,insn-length-bytes): Update.
6215 (insn:mask-length,insn:mask): Update.
6216 (insn-lookup-op): Update.
6217 * gas-test.scm (gas-test-analyze!): Update.
6218 (gen-gas-test): Ditto.
6219 * sim-test.scm (sim-test-analyze!): Update.
6220 (gen-sim-test): Ditto.
6221 * opcodes.scm (gen-operand-instance-table): Update.
6222 (gen-operand-instance-ref): Ditto.
6223 (max-operand-instances): Use heuristic if semantics not parsed.
6224 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6225 (opcodes-analyze!): Only scan semantics of building operand instance
6227 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6228 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6229 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6230 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6231 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6232 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6233 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6235 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6236 New arg lsb0? All callers updated.
6237 (decode-bits): New arg lsb0?. All callers updated.
6238 (opcode-slots): Update call to bit-set?. Call integer-expt instead
6240 (-gen-decode-bits): New arg lsb0?. All callers updated.
6241 (build-slots): Call integer-expt instead of expt.
6242 (build-decode-table-entry): Handle crossing word boundaries better.
6243 (-gen-decode-switch): New arg lsb0?. All callers updated.
6244 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6246 * enum.scm (define-enum): Rewrite.
6247 (define-normal-enum): Ditto.
6248 (def-full-insn-enum): New proc.
6249 (define-normal-insn-enum): Rewrite.
6251 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6253 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6255 * dev.scm: Add sid support.
6257 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6258 (CLEANFILES): Add tmp-*.
6259 * Makefile.in: Rebuild.
6261 * doc/Makefile.am: New file.
6262 * doc/Makefile.in: New file.
6263 * doc/cgen.texi: New file.
6264 * Makefile.am (SUBDIRS): Define.
6265 * Makefile.in: Rebuild.
6266 * configure.in: Create doc/Makefile.
6267 * configure: Rebuild.
6269 1999-01-18 Doug Evans <devans@casey.cygnus.com>
6271 * insn.scm (insn:syn): Delete.
6273 1999-01-15 Doug Evans <devans@casey.cygnus.com>
6275 * fr30.cpu (model fr30-1): Add state variables load-regs,
6276 load-regs-pending. Delete h-gr. Clean up operand names of all units.
6277 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6278 (model m32rx): Ditto.
6279 (addi): Simplify function unit usage spec.
6280 (ld-plus): Rewrite operand names in function unit usage spec.
6281 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6282 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6283 overridden. Allow operand to appear in input and output spec.
6284 (<insn>,gen-profile-code): string-append -> string-list.
6286 * ifield.scm (define-ifield): Call pmacro-expand.
6287 (define-full-ifield,define-normal-ifield): Ditto.
6288 (define-multi-ifield,define-normal-multi-ifield): Ditto.
6290 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6291 with-scache and without-scache cases.
6293 1999-01-14 Doug Evans <devans@casey.cygnus.com>
6295 * fr30.cpu (fr30-1): Add state variable h-gr.
6296 Add units u-cti, u-load, u-store, u-ldm, u-stm.
6297 (all insns): First pass at providing cycle counts.
6298 * sim.scm (<unit>,gen-profile-code): Only check for output operands
6299 when initializing unit output operands, ditto for input operands.
6301 * insn.scm (insn-length,insn-length-bytes): New procs.
6302 * mach.scm (-adata-set-derived!): Use them.
6303 * sim-cpu.scm (-gen-sem-case): Ditto.
6305 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6306 (-gen-write-case): Ditto.
6307 (gen-semantic-fn): Ditto. Split into two:
6308 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
6310 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
6311 scache/no-scache appropriately. All callers updated.
6312 (-gen-sem-case): PCADDR->IADDR.
6313 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6315 * sim-decode.scm (*): Replace string-append,string-map with
6316 string-list,string-list-map where the result is sufficiently large.
6317 (-gen-decode-insn-table): Go back to simple version for non-scache
6318 case: just record IDESC in decoder tables and leave field extraction
6320 (-gen-decode-switch): Ditto.
6321 (-gen-decode-fn): Ditto.
6322 (-gen-extract-decls): Only emit format enum if with-scache?.
6323 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6325 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6326 (-gen-insn-timing): Ditto.
6327 * sim.scm (gen-argbuf-type): Only output sem_fields union in
6330 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6331 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6333 1999-01-12 Doug Evans <devans@casey.cygnus.com>
6335 * cpu.scm (keep-mach-validate!): New proc.
6336 (include): New proc.
6338 * mach.scm (current-arch-mach-name-list): New proc.
6339 (-parse-arch-machs): Always return canonical form.
6340 (def-arch): Validate user specified machs to be kept.
6341 (def-mach-attr!): Simplify.
6343 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6344 (option-init!): Initialize it.
6345 (option-set!): Set it.
6346 (gen-insn-table-entry): Emit 0 for operand instance ref if not
6347 output operand instance tables.
6348 (cgen-opc.in): Only output operand instance tables if asked to.
6350 * sim.scm (option-init!,option-set!): Clarify returned value.
6352 * sim.scm (gen-mach-bfd-name): Move from here.
6353 * utils-cgen.scm: To here.
6355 1999-01-11 Doug Evans <devans@casey.cygnus.com>
6357 * fr30.cpu (ilm): Fix comment field.
6358 (cond-branch): Remove explicit setting of COND-CTI, let cgen
6361 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6362 (rtx-true?, rtx-false?): New procs.
6363 * rtx-funcs.scm (annul): Rename vpc to pc.
6364 (-rtx-traverse-if): Improve determination of whether then/else parts
6365 are conditionally executed.
6367 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6369 (gen-argbuf-type): Simplify generated definition (big sem_fields
6370 union moved outside).
6372 1999-01-11 Ben Elliston <bje@cygnus.com>
6374 * doc/porting.texi: New file.
6376 * doc/intro.texi: New file.
6377 (Layout): Use @example to insert preformatted ASCII text (such as
6378 diagrams). @code is inappropriate here.
6380 1999-01-06 Doug Evans <devans@casey.cygnus.com>
6382 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6384 * m32r.opc (print_hash): Cast dis_info.
6386 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6387 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6390 1999-01-05 Doug Evans <devans@casey.cygnus.com>
6392 * i960.cpu (f-br-disp): Remove RELOC attribute.
6393 (f-ctrl-disp): Ditto.
6394 (callx-disp): set-quiet -> set for (reg h-gr 2).
6395 (callx-indirect,callx-indirect-offset): Ditto.
6397 * Makefile.am (gas-test): Fix dependencies.
6398 * Makefile.in: Rebuild.
6399 * cgen-gas.asm: File creation args are -<uppercase-letter>.
6400 * gas-test.scm (break-out-syntax,make-file-name): Delete.
6401 (gas-test-analyze!): Use syntax-break-out.
6402 * sim-test.scm (break-out-syntax,make-file-name): Delete.
6403 (sim-test-analyze!): Use syntax-break-out.
6404 (cgen-build.sh): Use gen-file-name.
6405 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6406 * insn.scm (syntax-break-out): New proc.
6407 * utils.scm (gen-file-name): New proc.
6409 * fixup.scm (nil,<?,<=?,>?): Delete.
6411 * utils.scm (count-true): Rewrite.
6413 * slib/sort.scm: Move sort.scm to slib directory.
6416 * iformat.scm (ifmt-compute!): Record empty format.
6418 * rtl.scm (semantic-in-out-operands): Simplify by moving several
6419 internal procs outside. Handle expression register numbers.
6422 * rtx-funcs.scm (annul): Rename new_pc to vpc.
6424 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6426 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6427 (gen-semantic-fn,-gen-sem-case): Ditto.
6428 (cgen-cpu.c): Define WANT_CPU to @cpu@.
6429 (cgen-semantics.c): Ditto.
6430 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6431 (gen-ifmt-argvars-defns): New proc.
6432 (gen-ifmt-argvars-assigns): New proc.
6433 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6434 (-gen-decode-fn): Handle non-with-scache case.
6435 (cgen-decode.c): Define WANT_CPU to @cpu@.
6436 * sim-models.scm (-gen-mach-defns): Emit bfd name.
6437 (cgen-model.c): Define WANT_CPU to @cpu@.
6438 * sim.scm (gen-ifld-extract-argvar): New proc.
6439 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6440 with FUN-ACCESS specified.
6441 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6442 (<hw-register>,gen-extract): New arg local?.
6443 (<hw-address>,gen-extract): Ditto.
6444 (-hw-cxmake-get): Handle non-with-scache case.
6445 (-hw-gen-set-quiet): Ditto.
6446 (<hw-address>,cxmake-get): Handle non-with-scache case.
6447 (gen-op-extract-argvar): New proc.
6448 (<operand>,gen-record-profile): Rewrite.
6449 (<operand>,gen-profile-code): Rewrite.
6450 (<unit>,gen-profile-code): Use -gen-argfld-ref.
6451 (gen-argbuf-fields-union): New proc.
6452 (gen-argbuf-type): Use it. Handle non-scache case.
6454 * *.scm: class:foo procs renamed to class-foo.
6455 * attr.scm (<attribute>): New member `for'.
6456 (-attr-parse): New first value in list for default if
6458 (non-bool-attr-list,attr:add!): Delete.
6459 (def-attr): Use current-attr-add!.
6460 (atlist-attr-value-no-default): New proc.
6461 (attr-lookup-default): Handle boolean attributes.
6462 (gen-attr-enum): New proc.
6463 (-attr-remove-meta-attrs-alist): New proc.
6464 (attr-nub): New proc.
6465 (current-attr-list-for): New proc.
6466 (current-{ifld,hw,op,insn}-attr-list): New procs.
6467 (attr-builtin!): New proc.
6468 * cpu.scm (keep-obj?): Rewrite.
6469 (-init-parse-cpu!): Call arch-init!.
6470 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6471 (-finish-parse-cpu!): Call arch-finish!.
6472 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6473 (def-enum,def-full-enum): Use current-enum-add!.
6474 (gen-obj-list-enums): New proc.
6475 * hardware.scm (hw:add!,hw:lookup): Delete.
6476 (def-hardware,def-hardware-ext): Use current-hw-add!.
6477 (hw:std-attrs,hw:attr-list): Delete.
6478 (hardware-builtin!): Define builtin hardware attributes.
6479 * ifield.scm (ifld:add!,ifld:lookup): Delete.
6480 (def-ifield,def-full-ifield): Use current-ifld-add!.
6481 (ifld:std-attrs,ifld:attr-list): Delete.
6482 (ifield-builtin!): New proc.
6483 * insn.scm (insn:add!,insn:lookup): Delete.
6484 (def-full-insn): Use current-insn-add!.
6485 (insn:std-attrs): Delete.
6486 (insn-builtin!): New proc.
6487 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6489 (<arch-data>): New member machs.
6490 (current-attr-list,current-enum-list): New procs.
6491 (current-op-list,current-minsn-list): New procs.
6492 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6493 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6495 (-parse-arch-machs): New proc.
6496 (-arch-parse): New arg machs, all callers updated.
6497 (-arch-read): Handle machs spec.
6498 (def-arch): Define MACH attribute here.
6499 (mach-init!,mach-finish!): Not here.
6500 (cpu:add!,cpu:lookup): Delete.
6501 (def-cpu): Use current-cpu-add!.
6502 (<mach>): New member bfd-name.
6503 (-mach-parse): New arg bfd-name, all callers updated.
6504 (-mach-read): Handle bfd-name spec.
6505 (mach:add!,mach:lookup): Delete.
6506 (def-mach): Use current-mach-add!.
6507 (def-mach-attr!): New proc.
6508 (arch-init!): New proc.
6509 (arch-finish!): New proc. Reverse all object lists here.
6510 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
6511 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
6512 (define-normal-macro-insn): Ignore minsn if mach not kept.
6513 * mode.scm (mode-builtin!): New proc.
6514 * model.scm (model:add!,model:lookup): Delete.
6515 (def-model): Use current-model-add!.
6516 * opcodes.scm (insn:attr-list): Delete.
6517 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
6518 (gen-attr-table-defn): Emit value for default.
6519 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
6520 (op:attr-list): Delete.
6521 (gen-operand-decls,gen-insn-decls): New proc.
6522 (compute-insn-attr-list): Delete.
6523 (cgen-opc.h): Reorganize and simplify.
6524 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
6525 (def-operand,def-full-operand): Use current-op-add!.
6526 (op:std-attrs): Delete.
6527 (operand-enum): Delete.
6528 (operand-builtin!): Define builtin operand attrs.
6529 * utils-cgen.scm (sanitize): Update calls to lookup procs.
6530 (gen-attr-enum-decl): Use gen-obj-list-enums.
6531 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
6533 * fr30.cpu (define-arch): Add machs spec.
6534 (f-i4): SIGNED attribute -> !UNSIGNED.
6535 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
6536 (HASH-PREFIX): Define operand attribute.
6537 (NOT-IN-DELAY-SLOT): Define insn attribute.
6538 * i960.cpu (define-arch): Add machs spec.
6539 * m32r.cpu (define-arch): Add machs spec.
6540 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
6541 (HASH-PREFIX): Define operand attribute.
6542 (FILL-SLOT): Define insn attribute.
6544 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
6546 * fr30.cpu (stilm): Correct mask for and operation.
6548 1998-12-17 Doug Evans <devans@casey.cygnus.com>
6550 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
6551 Replace START/EXIT with start/pass.
6552 (gen-sim-test): Delete ".text".
6554 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
6556 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
6558 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
6560 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
6561 (h-sbit): Make it FUN-ACCESS.
6562 (h-gr): Reorder so that general regs are always printed by number.
6564 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
6566 * i960.cpu (flushreg): Use nop.
6568 1998-12-14 Doug Evans <devans@casey.cygnus.com>
6570 * m32r.cpu (default-alignment): Specify.
6571 * mach.scm (<arch-data>): New member default-alignment.
6572 (adata:default-alignment): New proc.
6573 (current-arch-default-alignment): New proc.
6574 (-arch-parse): New arg default-alignment.
6575 (parse-alignment): New proc.
6576 (-arch-read): Handle default-alignment spec.
6578 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
6580 * insn.scm (f-%): Delete.
6581 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
6582 be readded if proved useful.
6583 (gen-extract-fields): Ditto. Use gen-ifetch.
6584 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
6585 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
6587 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
6589 * fr30.cpu (div2): Set zbit properly when remainder not zero.
6591 1998-12-14 Dave Brolley <brolley@cygnus.com>
6593 * fr30.cpu: Remove stub macros.
6594 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
6595 (div2): Don't use addc/subc.
6597 1998-12-11 Doug Evans <devans@casey.cygnus.com>
6599 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
6602 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
6604 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
6606 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
6608 * cpu.scm (keep-all?): New proc.
6609 (assert-keep-all): Use it.
6610 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
6611 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
6612 Check for spelling errors.
6614 1998-12-09 Doug Evans <devans@casey.cygnus.com>
6616 * rtl.scm (s-convop): Call -rtx-sem-mode.
6618 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
6620 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
6621 (-parse-hw-profile): Ditto.
6622 (<hw-register>, parse!): Return `void' result.
6623 (<hw-pc>, parse!): Ditto.
6624 (<hw-memory>, parse!): Ditto.
6625 (<hw-immediate>, parse!): Ditto.
6626 (<hw-address>, parse!): Ditto.
6628 * ifield.scm (-ifield-parse): Validate encode/decode fields.
6629 (-ifld-parse-encode-decode): New proc.
6630 (-ifld-parse-encode,-ifld-parse-decode): New proc.
6631 (-multi-ifield-parse): Set encode/decode to #f.
6632 (ifld:decode-mode): New proc.
6633 * utils.scm (nub): Rewrite.
6634 * operand.scm (op-nub): Rewrite.
6635 * sim.scm (<ifield>, gen-type): Rewrite.
6636 (-gen-ifld-argbuf-defn): New proc.
6637 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
6638 (<sim-hardware>): Forward gen-trace-extract onto `type'.
6639 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
6640 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
6641 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
6642 New method gen-trace-extract.
6643 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
6644 from gen-argbuf-elm, return "" if not caching register address.
6645 Rewrite gen-extract. New method gen-trace-extract.
6646 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
6647 gen-extract, gen-trace-extract, cxmake-get.
6648 (<hw-iaddress>): New method cxmake-get.
6649 (op-needed-iflds): New proc.
6650 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
6651 (-gen-op-argbuf-defn): New proc.
6652 (gen-op-extract): Renamed from op:extract.
6653 (gen-op-trace-extract): Renamed from op:trace-extract.
6654 (fmt-extractable-operands): Renamed from fmt-semantic-operands
6656 (gen-argbuf-elm): Rewrite.
6657 * sim-decode.scm (-gen-record-args): Update.
6659 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
6661 * pmacros.scm (-pmacro-expand): Handle procedural macros in
6662 argument position. Flag symbolic macros in function position as
6664 (define-pmacro): Handle quoting in definition of symbolic macros.
6665 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
6667 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
6669 * fr30.opc (parse_register_list): Account for reverse masks
6671 (print_register_list): Ditto.
6672 (parse_low_register_list_ld): New function.
6673 (parse_hi_register_list_ld): New function.
6674 (parse_low_register_list_st): New function.
6675 (parse_hi_register_list_st): New function.
6676 (print_hi_register_list_ld): New function.
6677 (print_hi_register_list_st): New function.
6678 (print_low_register_list_ld): New function.
6679 (print_low_register_list_st): New function.
6680 * fr30.cpu (ldr15dr): Implement workaround.
6681 (ldm0,ldm1,stm0,stm1): Implemented.
6683 1998-12-08 Doug Evans <devans@casey.cygnus.com>
6685 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
6686 * configure: Regenerate.
6687 * Makefile.am (WITH_HOBBIT): Update.
6688 (cgen-hob.c): Remove Makefile dependency.
6689 (cgen.o): Depend on cgen-gh.h, config.h.
6690 * Makefile.in: Regenerate.
6691 * aclocal.m4: Regenerate.
6693 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
6695 * i960.cpu, i960.opc: New files.
6697 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
6699 * fr30.opc (parse_register_number): New function.
6700 (parse_register_list): New function.
6701 (parse_low_register_list): Use parse_register_list.
6702 (parse_hi_register_list): Use parse_register_list.
6703 * fr30.cpu (sth): Fix assembler syntax. Implement more
6706 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
6708 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
6709 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
6710 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
6711 (-op-gen-set-trace-parallel): Ditto.
6712 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
6714 * fr30.cpu (call,calld): Fix setting of pc.
6715 (f-op5): Fix start bit number.
6717 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
6719 * fr30.cpu (st): Fix operand ordering. Implement more
6722 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
6724 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
6725 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
6726 (fmt-semantic-operands): Move to sim.scm.
6727 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
6728 * operand.scm (<hw-index>): New member `name'. All builders updated.
6729 (<hw-index>): New method get-name.
6730 (op-profilable?): Moved to sim.scm.
6732 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
6733 (op-profilable?): Moved here from operand.scm.
6734 (gen-extract-type): Delete.
6735 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
6736 (-gen-argfld-ref): New proc.
6737 (-gen-ifld-argfld-name): New proc.
6738 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
6739 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
6740 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
6741 (<hardware-base>): Delete method gen-extract-type. New method
6743 (<hw-register): Ditto. Update method gen-extract.
6744 (<operand>, method gen-argbuf-elm): Rewrite.
6745 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
6746 (s-cmpop): Fix handling of eq,ne for unsigned modes.
6747 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
6749 * sim-decode.scm (-gen-record-args): Tweak.
6751 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
6753 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
6755 * doc/porting: Fix typo: gas->sim.
6756 * fr30.opc (print_m4): New function.
6757 * fr30.cpu: Implemented many insns.
6759 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
6761 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
6763 * fr30.cpu (f-rel9): Delete RELOC attribute.
6764 (f-rel12): Add PCREL-ADDR attribute.
6765 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
6766 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
6767 * fr30.opc (print_label9): Delete.
6769 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
6770 code for CTI indicators.
6771 * insn.scm (insn-cti?): Simplify.
6772 * utils-cgen.scm (atlist:cti?): New proc.
6774 1998-11-30 Doug Evans <devans@casey.cygnus.com>
6776 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
6777 (f-i20-4,f-i20-16,f-i20): New fields.
6783 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
6784 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
6785 * mach.scm (arch-data): Ditto.
6786 (current-arch-default-insn-word-bitsize): Renamed from
6787 current-arch-default-insn-bitsize [ya, that's a pretty long name].
6788 (-arch-read): Update.
6790 * hardware.scm (hw:attr-list): Move here ...
6791 * opcodes.scm: ... from here.
6793 * ifield.scm (fld:bitrange): Delete.
6794 (fld:word-offset,fld:word-length): New procs.
6795 (ifield?): Use class-instance.
6796 (<ifield>, method field-start): Rewrite.
6797 (ifld:enum): New proc.
6798 (<ifield>, methods field-mask,field-value): Rewrite.
6799 (-ifield-parse): Rewrite.
6800 (<multi-ifield> support): Rewrite.
6801 (ifld-beyond-base?): Rewrite.
6802 (ifld:std-attrs): New variable.
6803 (ifld:attr-list): New proc.
6804 * iformat.scm (-compute-insn-mask): Rewrite.
6805 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
6807 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
6808 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
6810 (<operand>): Ditto. Forward onto index instead.
6811 (gen-ifld-decls,gen-ifld-defns): New procs.
6812 (ifld:insert,ifld:extract): New procs.
6813 (<ifield>): New methods gen-insert, gen-extract.
6814 (<multi-ifield>): Ditto.
6815 (<hw-index>): Forward gen-insert,gen-extract onto value.
6816 (<hw-asm>): Delete insert/extract support.
6817 (<hw-register,hw-memory,hw-immediate>): Ditto.
6818 (gen-hash-defines): Use string-list.
6819 Define CGEN_MAX_IFMT_OPERANDS.
6820 (gen-switch): Use string-list,string-list-map.
6821 (gen-fget-switch,gen-fset-switch): Use string-list.
6822 (gen-parse-switch,gen-insert-switch): Ditto.
6823 (gen-extract-switch,gen-print-switch): Ditto.
6824 (gen-insert-switch,gen-extract-switch): New local `total_length'.
6825 (gen-ifmt-table-1,gen-ifmt-table): New procs.
6826 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
6827 (gen-ivalue-entry): New proc.
6828 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
6829 computation. Use 0 for operand ref table if ALIAS insn.
6830 (gen-minsn-table-entry): Use string-list.
6831 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
6832 (gen-opcode-open): Record address of ifield table.
6833 (cgen-opc.h): Call gen-ifld-decls.
6834 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
6835 * types.scm (<bitrange>): New members word-offset,word-length.
6836 Delete member total-length. Delete methods start,mask,value.
6837 (bitrange:word-offset,bitrange:word-length): New procs.
6838 * sim-cpu.scm (gen-define-fields): Simplify.
6839 (gen-extract-fields): Simplify.
6840 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
6841 (<ifield>): New methods gen-ifld-extract-decl.
6842 Delete method gen-ifld-extract-beyond.
6843 (<multi-ifield>): New methods gen-ifld-extract-decl.
6844 (<multi-ifield>, method gen-ifld-extract): Implement.
6845 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
6846 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
6848 * rtl.scm (-rtx-traverse-no-mode): Process operands.
6849 (-rtx-traverse-syntax-no-mode): New proc.
6850 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
6851 (s-ifield): New proc.
6852 (s-shop): Don't prepend `unsigned' for unsigned modes.
6853 * rtx-funcs.scm (ifield): New rtx function.
6854 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
6855 (delay): New rtx function.
6856 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
6858 * cos.scm (-elm-make-method-getter): Fix typo.
6860 * utils.scm (backslash): Handle lists of strings.
6862 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
6864 * fr30.cpu (f-rel9): Correct for pc+2.
6865 (label9): Use print_label9.
6866 * fr30.opc (print_label9): New function.
6868 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
6870 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
6871 * fr30.opc (parse_low_register_list): Renamed.
6872 (parse_hi_register_list): Renamed.
6873 (print_hi_register_list): Renamed.
6874 (print_low_register_list): Renamed.
6876 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
6878 * fr30.cpu (f-rel9): Now a pc relative offset.
6880 1998-11-23 Doug Evans <devans@casey.cygnus.com>
6882 * opcodes.scm (op-asm): Move to here, from operands.scm.
6883 (<op-asm>, method parse!): Validate arguments.
6884 (<operand>, method gen-function-name): Fix thinko.
6885 * operand.scm (<operand>, method make!): Don't set op-asm here.
6886 * utils.scm (list-elements-ok?): New proc.
6888 * opcodes.scm: Clean up pass.
6890 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
6892 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
6893 the fr30_int function.
6894 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
6895 (h-dr): Add FUN-ACCESS attribute.
6897 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
6899 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
6900 for C symbol for models array.
6902 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
6904 * fr30.opc (parse_reglist_low): New function.
6905 (parse_reglist_hi): New function.
6906 (print_reglist_low): New function.
6907 (print_reglist_hi): New function.
6908 * fr30.cpu: Finish remaining insn stubs.
6910 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
6912 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
6914 * fr30.cpu (ldi32m): Don't use for disassembly.
6916 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
6918 * fr30.cpu (int): Implement it.
6920 1998-11-18 Doug Evans <devans@casey.cygnus.com>
6922 * rtx-funcs.scm (nop): Fix C code.
6924 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
6926 * fr30.cpu (f-i32): New ifield.
6929 (ldi32m): New macro insn.
6930 (inte): Provide simple version for now.
6932 * sim-arch.scm: New file.
6933 * sim.scm: Move architecture support generation to sim-arch.scm.
6934 * cgen-sim.scm: Load sim-arch.scm.
6937 * hardware.scm (pc?) New proc.
6938 (class <hardware-base>): Rewrite method 'pc?.
6939 (class <hardware>): Forward 'pc? to the hardware type.
6940 (class <hw-pc>): New method 'pc?.
6942 Add support for variable length ISAs.
6943 * ifield.scm (ifld-beyond-base?): New proc.
6944 * m32r.cpu: Remove integral-insn? spec.
6945 * mach.scm (arch:derived,arch:set-derived!): New procs.
6946 (arch:app-data,arch:set-app-data!): New procs.
6947 (class <arch>): New members derived, app-data.
6948 (class <cpu>): Delete member integral-insn?.
6949 (cpu:integral-insn?): Delete.
6950 (-cpu-parse): Delete arg integral-insn?. All callers updated.
6951 (-cpu-read): Delete integral-insn? support.
6952 (state:decode-assist): Delete.
6953 (state:int-insn?): Delete.
6954 (<derived-arch-data>): New class.
6955 (-adata-set-derived!): New proc.
6956 (mach-finish!): Call it.
6957 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
6958 (gen-operand-instance): Add COND_REF support.
6959 (gen-operand-instance-table): Ditto.
6960 (gen-hash-defines): Update.
6961 (gen-extract-switch): Update type of `insn_value' arg.
6962 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
6963 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
6965 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
6966 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
6967 beyond the base insn (for large insns).
6968 (-gen-extract-beyond-var-list): New proc.
6969 (gen-extract-fields): Handle large insns.
6970 (-gen-write-case): Update sem_arg computation.
6971 Update initial vpc computation.
6972 (gen-semantic-fn): Ditto. Update type of `insn'.
6973 (-gen-sem-case): Update sem_arg computation.
6974 Update initial vpc computation.
6975 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
6976 (-gen-extract-word): New proc.
6977 (<ifield>): New method gen-ifld-extract-beyond.
6978 (gen-ifld-extract-beyond): New proc.
6979 * types.scm (bitrange-overlap?): New proc.
6981 * utils.scm (bits->bytes): New proc.
6982 (bytes->bits): New proc.
6984 Move extraction support into decoder.
6985 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
6986 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
6987 support to sim-decode.scm.
6988 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
6989 be array of IDESC,FMT entries. Make the array const.
6990 (-gen-gcc-label-table): Make array const.
6991 (-gen-decode-switch): Branch to extraction code after insn has been
6993 (-gen-decode-insn-globals): Delete extract handler from
6995 (gen-decode-fn): Add extraction support.
6996 (-gen-sem-fn-decls): Delete extraction fn decls.
6997 (-gen-idesc-decls): Update @cpu@_decode decl.
6998 (-gen-idesc-init-fn): Delete extraction support.
6999 (-gen-extract-decls): New proc.
7001 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7002 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7004 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7005 All callers updated.
7006 (table-entry:make): Record insn value as insn object, not name.
7009 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7010 collision with C function.
7011 (path_dirname): Similarily.
7012 * hobbit.c,hobbit.h: Rebuild.
7014 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7016 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7018 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7020 * fr30.cpu: Implement more instruction stubs.
7022 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7024 * fr30.cpu: Implement more instruction stubs.
7026 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7028 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7030 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7032 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7033 (op:std-attrs): Ditto.
7034 * opcodes.scm (gen-operand-instance): Ditto.
7035 (gen-switch): Ditto.
7036 * m32r.cpu (condbit,accum): Update.
7037 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7039 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7041 * enum.scm (-enum-read): Fix typo.
7043 * iformat.scm (-ifmt-search-key): Simplify a little.
7045 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7047 * doc/porting: semantics.c -> sem.c.
7048 * Makefile.in: Regenerate.
7049 * fr30.cpu (add): Change ADD to add. Add more registers and set
7050 status bits on 'add' instruction.
7052 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7054 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7057 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7059 * minsn.scm (minsn:enum): Update, call current-arch-name.
7061 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7063 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7064 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7065 (ARCH,CGEN,CGENFLAGS): New variables.
7066 (gas-test,sim-test): New rules.
7067 * Makefile.in: Rebuild.
7068 * configure.in (arch): Define.
7069 * configure: Rebuild.
7071 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7072 * All .scm files: Ditto.
7074 * dev.scm: Fix gas-test call to cpu-load.
7075 * gas-test.scm: Clean up pass to remove bit-rot.
7076 * sim-test.scm: Ditto.
7078 * enum.scm (read-enum): Fix typo in `vals' handling.
7080 * hardware.scm (-parse-hw-type): Fix typo.
7081 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7082 (def-hardware,define-normal-hardware): Ditto.
7084 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7085 (display-var): Use it.
7086 * hobbit.c: Rebuild.
7087 * hobbit.h: Rebuild.
7089 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7090 avoid hobbit problem.
7091 * mach.scm (-cpu-read): Rename local `parallel-insns' to
7092 `parallel-insns-' to avoid hobbit problem.
7094 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
7096 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7097 (parse_slo16,parse_ulo16): Ditto.
7098 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7100 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
7102 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7103 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7104 * Makefile.in: Rebuild.
7105 * insn.scm (define-normal-insn): Expand pmacros.
7106 * mode.scm (<mode>): New member `host?'. All uses updated.
7107 (mode:host?): New proc.
7108 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7109 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7110 (define-rtx-dual-mode): Ditto.
7111 (s-index-of): New proc.
7112 (s-unop): Use plain C for host mode operations.
7113 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7114 * rtx-funcs.scm (index-of): New rtx function.
7115 * sim.scm (<hw-index>): New method cxmake-get.
7117 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
7119 * sim-cpu.scm (-gen-engine-decls): Delete.
7121 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
7123 * doc/rtl (Example): Correct Typo.
7124 * doc/porting: Add 'make dep' step to opcodes port instructions.
7125 * fr30.opc: New file.
7126 * fr30.cpu: New file.
7128 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
7130 * configure.in: Handle guile $exec_prefix = $prefix/foo.
7131 * Makefile.am (GUILEINCDIR): New variable.
7133 * configure: Regenerate.
7134 * Makefile.in: Ditto.
7135 * aclocal.m4: Ditto.
7137 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
7139 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7140 (cgen-semantics.c): Ditto.
7141 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7142 * sim-model.scm (cgen-model.c): Ditto.
7143 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7144 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7146 * opcodes.scm (read-cpu.opc): Handle empty file.
7148 * cos.scm (-elm-make-method-setter): Fix typo.
7150 * cpu.scm (-init-parse-cpu!): Call types-init!.
7151 (-finish-parse-cpu!): Call types-finish!.
7152 * ifield.scm (<ifield>): Delete members start,length.
7153 New member bitrange.
7154 (<ifield>, methods field-start,field-length): Update.
7155 (fld:start): New arg insn-len. All callers updated.
7156 (<ifield>, methods field-mask,field-value): Update.
7157 (-ifield-parse): Update.
7158 (ifield-init!): Update.
7159 * iformat.scm (compute-insn-length): Simplify.
7160 (compute-insn-mask): Update.
7161 * insn.scm (insn:value): Update.
7162 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7163 (current-arch-default-insn-bitsize): New proc.
7164 (current-arch-insn-lsb0?): New proc.
7165 (-arch-parse,-arch-read): Update.
7166 (<cpu>): New member file-transform.
7167 (-cpu-parse,-cpu-read): Update.
7168 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7169 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7170 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7171 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7172 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7173 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7174 * operand.scm (op:start): Update call to field-start method.
7175 * sim-decode.scm (opcode-slots): New arg lsb0?.
7176 (fill-slot!,build-slots): Ditto.
7177 (build-decode-table-entry,build-decode-table-guts): Ditto.
7178 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7179 (gen-decode-fn): Ditto.
7180 (cgen-decode.c): Update call to gen-decode-fn.
7181 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7182 (-gen-cpu-header,-gen-cpuall-includes): New procs.
7183 (cgen-cpuall.h): Call -gen-cpuall-includes.
7184 * types.scm (<bitrange>): New class.
7185 (types-init!,types-finish!): New procs.
7186 * utils-cgen.scm (parse-number): New proc.
7187 (parse-boolean): New proc.
7188 * utils.scm (word-value): Renamed from shift-bits, rewrite.
7189 (word-mask): Rewrite.
7190 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7191 (m32rxf): New field `file-transform'.
7192 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7194 * hobbit.h: Fix include file name.
7196 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
7198 * slib: New directory of slib files used by cgen/hobbit.
7199 * hobbit.scm: New file.
7200 * hobbit.c: New file.
7201 * hobbit.h: New file.
7202 * hobscmif.h: New file.
7203 * hob-main.c: New file.
7204 * hobslib.scm: New file.
7206 * Makefile.am: Add support for compiling hobbit, and using compiled
7207 version of hobbit to compile cgen.
7208 * Makefile.in: Regenerate.
7209 * configure.in: Support --with-hobbit.
7210 * configure: Regenerate.
7211 * acconfig.h (WITH_HOBBIT): Add.
7212 * config.in: Regenerate.
7214 * rtl.scm: New file, was cdl-c.scm.
7215 Definition of rtx funcs moved to rtx-funcs.scm.
7216 (semantic-in-out-operands): Rewrite to compute object form of
7218 * rtx-funcs.scm: New file.
7220 * cgen-gh.c: #include "config.h".
7221 (gh_cadddr,gh_cddddr): New fns.
7222 (cgh_vector_to_list): New fn.
7223 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7224 (cgh_init): Prefix qsort procs with "cgh-".
7225 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7226 * cgen.c: #include "config.h".
7228 * attr.scm (bitset-attr?): New proc.
7229 (<bitset-attribute>, method parse-value): Value syntax changed from
7230 (val1 val2 ...) to val1,val2,....
7231 (<bitset-attribute>): New method gen-value.
7232 (<integer-attribute>): New method gen-value.
7233 (<enum-attribute>): New method gen-value.
7234 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7235 (<reader>): New class.
7236 (CURRENT-ARCH,CURRENT-READER): New globals.
7237 (keep-mach?): Move here from mach.scm.
7238 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7239 (<arch>): New class.
7240 (<arch-data>): New class.
7241 (<cpu>): Make subclass of <ident>.
7242 (*ENDIAN* variables): Delete.
7243 (process-state-vars): Delete.
7244 (mach-finish!): Add `base' value to MACH attribute.
7245 * hardware.scm (<hardware>): Make subclass of <ident>.
7246 (hw:std-attrs): New global.
7247 (hw-profilable?): New proc.
7248 * ifield.scm (<ifield>): Make subclass of <ident>.
7249 (sort-ifield-list): Move here from iformat.scm.
7250 * iformat.scm (<iformat>): Renamed from <insn-format>.
7251 Make subclass of <ident>.
7252 (-ifmt-search-key): Include cti? in categorization of formats.
7253 (ifmt-analyze): Compile semantics (turn to object form).
7254 * insn.scm (<insn>): Make subclass of <ident>.
7255 New member compiled-semantics.
7256 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7257 * mode.scm (<mode>): Make subclass of <ident>.
7259 * model.scm (<unit>): Make subclass of <ident>.
7260 New members inputs,outputs.
7261 (<model>): Make subclass of <ident>. New member state.
7262 (-unit-parse): Parse inputs,outputs.
7263 (<iunit>): New class.
7264 (-insn-timing-parse-model): New proc.
7265 (parse-insn-timing): Function unit spec rewritten.
7266 * operand.scm (<operand>): Make subclass of <ident>.
7267 New members sem-name,num,cond? New method gen-pretty-name.
7268 (hw-index-scalar): New global.
7269 (op-nub-hw): Move here from rtl.scm.
7270 (op:lookup-sem-name,op-profilable?): New procs.
7271 * pmacros.scm: Rewrite to pass through hobbit.
7272 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7273 * utils.scm (logit): Make a macro.
7274 (bit-set?): Rewrite.
7275 (high-part): Rewrite.
7277 * m32r.cpu (define-arch): Move to top of file.
7278 (cpu family m32rbf): Renamed from m32rb.
7279 (model m32r/d): Function unit spec rewritten.
7280 (all insns): Ditto. Replace UBI with BI.
7282 * opcodes.scm (gen-attr-table-decls): Declare
7283 @arch@_cgen_hw_attr_table.
7284 (gen-attr-table-defns): Generate hw attribute table.
7286 * sim-cpu.scm (-gen-engine-decls): New proc.
7287 (-gen-model-decls): New proc.
7288 (gen-parallel-exec-type): Add new member `written' to struct parexec.
7289 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7290 (-gen-record-profile-args): Simplify.
7291 (-gen-parallel-sem-case): Delete.
7292 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7293 New local `written'. Delete profiling code.
7294 (-gen-sem-case): Ditto.
7295 (-uncond-written-mask,-any-cond-written?): New procs.
7296 (cgen-sem-switch.c): Include duplicates of insns that can be executed
7297 parallelly or serially, and write-back handlers for all parallel insns.
7298 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7299 support to initialization of struct insn_sem.
7300 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7301 (-gen-insn-sem-type): Add parallel write-back support to struct
7303 (-gen-idesc-init-fn): Add support for virtual insns.
7304 Add parallel write-back support.
7305 * sim-model.scm (gen-model-profile-fn): Delete
7306 (-gen-model-fn-decls): New proc.
7307 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7308 (-gen-model-init-fn): New proc.
7309 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7310 members in @mach@_init_cpu.
7311 (cgen-model.c): Generate model handlers for each insn.
7312 * sim.scm (gen-define-field-macro): Cti insns handled differently.
7313 (<hw-pc>): New method gen-write.
7314 (<hw-register>, method gen-write): New arg `mode'.
7315 (<hw-register>): Delete method gen-record-profile!.
7316 New method gen-profile-index-type.
7317 (<hw-memory>, method gen-write): New arg `mode'.
7318 (<hw-address>, method gen-extract): Delete.
7319 (<hw-address>, method gen-write): New arg `mode'.
7320 (<hw-index>, method get-write-index): Rewrite.
7321 (<pc>, method cxmake-get-direct): Delete.
7322 (<pc>): New method cxmake-get. Comment out methods
7323 gen-set-quiet,gen-set-trace.
7324 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7325 gen-profile-index-type,gen-profile-code.
7326 Delete method gen-pretty-name. Rewrite method gen-write.
7327 Delete method cxmake-get-direct.
7328 (-op-gen-set-trace): Update `written'.
7329 (-op-gen-set-trace-parallel): Ditto.
7330 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7331 (gen-cpu-insn-enum-decl): Add extra entries for parallel
7332 insns and their write-back handlers.
7333 (insn-op-lookup): New proc.
7334 (<unit>): New method gen-profile-code.
7335 (<iunit>): New method gen-profile-code.
7336 (gen-argbuf-elm): Add profiling elements.
7337 (gen-argbuf-type): Define cti insns separately in their own struct.
7338 Add member `addr_cache' to this struct. Add entries for pbb virtual
7339 insns. Move semantic entries here from struct scache.
7340 Delete everything from struct scache except argbuf.
7341 (<insn>, method gen-profile-locals): Rewrite.
7342 (<insn>, method gen-profile-code): Rewrite.
7343 (sim-finish!): Create virtual pbb insns.
7345 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
7347 * m32r.cpu (h-cr): Add bbpc,bbpsw.
7348 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7349 (h-psw,h-bpsw,h-bbpsw): Define.
7350 (rte,trap): Handle bbpc,bbpsw.
7351 * opcodes.scm (max-operand-instances): Fix typo.
7352 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7353 hardware elements to be fun-access.
7354 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7356 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
7358 * m32r.cpu (trap): Pass `pc' to m32r_trap.
7360 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
7362 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7364 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
7366 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7368 (mach m32r): Update.
7370 * mach.scm (mach:supports?): New proc.
7371 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7372 gen-reg-access-{decls,defns}.
7373 * sim.scm (gen-reg-access-{decl,defn}): New procs.
7374 (gen-mach-bfd-name): New proc.
7375 (gen-arch-reg-access-{decls,defns}): New procs.
7376 (cgen-arch.[ch]): Output register access cover fns.
7378 * hardware.scm (hardware-builtin!): Set print handlers for
7380 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7382 (CGEN_PRINT_NORMAL,print_hash): Ditto.
7383 (my_print_insn): Ditto. Delete args buf, buflen.
7384 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7385 (-hw-asm-specs): Add `handlers' spec.
7386 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
7388 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
7390 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7391 (<hw-asm>, parse!): New method.
7392 (gen-insn-table-entry): Print semantics.
7393 (gen-opcode-open): Renamed from gen-opcode-table.
7395 * utils.scm (string-write): No longer a macro.
7396 (-string-write): Handle procedure args.
7397 * opcodes.scm: Update all calls to string-write.
7398 * sim-cpu.scm: Ditto.
7399 * sim-decode.scm: Ditto.
7400 * sim-model.scm: Ditto.
7403 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
7405 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7406 (-gen-insn-builders,-gen-insn-builder): New procs.
7408 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
7410 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7411 (gen-opcode-table): Properly terminate comment.
7413 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
7416 Clean up pass over everything, so starting fresh.