OSDN Git Service

* sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
[pf3gnuchains/pf3gnuchains4x.git] / cgen / ChangeLog
1 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
2
3         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
4         for concatenation.
5         (-hw-gen-write-stack-decl): Likewise.
6
7 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
8
9         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
10         non-(adata-integral-insn? CURRENT-ARCH) case.
11
12 2005-10-28  Dave Brolley  <brolley@redhat.com>
13
14         Contribute the following changes:
15         2005-09-19  Dave Brolley  <brolley@redhat.com>
16
17         * attr.scm (gen-value-for-defn-raw): New methods.
18         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
19         gen-value-for-defn-raw.
20         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
21
22         2002-12-13  Dave Brolley  <brolley@redhat.com>
23
24         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
25         (-gen-attr-accessors): New function.
26         (gen-obj-attr-defn): Update terminating initializer.
27         (gen-obj-attr-end-defn): New function.
28         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
29         * sid-cpu.scm (cgen-desc.h): Generate code to include
30         "opcode/cgen-bitset.h"
31         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
32         name.
33         * desc.scm ('gen-defn): Update terminating initializer.
34         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
35         terminatinig initializer.
36         (gen-hw-decls): Ditto.
37         (gen-operand-decls): Ditto.
38         (gen-insn-decls): Ditto.
39         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
40         (gen-insn-table): Update terminating initializer.
41         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
42         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
43         * attr.scm (charmask-bytes): New function.
44         (bitset-attr->charmask): New function.
45         (<bitset-attribute>): Handle isa-attributes specially. Also handle
46         differences for SID-SIMULATOR.
47         (<integer-attribute>): Handle differences for SID-SIMULATOR.
48         (<enum-attribute>): Ditto.
49
50 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
51
52         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
53
54 2005-10-24  DJ Delorie  <dj@redhat.com>
55
56         * operand.scm (-anyof-merge-syntax): Print a more useful error
57         message.
58
59 2005-10-19  Nick Clifton  <nickc@redhat.com>
60
61         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
62         patch.
63
64 2005-10-18  Andreas Schwab  <schwab@suse.de>
65
66         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
67
68 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
69
70         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
71         size.
72
73 2005-08-02  Dave Brolley  <brolley@redhat.com>
74
75         * rtl-c.scm (s-unop): Don't dereference
76         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
77         (s-binop, s-convop, s-cmpop): Likewise.
78
79 2005-07-29  Dave Brolley  <brolley@redhat.com>
80
81         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
82         if with-profile or with-parallel-write.
83         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
84         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
85         string-append.
86
87 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
88
89         * cpu/fr30.opc (print_register_list): Correct format strings.
90         * cpu/ip2k.opc: Likewise.
91
92 2005-07-05  Nick Clifton  <nickc@redhat.com>
93
94         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
95         unsigned in order to avoid compile time warnings about sign
96         conflicts.
97
98 2005-07-01  Nick Clifton  <nickc@redhat.com>
99
100         * desc-cpu.scm: Update to ISO C90 function declaration style.
101         * opc-asmdis.scm: Likewise.
102         * opc-ibld.scm: Likewise.
103         * opc-itab.scm: Likewise.
104         * cpu/fr30.opc: Likewise.
105         * cpu/i960.opc: Likewise.
106         * cpu/ip2k.opc: Likewise.
107         * cpu/iq2000.opc: Likewise.
108         * cpu/m32r.opc: Likewise.
109         * cpu/openrisc.opc: Likewise.
110         * cpu/sh.opc: Likewise.
111         * cpu/sparc.opc: Likewise.
112         * cpu/xstormy16.opc: Likewise.
113
114 2005-06-15  Dave Brolley  <brolley@redhat.com>
115
116         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
117         (cgen-cpu.h): Call it.
118
119         Contributed on behalf of Graydon Hoare
120         2001-06-05  graydon hoare  <graydon@redhat.com>
121
122         * utils.scm (foldl): Define.
123         (foldr): Define.
124         (filter): Define.
125         (union): Define.
126         (intersection): Simplify.
127         * sid.scm : Set APPLICATION to SID-SIMULATOR.
128         (-op-gen-delayed-set-maybe-trace): Define.
129         (<operand> 'gen-set-{quiet,trace}): Delegate to
130         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
131         up and needs cleaning.
132         (-with-parallel?): Hardwire with-parallel to #t.
133         (<operand> 'cxmake-get): Replace with lookahead-aware code
134         * sid-decode.scm: Remove per-insn writeback fns.
135         (-gen-idesc-decls): Redefine sem_fn type.
136         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
137         with write stack stuff.
138         (cgen-write.cxx): Replace per-insn writebacks with single write
139         stack writeback. Add write stack reset function.
140         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
141         stack stuff.
142         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
143         estate attribute set.
144         (delay): Set #:delayed attribute to calculated delay, update
145         maximum delay of cpu, check (delay ...) usage.
146         * operand.scm (<operand>): Add delayed slot to <operand>.
147         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
148         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
149         * doc/rtl.texi (Expressions): Add section on (delay ...).
150
151 2005-06-13  Jim Blandy  <jimb@redhat.com>
152
153         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
154         as well as strings.
155
156 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
157
158         * doc/porting.texi: Change all mention of md_apply_fix3 and
159         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
160         respectively.
161
162 2005-05-18  Dave Brolley  <brolley@redhat.com>
163
164         * utils-sim.scm (-gen-decode-default-entry): New function.
165         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
166         code to check that all opcodes bits match.
167         (-gen-decoder-switch): Use -gen-decode-default-entry.
168
169 2005-05-16  Jim Blandy  <jimb@redhat.com>
170
171         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
172         fetched by one of our GETIMEM* methods.
173         * utils-gen.scm (-extract-chunk-specs): Always fetch full
174         base-insn-sized chunks.
175
176 2005-05-10  Nick Clifton  <nickc@redhat.com>
177
178         * Update the address and phone number of the FSF organization in
179         the GPL notices in the following files:
180         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
181         cpu/powerpc.cpu, slib/random.scm
182
183 2005-05-06  Jim Blandy  <jimb@redhat.com>
184
185         * pprint.scm, cos-pprint.scm: Add documentation.
186
187         * pprint.scm (pprint): Don't wipe out elide-table after each call.
188
189         * pprint.scm, cos-pprint.scm: New files.
190
191 2005-04-04  Nick Clifton  <nickc@redhat.com>
192
193         * opcodes.scm (-gen-parse-address): Initialise value to zero to
194         avoid a compile time warning.
195
196 2005-03-18  Nick Clifton  <nickc@redhat.com>
197
198         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
199         "percent-operand" from "%operand" as the latter confuses xgettext
200         into thinking that it is a C printf formating directive, which
201         prevents proper translation.
202
203 2005-02-23  Nick Clifton  <nickc@redhat.com>
204
205         * opcodes.scm (gen-parse-number): Add a cast to the desired
206         pointer signed'ness in order to prevent compile time warnings.
207         * cpu/ip2k.opc: Fixed compile time warnings about differing
208         signed'ness of pointers passed to functions.
209         * cpu/iq2000.opc: Likewise.
210         * cpu/m32r.opc: Likewise.
211         * cpu/openrisc.opc: Likewise.
212         * cpu/xstormy16.opc: Likewise.
213
214 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
215
216         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
217         (cgen-desc.h): ..to here, after opcode/cgen.h include.
218
219 2005-02-16  Dave Brolley  <brolley@redhat.com>
220
221         * utils.scm: Update copyright years.
222         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
223         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
224         * operand.scm (-derived-operand-parse): Move logit message from level 1
225         to level 2.
226
227 2005-02-15  Nick Clifton  <nickc@redhat.com>
228
229         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
230         prevent compile time warning messages.
231         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
232         * utils-gen.scm (attr-int-gen-defn): Likewise.
233         (attr-gen-defn): Likewise.
234         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
235         (print_dollarhex16): Remove unused function.
236
237 2005-02-15  Jim Blandy  <jimb@redhat.com>
238
239         * guile.scm (cgen-call-with-debugging): Doc fix.
240
241         Make backtraces work more reliably.
242         * guile.scm: Set up debugging parameters, and enable debugging and
243         source positions while loading.
244         (cgen-call-with-debugging, cgen-debugging-stack-start): New
245         functions.
246         * read.scm: Don't set debugging parameters here.
247         (catch-with-backtrace): Function deleted.
248         (-cgen): Simply note the presence or absence of the -b option.
249         Pass the flag to cgen-call-with-debugging, so debugging is turned
250         off here if the user didn't request it, for faster computation.
251         (cgen): Call cgen-debugging-stack-start here, instead of
252         catch-with-backtrace.
253
254         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
255         trailing -s.
256         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
257         Don't write out the trailing -s here.
258         * Makefile.in: Regenerated.
259         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
260         fixup.scm here; let the caller decide which Scheme's customization
261         file to preload.
262         * dev.scm: Load guile.scm, not fixup.scm.
263         * fixup.scm: Deleted; contents have all moved to guile.scm.
264         * README: Doc fix.
265
266         * guile.scm (debug-write): New function.
267
268 2005-02-14  Jim Blandy  <jimb@redhat.com>
269
270         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
271         transformer procedure, not eval.  Transformer procedures take one
272         argument.
273
274 2005-02-11  Nick Clifton  <nickc@redhat.com>
275
276         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
277         to 'bfd_vma *' in order avoid compile time warning message.
278
279 2005-02-09  Jim Blandy  <jimb@redhat.com>
280
281         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
282         corresponding change in the sim/common directory.)
283
284 2005-02-07  Jim Blandy  <jimb@redhat.com>
285
286         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
287         changes in the opcodes directory.)
288
289         * guile.scm: New file, containing Guile-specific definitions and
290         adaptations.  This is loaded by the app-specific shell scripts.
291         Initially identical to fixup.scm.
292         * cgen-sid.scm: Don't load fixup.scm here.
293
294         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
295         latter is a macro.
296
297 2005-01-27  Jim Blandy  <jimb@redhat.com>
298
299         * utils.scm (string/symbol->append): Renamed from 'concat'.
300         * opcodes.scm (gen-switch): Use new name.
301         * insn.scm (-sub-insn-make!): Same.
302         * rtl.scm (rtx-dump): Same.
303         * semantics.scm (semantic-compile): Same.
304
305 2005-01-20  Jim Blandy  <jimb@redhat.com>
306
307         * opcodes.scm (gen-switch): Use concat instead of string-map.
308
309         * utils.scm (concat): New function.
310         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
311         * rtl.scm (rtx-dump): Same.
312         * semantics.scm (semantic-compile): Same.
313
314 2004-12-16  Jim Blandy  <jimb@redhat.com>
315
316         * utils-cgen.scm (parse-name): Don't assume that string-map can be
317         applied to symbols.  Process everything as strings, and then
318         convert to a symbol at the end.
319
320         * read.scm (debug-repl): Temporarily redirect input and output to
321         /dev/tty while we debug, so we don't interfere with whatever CGEN
322         is reading or writing.
323         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
324         New functions.
325
326 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
327
328         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
329         will work with newer versions of guile.
330
331 2004-10-27  Nick Clifton  <nickc@redhat.com>
332
333         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
334         * cpu/iq2000.cpu: Likewise.
335
336 2004-07-21  DJ Delorie  <dj@redhat.com>
337
338         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
339
340 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
341
342         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
343         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
344
345 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
346
347         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
348
349 2004-03-22  Dave Brolley  <brolley@redhat.com>
350
351         * utils.scm (copyright-fsf): Update copyright years.
352         (copyright-red-hat): Ditto.
353         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
354         code.
355         (-op-gen-set-trace-parallel): Ditto.
356
357 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
358
359         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
360         disassembling codes for 0x*2 addresses.
361
362 2004-01-29  Dave Brolley  <brolley@redhat.com>
363
364         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
365         zeroes in the extra bit positions and generate 'opcode-mask' with ones
366         in the extra bit positions.
367
368 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
369
370         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
371
372 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
373
374         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
375         "short" being 16 bit.
376         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
377         internationalize error message.
378         (parse_lo16): Likewise.  Remove useless code.
379
380 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
381
382         * cpu/m32r.cpu : Add new model m32r2.
383         Add new instructions.
384         Replace occurrances of 'Mitsubishi' with 'Renesas'.
385         Changed PIPE attr of push from O to OS.
386         Care for Little-endian of M32R.
387         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
388         Care for Little-endian of M32R.
389         (parse_slo16): signed extension for value.
390
391 2003-10-26  Dave Brolley  <brolley@redhat.com>
392
393         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
394         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
395         (-gen-extract-fn): Call -gen-record-profile-args.
396
397 2003-10-21  Dave Brolley  <brolley@redhat.com>
398
399         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
400         a static const int.
401         * decode.scm (-opcode-slots): Correct typo in logit call.
402
403 2003-10-09  Jim Blandy  <jimb@redhat.com>
404
405         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
406         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
407
408         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
409
410 2003-10-06  Dave Brolley  <brolley@redhat.com>
411
412         * gen-all-doc: Add fr550.
413
414 2003-09-11  Doug Evans  <dje@sebabeach.org>
415
416         * Makefile.am (ARCHFILE): New var.
417         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
418         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
419         * Makefile.in: Regenerate.
420
421 2003-09-08  Dave Brolley  <brolley@redhat.com>
422
423         On behalf of Doug Evans <dje@sebabeach.org>
424         Pass in paths to input files, instead of assuming they live in
425         $srcdir/cpu.  Plus misc. option processing cleanup.
426         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
427         Add pre-process pass to all options.
428         * cgen-gas.scm (gas-arguments): Ditto.
429         * cgen-sid.scm (sim-arguments): Ditto.
430         * cgen-sim.scm (sim-arguments): Ditto.
431         * cgen-stest.scm (stest-arguments): Ditto.
432         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
433         (-opc-file-path): New global.
434         (opc-file-path): New fn.
435         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
436         All callers updated.
437         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
438         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
439         Replace srcdir arg with opc-file.  All callers updated.
440         * read.scm (-opt-spec-update): Delete.
441         (opt-get-first-pass,opt-get-second-pass): New fns.
442         (-cgen): Process application-specific arguments in two passes.
443
444 2003-08-29  Dave Brolley  <brolley@redhat.com>
445
446         * cpu/frv.cpu: Removed.
447         * cpu/frv.opc: Removed.
448
449 2003-08-21  Nick Clifton  <nickc@redhat.com>
450
451         * cpu/frv.cpu (mbtoh): Replace input parameter to
452         u-media-dual-expand and u-media-dual-btoh with output parameter.
453         (cmbtoh): Add profiling hack.
454
455 2003-08-19  Michael Snyder  <msnyder@redhat.com>
456
457         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
458
459 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
460
461         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
462         the elements for the END record of CGEN_OPINST, silencing warnings.
463
464 2003-07-15  Doug Evans  <dje@sebabeach.org>
465
466         Add guile 1.6.4 support.
467         - empty list must be quoted
468         - string functions have stricter type checking
469         - eval now takes a second argument
470         - symbol-bound? is deprecated
471         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
472         (bitset-attr->list): Ensure arg to string-cut is a string.
473         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
474         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
475         * cos.scm (-class-list): Must quote empty list.
476         (-class-parent-classes,-class-compute-class-desc): Ditto.
477         (class-make,make,object-reset!): Ditto.
478         (method-make-make!): Call eval1 instead of eval.
479         (method-make-forward!,method-make-virtual-forward!): Ditto.
480         * decode.scm (subdtable-add): Use stringsym-append instead of
481         string-append.
482         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
483         (-build-decode-table-entry): Fetch string name of insn.
484         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
485         (-gen-mach-table-defns): Ditto for mach.
486         (gen-ifld-defns): Ditto for ifld.
487         (gen-hw-table-defns): Ditto for hw.
488         (gen-operand-table): Ditto for op.
489         (gen-insn-table-entry): Ditto for insn.
490         * desc.scm (gen-attr-table-defn): Ditto for attr.
491         (<keyword>,gen-defn): Don't pass symbols to string-append.
492         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
493         symbol-append.
494         (enum-vals-upcase): Use symbol-upcase to build result.
495         (-enum-parse): Use stringsym-append to build errtxt.
496         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
497         (eval1): New function.
498         (symbol-bound?): Provide own version if >= guile 1.6.
499         * hardware.scm (define-keyword): Use string-append instead of
500         symbol-append.
501         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
502         cgen.html,cgen-insn.html): Convert current-arch-name to a string
503         before using.
504         (gen-list-entry): Handle either symbol or string `name' arg.
505         (gen-obj-doc-header): Fetch string name of `o' arg.
506         (define-cpu-intro): Ditto for cpu.
507         (gen-mach-intro): Ditto for mach.
508         (gen-model-intro): Ditto for model.
509         (gen-isa-intro): Ditto for isa.
510         (gen-machine-doc-1): Ditto for isa.
511         (gen-reg-doc-1): Convert mach to string first.
512         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
513         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
514         to string first.
515         (gen-insn-categories): Fetch string name of mach.  Convert
516         enum-val-name to string first.
517         (gen-insn-docs): Fetch string name of mach.
518         * ifield.scm (ifld-ilk): Result is a string.
519         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
520         Fetch string name of ifld.
521         (-sfmt-search-key): Similarily for ifld and op.
522         * insn.scm (syntax-make): Fetch string name of syntax element.
523         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
524         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
525         * mode.scm (mode:c-type): Result is a string.
526         (mode:enum): Fetch string name of mode.
527         (-mode-parse): Use stringsym-append to build errtxt.
528         * model.scm (model:enum): Fetch string name of model.
529         (-model-parse): Use stringsym-append to build errtxt.
530         (parse-insn-timing): Must quote empty list.
531         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
532         (-gen-minsn-opcode-entry): Ditto.
533         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
534         convert to string.
535         (read-cpu.opc): Convert current-arch-name to a string before using.
536         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
537         (<derived-operand>): Must quote empty list.
538         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
539         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
540         of ifld.
541         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
542         (-pmacro-sym): Must convert symbols to strings before passing to
543         string-append.
544         (-pmacro-str): Ditto.
545         (pmacros-init!): Use eval1 instead of eval.
546         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
547         (keep-isa-atlist?): Ditto.
548         (cmd-if): Use eval1 instead of eval.
549         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
550         (-rtl-c-get): Fetch string name of src.
551         (s-unop): Ditto for mode.
552         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
553         (-gen-par-temp-defns,subword): Ditto.
554         (join): Use stringsym-append instead of string-append.
555         * rtl-traverse.scm (rtx-option?): Convert option to string first.
556         (rtx-traverse-debug): Fetch string name of rtx-obj.
557         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
558         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
559         (rtx-pretty-name): Result is a string.
560         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
561         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
562         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
563         before using.
564         (-gen-sfrag-case): Fetch string name of user.
565         * sid-model.scm (unit:enum): Fetch string name of unit.
566         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
567         (<hw-memory>,gen-set-quiet): Ditto.
568         (gen-mode-defs): Ditto.
569         (sim-finish!): Convert current-arch-name to a string before using.
570         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
571         (-gen-no-scache-semantic-fn): Ditto.
572         (cgen-defs.h): Fetch string name of isa.
573         (cgen-read.c): Convert current-arch-name to a string before using.
574         (cgen-write.c): Ditto.
575         * sim-model.scm (unit:enum): Fetch string name of unit.
576         (gen-model-fn-decls): Use stringsym-append instead of string-append.
577         (-gen-model-timing-table): Fetch string name of model.
578         (-gen-mach-model-table): Ditto.
579         (-gen-mach-defns): Fetch string name of mach.
580         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
581         (<hw-memory>,cxmake-get): Fetch string name of mode.
582         (<hw-memory>,gen-set-quiet): Ditto.
583         (gen-mode-defs): Ditto.
584         (sim-finish!): Must quote empty list.
585         * utils-cgen.scm (<ident>): Must quote empty list.
586         (obj:str-name): New fn.
587         (parse-comment): Result is a string.
588         (parse-symbol): Result is a symbol.
589         (parse-string): Result is a string.
590         (keyword-list?): Convert arg to string before calling string-ref.
591         (keyword-list->arg-list): Ditto.
592         (gen-attr-name): Convert attr-name to string first.
593         (alpha-sort-obj-list): Use symbol<? instead of string<?.
594         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
595         (gen-define-ifmt-ifields): Ditto for fld.
596         * utils.scm (gen-c-symbol): Ensure str is a string before calling
597         map-over-string.
598         (gen-file-name): Ditto.
599         (symbol-downcase,symbol-upcase,symbol<?): New fns.
600         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
601         (reduce): Call eval1 instead of eval.
602         * cpu/m32r.cpu (addi): Don't use `#.'.
603
604         * gen-all-sim: Fix some typos.
605
606 2003-07-08  Doug Evans  <dje@sebabeach.org>
607
608         * gen-all-doc: Ensure run from cgen src dir.
609         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
610         * gen-all-sid: Similarily, in ./tmp-sid.
611         * gen-all-sim: Similarily, in ./tmp-sim.
612
613 2003-06-20  Doug Evans  <dje@sebabeach.org>
614
615         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
616
617 2003-06-19  Doug Evans  <dje@sebabeach.org>
618
619         * mach.scm (-ifld-already-defined?): New proc.
620         (current-ifld-add!): Use it.
621         (-op-already-defined?): New proc.
622         (current-op-add!): Use it.
623         (-insn-already-defined?): New proc.
624         (current-insn-add!): Use it.
625         (-minsn-already-defined?): New proc.
626         (current-minsn-add!): Use it.
627         (obj-isa-list): New proc.
628         (isa-supports?): Use it.
629
630 2003-06-10  Doug Evans  <dje@sebabeach.org>
631
632         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
633         * cpu/m32r.cpu (all insns): Ditto.
634
635         * mach.scm (current-*-add!): Disallow redefinition.  Make result
636         "unspecified".
637
638         * gen-all-doc: Split arm and frv docs up a bit.
639
640         * cpu/arm.cpu: Add IDOC attribute.
641         * cpu/frv.cpu: Ditto.
642         * cpu/i960.cpu: Ditto.
643         * cpu/openrisc.cpu: Ditto.
644         * cpu/xstormy16.cpu: Ditto.
645         * cpu/m32r.cpu: Ditto.
646         (all insns): Explicitly specify IDOC attribute.
647
648         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
649         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
650         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
651         * Makefile.in: Regenerate.
652         * attr.scm (<integer-attribute>:parse-value-def): Implement.
653         (-attr-read): Defer computing default value until we know the type.
654         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
655         (<attr-list>:attr-present?): New method.
656         (atlist-attr-present?,obj-attr-present?): New fns.
657         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
658         (attr-builtin!): New insn attr IDOC.
659         * cgen-doc.scm (doc-arguments): New args -I,-N.
660         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
661         Support comment as fourth element of enum value.
662         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
663         * html.scm (gen-html-header): New arg kind, all callers updated.
664         (gen-table-of-contents): New arg insn-file, all callers updated.
665         (gen-list-entry,gen-doc-header): New fn.
666         (get-operands): Delete.
667         (gen-iformat-table): Rewrite.
668         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
669         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
670         (get-insn-properties,guess-insn-idoc-attr!): New fn.
671         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
672         (get-insns-for-category,gen-categories-insn-lists): New fns.
673         (gen-insn-docs): Simplify each insn's semantics first.
674         Print insn tables sorted by IDOC categories.
675         (*insn-html-file-name*): New global.
676         (cgen-insn.html): New fn.
677         (cgen-all): Update.
678         * insn.scm (<insn>): Create a setter for the `tmp' member.
679         * semantics.scm (insn-build-known-values): Renamed from
680         -build-known-values.  All callers updated.
681
682         * rtl.scm: Move traveral/evaluation support to ...
683         * rtl-traverse.scm: New file.
684         * read.scm: Maybe-load rtl-traverse.scm.
685
686         * rtl.scm (-rtx-valid-types): Add SETRTX.
687
688         * rtx-funcs.scm (nop,parallel): Fix mode.
689
690         * utils.scm (eqv-lookup-index): New fn.
691         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
692
693         * dev.scm (load-doc): Set APPLICATION.
694
695 2003-06-10  Dave Brolley  <brolley@redhat.com>
696
697         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
698         * sid-decode.scm: Generate #include of config.h into
699         @prefix@-decode.cxx.
700         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
701
702 2003-06-07  Doug Evans  <dje@sebabeach.org>
703
704         * gen-all-sid: New file.
705         * gen-all-opcodes: New file.
706
707 2003-06-05  Nick Clifton  <nickc@redhat.com>
708
709         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
710         version of the FRinti operand.
711         (FRintjeven): Likewise for FRintj.
712         (FRintkeven): Likewise for FRintk.
713         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
714         media-quad-arith-sat-semantics, media-quad-arith-sat,
715         conditional-media-quad-arith-sat, mdunpackh,
716         media-quad-multiply-semantics, media-quad-multiply,
717         conditional-media-quad-multiply, media-quad-complex-i,
718         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
719         conditional-media-quad-multiply-acc, munpackh,
720         media-quad-multiply-cross-acc-semantics, mdpackh,
721         media-quad-multiply-cross-acc, mbtoh-semantics,
722         media-quad-cross-multiply-cross-acc-semantics,
723         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
724         media-quad-cross-multiply-acc-semantics, cmbtoh,
725         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
726         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
727         cmhtob): Use new operands.
728         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
729         (parse_even_register): New function.
730
731 2003-06-04  Doug Evans  <dje@sebabeach.org>
732
733         Better handling of 64 bit and mixed 32/64 bit architectures.
734         * hardware.scm (hw-update-word-modes!): New fn.
735         * mach.scm (define-cpu)): Call mode-set-word-modes!,
736         hw-update-word-modes!.
737         (state-word-bitsize): Replace FIXME with requested check.
738         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
739         * mode.scm (mode-find): Ignore INT,UINT.
740         (-mode-word-sizes-kind): New global.
741         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
742         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
743         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
744         of mode-list to ...
745         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
746         unusable, correct values set later.
747         (mode-finish!): Remove cruft.
748         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
749         * opcodes.scm (opcodes-init!): Ditto.
750         * rtx-funcs.scm (annul): Fix mode of pc.
751         * cpu/ia64.cpu: Remove cruft that sets word modes.
752         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
753
754 2003-06-03  Nick Clifton  <nickc@redhat.com>
755
756         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
757         immediate value not unsigned.
758
759 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
760
761         * cpu/sh.cpu: Amend comments to refer to SuperH.
762         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
763         * cpu/sh64-media.cpu: Likewise.
764         (Saturation): Update manual reference.
765
766 2003-05-15  Doug Evans  <dje@sebabeach.org>
767
768         * Makefile.am (srcroot): New var.
769         (html): New rule.
770         * Makefile.in: Regenerate.
771         * cgen-doc.scm: New file.
772         * html.scm: New file.
773         * gen-all-doc: New file.
774         * dev.scm (cload): Handle DOC application.
775         (load-doc): New fn.
776         * machs.scm (machs-for-cpu): New fn.
777         * model.scm (models-for-cpu): New fn.
778         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
779         All uses updated.
780         (iota): Rewrite to be identical to pmacro version.  All uses updated.
781         * utils-cgen.scm (alpha-sort-obj-list): New fn.
782
783         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
784         (-gen-decode-bits): Instead put in better fix here.
785
786         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
787
788 2003-05-01  DJ Delorie  <dj@redhat.com>
789
790         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
791         word accesses.
792         (set-alignfix-mem): Likewise.
793
794 2003-04-16  Dave Brolley  <brolley@redhat.com>
795
796         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
797         * utils.scm (copyright-fsf): Update generate copyright years.
798         (copyright-cygnus): Ditto.
799         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
800         operands.
801         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
802         here.
803         (<operand>'gen-profile-code): New parameter 'when'.
804         (<iunit>'gen-profile-code): Ditto.
805         (<insn>'gen-profile-code): Ditto.
806         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
807         'insn_reference' for the 'after' function.
808         * model.scm (unit:enum): Moved to sim-model.scm.
809         * sim-model.scm (unit:enum): Moved from model.scm.
810         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
811         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
812         * sid-model.scm (unit:enum): New version for sid.
813         (gen-model-class-name): New function.
814         (gen-model-unit-fn-decl): New function.
815         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
816         (gen-model-unit-fn-name): New parameter 'when'.
817         (-gen-model-insn-fn-name): Ditto.
818         (-gen-model-insn-qualified-fn-name): New function.
819         (-gen-model-insn-fn-decl): New function.
820         (-gen-model-insn-fn-decls): New function.
821         (-gen-model-insn-fn): New parameter 'when'. Call
822         -gen-model-insn-qualified-fn-name.
823         (-gen-model-insn-fns): Generate the constructor for the model. Generate
824         functions for modelling insn before and after execution.
825         (-gen-model-class-decls): New function.
826         (" (gen-model-class-name model) "): New function.
827         (gen-model-classes): New function.
828         (-gen-insn-timing): Generate functions for modelling insn before and after
829         execution.
830         (-gen-insn-unit-timing): Generate class-qualified names.
831         (-gen-model-timing-table): Ditto.
832         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
833         not needed (yet) by sid.
834         (cgen-model.h): New function.
835
836 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
837
838         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
839         * cpu/sh64-compact.cpu: Likewise.
840         * cpu/sh64-media.cpu: Likewise.
841
842 2003-03-21  DJ Delorie  <dj@redhat.com>
843
844         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
845         which indicates if the sign flag is set from bit 15 or 7.
846         Adjust all callers.
847         (set-psw): New argument ws, propogate it.
848         (set-psw-nowrite): Likewise.
849         (set-mem-psw): Likewise.
850         (set-psw-carry): Likewise.  Use temporaries to prevent
851         prematurely overwriting needed inputs.
852         (set-psw-rrotate17): Fix logic.
853         (shrgrgr): Preserve carry for zero-bit shifts.
854         (shrgrimm): Likewise.
855         (shlgrgr): Likewise.
856         (shlgrimm): Likewise.
857         (asrgrgr): Likewise.
858         (asrgrimm): Likewise.
859         (reset): New.
860
861 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
862
863         * sid.scm: Set APPLICATION to SID-SIMULATOR.
864
865 2002-03-05  DJ Delorie  <dj@redhat.com>
866
867         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
868         prematurely overwriting needed inputs.
869         (set-psw-sub): Likewise.
870
871 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
872
873         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
874
875 2003-02-18  DJ Delorie  <dj@redhat.com>
876
877         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
878         (movlmemimm): Just mask the address.
879         (movhmemimm): Likewise.
880         (movlmemgr): Likewise.
881         (movhmemgr): Likewise.
882         (set-psw): Always set the psw last.
883         (set-psw-carry): Likewise.
884         (set-psw-add): Likewise.
885         (set-psw-sub): Likewise.
886
887         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
888         of 16 patterns from the set-psw-rotate17 function.
889         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
890         movgriipostincgr, movgriipredecgr): Set psw correctly.
891         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
892         movfgriipostincgr, movfgriipredecgr): Fix semantics.
893         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
894
895 2003-02-11  Dave Brolley  <brolley@redhat.com>
896
897         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
898         @arch@_cgen-ifld_table.
899         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
900         @arch@_cgen-ifld_table.
901
902 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
903
904         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
905
906 2003-01-09  Graydon Hoare  <graydon@redhat.com>
907
908         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
909         empty ISAs.
910
911 2003-01-07  Graydon Hoare  <graydon@redhat.com>
912
913         * utils-gen.scm (attr-int-gen-defn): Define.
914
915 2002-12-21  Doug Evans  <dje@sebabeach.org>
916
917         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
918         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
919
920         * dev.scm (cload): Update location of .cpu files.
921
922 2002-12-19  Doug Evans  <dje@sebabeach.org>
923
924         * utils-sim.scm (gen-profile-sym): New fn.
925         (<operand>,sbuf-profile-sym): New method.
926         (<operand>,sbuf-profile-elm): Use it.
927         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
928         of hardcoding symbol name.
929         (<operand>,gen-profile-code): Ditto.
930         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
931         symbol name.
932
933         * mode.scm (mode-sem-mode): New fn.
934         * operand.scm (op:new-mode): Update. mode-name.
935         (op-natural-mode?) New fn.
936         * rtl.scm (hw): Set hw-name,mode-name.
937
938         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
939         Instead do:
940         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
941         as size of IDESC-TABLE-VAR.
942         (@prefix@_init_idesc_table): Ditto.
943         * sim-model.scm (-gen-mach-defns): Ditto.
944         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
945
946         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
947
948         * insn.scm (-parse-insn-format-symbol): Improve error message.
949         (-parse-insn-format): Ditto.
950
951         * gen-all-sim: New script.
952
953 2002-12-16  DJ Delorie  <dj@delorie.com>
954
955         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
956
957 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
958
959         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
960         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
961         (parse_immediate16): Handle immediate16 values, which now include
962         @hi(label) and @lo(label)
963
964 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
965
966         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
967         Add braces and cast for union field.
968         (gen-multi-ifield-nodes): Add braces and cast for union field.
969         (cgen_operand_table): Similarly fix sentinel.
970         (cgen_cpu_close): Constify "insns".  Formatting.
971         (cgen-desc.c): Include xregex.h.
972         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
973         Prototype.
974         <opc.c>: Include safe-ctype.h.
975         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
976         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
977         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
978         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
979         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
980         (parse_addr16): Correct type of "value".  Formatting.
981         (parse_addr16_p): Likewise.
982         (parse_addr16_cjp): Likewise.
983         (parse_lit8): Likewise.
984         (parse_bit3): Formatting.
985         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
986         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
987         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
988         print_decimal.
989         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
990         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
991         (print_dollarhex8): Likewise.
992         (print_dollarhex16): Likewise.
993         (print_dollarhex_addr16h): Likewise.
994         (print_dollarhex_addr16l): Likewise.
995         (print_dollarhex_p): Likewise.
996         (print_dollarhex_cj): Likewise.
997         (print_decimal): Likewise.
998         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
999
1000 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
1001
1002         * doc/rtl.texi (Model variants): Mention current limitations for
1003         unit inputs and outputs.
1004         (Hardware elements) <attribute PROFILE>: Be slightly more
1005         verbose.
1006         (Instructions) <timing>: input/output overrides have a direction
1007         operand.
1008
1009 2002-11-25  DJ Delorie  <dj@redhat.com>
1010
1011         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
1012
1013 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
1014
1015         * cpu/iq10.cpu: New file.
1016         * cpu/iq2000.cpu: Likewise.
1017         * cpu/iq2000.opc: Likewise.
1018         * cpu/iq2000m.cpu: Likewise.
1019
1020 2002-11-19  DJ Delorie  <dj@redhat.com>
1021
1022         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
1023
1024 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
1025
1026         * dev.scm: Call getenv with a string, not a symbol.
1027
1028 2002-10-08  Doug Evans  <dje@transmeta.com>
1029             Hans-Peter Nilsson  <hp@axis.com>
1030
1031         * types.scm (bitrange-overlap?): Handle lsb0?.
1032
1033 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
1034
1035         From Robert Cragie <rcc@jennic.com>:
1036         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
1037
1038 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
1039             Ben Elliston  <bje@redhat.com>
1040             John Healy  <jhealy@redhat.com>
1041             Jeff Johnston  <jjohnstn@redhat.com>
1042             Alan Lehotsky  <alehotsky@redhat.com>
1043             Ubicom Inc. <SupportDesk@ubicom.com>
1044
1045         * cpu/ip2k.cpu: New file.
1046         * cpu/ip2k.opc: Likewise.
1047
1048 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
1049
1050         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
1051
1052 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
1053
1054         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
1055         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
1056         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
1057         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
1058         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
1059         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
1060         (-sthi-byte): If there is a single byte to store, store it at
1061         proper address.
1062         (sthil, sthiq): Fix big-endian behaviour.
1063         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
1064         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
1065         (saturate): Use Dimode to check if saturation operation is required.
1066         (usaturate): Likewise.
1067         (mpermw): Fix mask.
1068         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
1069         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
1070         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
1071         (msadubq): Fix subword index in second operand of first subtraction.
1072
1073 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
1074
1075         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
1076         code.
1077
1078 2002-06-18  Dave Brolley  <brolley@redhat.com>
1079
1080         * cpu/frv.cpu: New cpu description.
1081         * cpu/frv.opc: New cpu support code.
1082
1083 2002-05-21  Dave Brolley  <brolley@redhat.com>
1084
1085         * decode.scm (-opcode-slots): Don't consider bits beyond the
1086         length of the insn.
1087
1088 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
1089
1090         * cpu/powerpc.cpu: New file.
1091
1092 2002-05-01  Graydon Hoare  <graydon@redhat.com>
1093
1094         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
1095
1096 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
1097
1098         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
1099         results are expanded recursively.
1100
1101 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
1102
1103         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
1104         call scan-symbol on it, to enable recursive macro-expansion.
1105
1106 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
1107
1108         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
1109         for multiple-isa configurations.
1110         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
1111
1112 2002-02-04  Ben Elliston  <bje@redhat.com>
1113
1114         * cpu/sh.cpu, cpu/sh.opc: New files.
1115         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
1116
1117 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
1118
1119         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
1120         (Enumerated constants): Mention that an ifield must not specify a
1121         multi-ifield.
1122         (Instruction operands): Ditto for index.
1123         (Expressions) <parallel>: Remove misplaced mention of local
1124         variables.
1125         <if>: Mention that mode must be specified and non-VOID when the
1126         result is used.
1127
1128 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
1129
1130         * doc/porting.texi: When referring to *.opc, mention they are in
1131         the cpu subdir.  Call top-level directory toplevel, not devo.
1132         Close string in define-normal-insn example.
1133
1134         * doc/pmacros.texi: Fix .substr typo to .substring.
1135         Mention that .sym expansions are not further expanded.
1136
1137 2002-01-22  Graydon Hoare  <graydon@redhat.com>
1138
1139         * desc-cpu.scm (ifld-number-cache): Add.
1140         (ifld-number): Add.
1141         (gen-maybe-multi-ifld-of-op): Add.
1142         (gen-maybe-multi-ifld): Add.
1143         (gen-multi-ifield-nodes): Add.
1144         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
1145
1146 2002-01-10  matthew green  <mrg@redhat.com>
1147
1148         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
1149         (gr-Rb-names): ... to this.
1150         (h-Rb): New hardware piece.
1151         (h-Rbj): Use gr-Rb-names.
1152         (Rb): Use h-Rb.
1153         (holdx): New instruction.
1154
1155 2002-01-07  Ben Elliston  <bje@redhat.com>
1156
1157         * utils.scm (package-cygnus-simulators): Rename from this ..
1158         (package-red-hat-simulators): .. to this.
1159         * opcodes.scm (option-set!): Use package-red-hat-simulators.
1160         * sid-cpu.scm (cgen-desc.h): Likewise.
1161         (cgen-cpu.h): Likewise.
1162         (cgen-defs.h): Likewise.
1163         (cgen-write.cxx): Likewise.
1164         (cgen-semantics.cxx): Likewise.
1165         (cgen-sem-switch.cxx): Likewise.
1166         * sid-decode.scm (cgen-decode.h): Likewise.
1167         (cgen-decode.cxx): Likewise.
1168         * sid-model.scm (cgen-model.cxx): Likewise.
1169         * sid.scm (option-set!): Likewise.
1170         * sim.scm (option-set!): Likewise.
1171
1172 2002-01-07  Ben Elliston  <bje@redhat.com>
1173
1174         * utils.scm (copyright-fsf): Add 2002.
1175         (copyright-cygnus): Rename to copyright-red-hat.
1176         (copyright-red-hat): Add 2002.
1177         (CURRENT-COPYRIGHT): Update comment.
1178         * opcodes.scm (option-set!): Update callers.
1179         * sid-model.scm (cgen-model.cxx): Likewise.
1180         * sid-cpu.scm: Likewise.
1181         * sid-decode.scm: Likewise.
1182         * sid.scm (option-set!): Handle "redhat" as an option for
1183         "copyright"; use copyright-red-hat.
1184         * sim.scm (option-set!): Likewise.
1185
1186 2002-01-03  Dave Brolley  <brolley@redhat.com>
1187
1188         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
1189         number of insns in the list.  Update the population count function to
1190         identify and prioritize 3 catgories of useful bits.
1191         (-population-top-few): Don't consider bits with a population count of
1192         zero.
1193         (-build-decode-table-entry): Don't call
1194         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
1195         identical insns at the next tree level.
1196         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
1197         this function is no longer used.
1198         (filter-non-specialized-ambiguous-insns): New function.
1199         (filter-identical-ambiguous-insns): New function.
1200         (find-identical-insn): New function.
1201         (filter-harmlessly-ambiguous-insns): Removed.
1202
1203 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
1204             matthew green  <mrg@redhat.com>
1205             Frank Ch. Eigler  <fche@redhat.com>
1206             Nick Clifton  <nickc@cambridge.redhat.com>
1207
1208         * cpu/xstormy16.cpu: New file.
1209         * cpu/xstormy16.opc: New file.
1210
1211 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
1212
1213         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
1214
1215 2001-11-14  Dave Brolley  <brolley@redhat.com>
1216
1217         * utils-gen.scm (-gen-extract-word): Correct computation of the length
1218         of the field being extracted.
1219
1220 2001-10-29  Johan Rydberg  <johan@rydberg.com>
1221
1222         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
1223         (cos ...) and (sin ..) rtx.
1224
1225 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
1226
1227         * desc-cpu.scm: Do not include ctype.h in generated desc
1228         files.  They will inherit safe-ctype.h instead.
1229
1230 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
1231
1232         * desc-cpu.scm: Add missing function prototypes (for generated
1233         C files).  Fix compile time warning messages about unused
1234         parameters (for generated C files).
1235         * opc-asmdis.scm: The same.
1236         * opc-ibld.c: The same.
1237         * opc-itab.scm: The same.
1238         * cpu/fr30.opc: The same.
1239         * cpu/m32r.opc: The same.
1240         * cpu/openrisc.opc: The same.
1241
1242 2001-09-17  graydon hoare  <graydon@redhat.com>
1243
1244         * insn.scm (syntax-break-out): Correct logic in handling escaped
1245         syntax characters.
1246
1247 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
1248
1249         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
1250         call @arch@_cgen_build_insn_regex now that regex support is in
1251         libiberty.
1252
1253 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
1254
1255         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
1256         (mask-superset?): Look for strict supersets to allow rejection of
1257         duplicate insns.
1258
1259 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
1260
1261         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
1262         (cgen-desc.h): Call it.
1263         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
1264         decode-size.
1265         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
1266         entire_insn for extraction, if it's shorter than base-insn-bitsize.
1267
1268 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
1269
1270         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
1271         mach->cpu insn-chunk-bitsize.
1272         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
1273         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
1274         * mach.scm (<cpu>): New field insn-chunk-bitsize.
1275         (-cpu-parse, -cpu-read): Parse/initialize it.
1276         * doc/rtl.texi (define-cpu): Document it.
1277
1278 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
1279
1280         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
1281
1282 2001-07-06  Ben Elliston  <bje@redhat.com>
1283
1284         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
1285
1286 2001-07-05  Ben Elliston  <bje@redhat.com>
1287
1288         * README: Update.
1289
1290         * read.scm (include): Include files from srcdir/cpu.
1291         (-cgen): Likewise for loading .cpu files.
1292         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
1293         * *.cpu: Move all cpu descriptions into cpu subdirectory.
1294         * *.opc: Likewise.
1295         * simplify.inc: Likewise.
1296
1297 2001-07-04  Ben Elliston  <bje@redhat.com>
1298
1299         * read.scm (include): Log "Including file" message at level 1,
1300         rather than outputting it with (display).
1301         (cpu-load): Log "Loading cpu description" and "Processing cpu
1302         description" messages at levels 1 and 2, respectively, rather than
1303         using (display).
1304
1305 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
1306
1307         * desc.scm (<keyword> 'gen-defn): Add extra zero into
1308         CGEN_KEYWORD_ENTRY initializers.
1309
1310         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
1311         (<operand> 'test-data): Involve both the index and the hardware
1312         in testcase generation.
1313         (<hw-indx> 'test-data): Generate test data from the underlying
1314         object.
1315         (<ifield> 'test-data): Generate test data by computing bit
1316         patterns for the field, then decoding them.
1317         (<hw-address> 'test-data): Allow for new calling convention.
1318         (<hw-iaddress> 'test-data): Likewise.
1319         (<keyword> 'test-data): Convert index values into keywords.
1320         (<hw-asm> 'test-data): Convert index values into integer strings.
1321
1322         * gas-test.scm (cgen-build.sh): Escape '.' as well.
1323
1324 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
1325
1326         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
1327         is required for multi-mode hw types (memory).
1328
1329 2001-05-11  Ben Elliston  <bje@redhat.com>
1330
1331         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
1332         when generating allinsn.d from objdump output. Without it, the
1333         testsuite will treat $ as the regular expression for end of line.
1334
1335 2001-05-09  Ben Elliston  <bje@redhat.com>
1336
1337         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
1338         with `cgen_cpu_open'; documentation had become out of date.
1339         * doc/rtl.texi (Instruction operands): Likewise.
1340
1341 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
1342
1343         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
1344         various-base-length instruction sets.
1345
1346 2001-04-02  Ben Elliston  <bje@redhat.com>
1347
1348         * sid-cpu.scm (-last-insn): New function.
1349         (-gen-sem-switch-engine): Loop through idesc while less than or
1350         equal to the last instruction enum, not less than the MAX enum.
1351         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
1352         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
1353         table's size to be the last instruction enum plus one, not
1354         @PREFIX@_INSN_MAX.
1355         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
1356         instruction onto the instruction list.
1357
1358         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
1359         using the size of the table and its elements.
1360         (-gen-decode-insn-globals): Define the idesc table's size to be
1361         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
1362         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
1363         last instruction enum plus one, not @CPU@_INSN_MAX.
1364
1365 2001-03-28  Ben Elliston  <bje@redhat.com>
1366
1367         * doc/version.texi (UPDATED, EDITION): Update.
1368         * doc/stamp-vti: Likewise.
1369
1370 2001-03-26  Ben Elliston  <bje@redhat.com>
1371
1372         * doc/credits.texi (Credits): Update.
1373
1374         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
1375         specified prefix and, if necessary, escape `$' in gas-build.sh to
1376         prevent unwanted shell variable expansion.
1377
1378 2001-03-24  Ben Elliston  <bje@redhat.com>
1379
1380         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
1381         (<keyword>,test-data): Likewise.
1382         (<hw-address>,test-data): Likewise.
1383         (<hw-iaddress>,test-data): Likewise.
1384         (-collate-test-set): New function.
1385         (build-test-set): Use it.
1386         (gen-gas-test): Generate five test cases per instruction.
1387         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
1388
1389         * read.scm: Load "slib/random" if random is not defined.
1390         * slib/random.scm: New file.
1391
1392         * utils.scm: Remove comments about the Hobbit compiler.
1393         (copyright-cygnus): Add 2001.
1394         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
1395         (package-gnu-simulators): Tidy.
1396
1397 2001-03-23  Ben Elliston  <bje@redhat.com>
1398
1399         * cgen-gas.scm: Inline documentation improvements.
1400
1401 2001-03-21  Ben Elliston  <bje@redhat.com>
1402
1403         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1404         given in a syntax string is undefined.
1405
1406         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
1407         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
1408
1409 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
1410
1411         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
1412         for arg_type CGEN_CPU_OPEN_BFDMACH.
1413
1414 2001-03-20  Ben Elliston  <bje@redhat.com>
1415
1416         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
1417         instruction onto the instruction list. Define MAX_INSNS to be the
1418         value of the last instruction enum plus one.
1419
1420 2001-03-14  Nick Clifton  <nickc@redhat.com>
1421
1422         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
1423
1424 2001-03-05  Dave Brolley  <brolley@redhat.com>
1425
1426         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
1427         if the number of ifields is greater than zero.
1428
1429 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
1430
1431         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
1432         Emit LIKELY/UNLIKELY branch probability hints.
1433         * sid-decode.cpu (-gen-record-args): Ditto.
1434
1435 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
1436
1437         * desc-cpu.scm (-gen-hash-defines): Rename
1438         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
1439
1440 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
1441
1442         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
1443         writeback tracking.
1444         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
1445         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
1446         if unnecessary.
1447         * sid.scm (<operand> gen-write): Use unsigned long long expression
1448         for writeback.
1449         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
1450         (<unit> gen-profile-code): Ditto.
1451
1452 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
1453
1454         * doc/rtl.texi (Expressions): Document the (index-of ...) and
1455         (regno ...) rtx.
1456
1457 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
1458
1459         * operand.scm (<operand> pretty-sem-name): New field.
1460         (<operand> make): Initialize it from hw-name.
1461         (op:set-pretty-sem-name!): New function.
1462         (<operand> gen-pretty-name): Default to fetching new field.
1463         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
1464         sem-name setting from -rtx-hw-name.
1465
1466 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
1467
1468         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
1469         its subsequent gen-pretty-name.
1470
1471         * read.scm: Increase thread working stack limit and backtrace
1472         depth limits.
1473
1474 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
1475
1476         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
1477
1478 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
1479
1480         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
1481         current insn plus 4.
1482         (h-delay-insn): New hardware register.
1483         (l-jal): Uses h-delay-insn instead of pc when setting link register.
1484         (l-jalr): Likewise.
1485         (l-bal): Likewise.
1486
1487         * openrisc.opc (parse_hi16): Sign extend value.
1488         (parse_lo16): Likewise.
1489
1490 2001-01-06  Ben Elliston  <bje@redhat.com>
1491
1492         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
1493         instead of @cpu@ and @CPU@ to generically prefix symbol names.
1494         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
1495         (-gen-semantic-fn-table): Likewise.
1496         (-gen-scache-semantic-fn): Likewise.
1497         (-gen-no-scache-semantic-fn): Likewise.
1498         (cgen-read.c): Likewise.
1499         (cgen-sem-switch.c): Likewise.
1500         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
1501         is a filename prefix.
1502         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
1503         (-gen-decode-insn-globals): Likewise.
1504         (-gen-idesc-decls): Likewise.
1505         (cgen-decode.h): Likewise.
1506         (cgen-decode.c): Likewise.
1507         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
1508         (gen-cpu-insn-enum): Likewise.
1509         (sim-finish!): Likewise.
1510
1511 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
1512
1513         * openrisc.cpu: New file.
1514         * openrisc.opc: Likewise.
1515
1516 2000-12-12  Ben Elliston  <bje@redhat.com>
1517
1518         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
1519
1520 2000-12-07  Ben Elliston  <bje@redhat.com>
1521
1522         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
1523         "insn" when there are zero ifields to extract.
1524
1525 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
1526
1527         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
1528         used by simple/non-scache simulators.
1529         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
1530         regardless of with-scache?.
1531         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
1532
1533 2000-12-03  Ben Elliston  <bje@redhat.com>
1534
1535         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
1536         (cgen-desc.c): Likewise.
1537
1538 2000-12-01  Greg McGary  <greg@mcgary.org>
1539
1540         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
1541
1542 2000-12-01  Ben Elliston  <bje@redhat.com>
1543
1544         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
1545         definitions if run without with-multipla-isa?.
1546         (cgen-defs.h): New function. Emit an ISA-specific defs file.
1547         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
1548
1549 2000-11-24  Ben Elliston  <bje@redhat.com>
1550
1551         * sim-cpu.scm (-gen-hardware-struct): New function.
1552         (-gen-hardware-types): If with-multiple-isa is specified, emit all
1553         hardware elements wich have share one or more ISAs with the ISAs
1554         being kept.
1555
1556         * sim.scm (-with-multiple-isa?): New symbol.
1557         (with-multiple-isa?): New function.
1558         (option-init!): Initialise -with-multiple-isa?.
1559         (option-set!): Handle with-multiple-isa option.
1560
1561 2000-11-21  Ben Elliston  <bje@redhat.com>
1562
1563         * utils.scm (copyright-fsf): Add the year 2000.
1564
1565 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
1566
1567         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
1568         unneeded "\n\n" from F() macro definition.
1569
1570 2000-11-15  Greg McGary  <greg@mcgary.org>
1571
1572         * utils-cgen.scm (gen-define-with-symcat): New function.
1573         * desc-cpu.scm (gen-ifld-defns): Use it.
1574         (gen-hw-table-defns): Use it.
1575         (-gen-hash-defines): Use it.
1576         (gen-operand-table): Use it.
1577         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
1578         * opc-itab.scm (-gen-ifmt-table): Use it.
1579         (-gen-insn-opcode-table): Use it.
1580         (-gen-macro-insn-table): Use it.
1581         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
1582         * sim-cpu.scm (cgen-semantics.c): Use it.
1583         (cgen-sem-switch.c): Use it.
1584
1585 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
1586
1587         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
1588         request to emit calls to insn extractors as functions rather than
1589         branches to inline blocks.
1590         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
1591         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
1592
1593         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
1594         to extractor clauses.
1595
1596 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
1597
1598         * decode.scm (-distinguishing-bit-population): Significantly
1599         improve popularity heuristic.  Renamed from
1600         (-mask-bit-population): Gone.
1601         (-population-above-threshold): Sort new bit numbers in order of
1602         popularity.
1603         (-population-top-few): Allow up to three more bits to be selected
1604         than requested.  Correct selection order to prefer better bits.
1605         Correct bug in fewer-than-requested case.  Keep threshold as
1606         floating-point.
1607         (decode-best-get-bits): Pass also the insn-values.
1608
1609         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
1610         future optimization.
1611
1612         * utils.scm (message): Format nested lists better.
1613
1614 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
1615
1616         * dev.scm: Add srcdir to %load-path.
1617
1618         * rtx-funcs.scm (subword): Mode of argument can be different
1619         than mode of result, so don't use OP0 to specify argument's mode.
1620
1621 2000-11-02  Ben Elliston  <bje@redhat.com>
1622
1623         * doc/porting.texi (Building a GAS test suite): Document my change
1624         to gas-build.sh.
1625
1626 2000-11-01  Ben Elliston  <bje@redhat.com>
1627
1628         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
1629
1630 2000-10-31  Ben Elliston  <bje@redhat.com>
1631
1632         * gas-test.scm (cgen-build.sh): Allow the generated script to run
1633         with no command line arguments if the gas build directory can be
1634         determined.
1635
1636 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
1637
1638         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
1639         op-ifld -> op-ifield.
1640
1641 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
1642
1643         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
1644
1645 2000-10-13  matthew green  <mrg@cygnus.com>
1646
1647         * utils-cgen.scm (get-ifetch): Move from here ...
1648         * sim.scm (get-ifetch): ... to here.
1649         * sid.scm (get-ifetch): Copy and port to c++.
1650
1651 2000-10-06  Dave Brolley  <brolley@redhat.com>
1652
1653         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
1654         ifld-start + ifld-word-offset.
1655         (gen-ifld-extract): Check adata-integral-insn? before checking whether
1656         the field is beyond the base number of bits.
1657         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
1658         (gen-extract-ifields): Ditto.
1659         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
1660         characters in the regular expression.
1661
1662 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
1663
1664         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
1665         preprocessor constant.
1666
1667 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
1668
1669         * slib/logical.scm: New file from slib.  Provides robust bitwise
1670         logical operations for large integers.
1671         * read.scm: maybe-load it.
1672
1673 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
1674
1675         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
1676         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
1677         single-isa predicate, but support keep-isa filtering.
1678
1679 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
1680
1681         * rtl-c.scm (s-sequence): Handle nested c-calls in both
1682         statement-expression and comma-expression contexts.
1683         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
1684
1685 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
1686
1687         * decode.scm (-population-top-few): Signal error gracefully if
1688         decoding is about to become ambiguous.
1689
1690 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
1691
1692         * doc/rtl.texi (decode-assist): Describe this field as optional.
1693
1694 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
1695
1696         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
1697         with decode proc.
1698
1699 2000-09-05  Dave Brolley  <brolley@redhat.com>
1700
1701         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
1702         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
1703
1704 2000-08-29  Dave Brolley  <brolley@redhat.com>
1705
1706         * utils-gen.scm (gen-ifld-extract): Pass total-len if
1707         adata-integral-insn is true for this architecture.
1708
1709 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
1710
1711         * hardware.scm (<hw-immediate> get-index-mode): Define method.
1712         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
1713         * rtl-c.scm (-c-rtl-get): Improve an error message.
1714         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
1715
1716 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
1717
1718         * Makefile.in (DIST_COMMON): Regenerated.
1719         * ifield.scm (<derived-ifield> needed-iflds): New method.
1720         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
1721         sfmts built from <derived-ifield>s.
1722         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
1723         type symbol 'derived-ifield, not an unparseable string.
1724         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
1725         (-sfmt-contents): Add tracing.
1726
1727         From Doug Evans <dje@transmeta.com>:
1728         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
1729         C code.
1730
1731 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
1732
1733         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
1734         (rtl-c-expr-parsed,rtl-c-expr): New fns.
1735         (-rtl-c-get): Rename from rtl-c-get.
1736         (rtl-c-get): New fn for getter logging.
1737
1738 2000-07-28  Ben Elliston  <bje@redhat.com>
1739
1740         * NEWS: Update.
1741
1742 2000-07-25  Ben Elliston  <bje@redhat.com>
1743
1744         * doc/credits.texi (Credits): Add Frank Eigler.
1745
1746 2000-07-24  Dave Brolley  <brolley@redhat.com>
1747
1748         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
1749         fully.
1750         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
1751         (<keyword>): Initialize all elements fully.
1752         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
1753         fully.
1754         (-gen-mach-table-defns): Ditto.
1755         (-gen-ifld-defns): Ditto.
1756         (-gen-operand-table): Ditto.
1757         (-gen-insn-table): Ditto.
1758         (-gen-cpu-open): Nothing to do for the mach table.
1759
1760 2000-07-13  Ben Elliston  <bje@redhat.com>
1761
1762         * doc/version.texi (UPDATED): Update.
1763
1764 2000-07-05  Ben Elliston  <bje@redhat.com>
1765
1766         * configure.in (AC_PATH_PROG): Remove.
1767         * configure: Regenerate.
1768         * Makefile.am (GUILE): Locate guile dynamically.
1769         * Makefile.in: Regenerate.
1770         * doc/Makefile.in: Likewise.
1771
1772 2000-07-03  Ben Elliston  <bje@redhat.com>
1773
1774         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
1775         * opc-itab.scm (cgen-opc.c): Likewise.
1776
1777 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
1778
1779         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
1780         guile 1.4 compatibility.
1781         (rtx-env-dump): Comment out buggy display calls.
1782
1783 2000-06-15  matthew green  <mrg@redhat.com>
1784
1785         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
1786
1787 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
1788
1789         * Makefile.in: Regenerated.
1790
1791         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
1792         (gen-ifld-defns): Ditto.
1793         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
1794         * rtl.c (rtl-finish!): Ditto.
1795         * opc-itab.scm (-gen-ifield-decls): Ditto.
1796         * opcodes.scm (gen-switch): Exclude derived operands.
1797         * operand.scm (op-iflds-used): Expand derived operands.
1798         (hw-index-derived): New dummy function to create dummy object.
1799         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
1800         constructor.  Set object's hw-name and index fields.
1801         (-anyof-merge-subchoices): Set instance object's index also.
1802         (-anyof-name): New helper function.
1803         (anyof-merge-semantics): Correct replacement of operand names in
1804         anyof instance.
1805         (op-ifield): Tolerate derived-operands and their funny indices better.
1806         * ifield.scm (ifld-known-values): Expand derived ifields.
1807         (non-multi-ifields, non-derived-ifields): New utility functions.
1808         (ifld-decode-mode): Tolerate objects with unbound decode field.
1809         * iformat.scm (compute-insn-length): Expand derived ifields.
1810         (compute-insn-base-mask): Ditto.
1811         * insn.scm (insn-base-ifields): Remove.
1812         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
1813         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
1814         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
1815         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
1816         (-frag-test-data): Ditto.
1817         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
1818         (-gen-sem-switch-engine); Ditto.
1819         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
1820         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1821         (-gen-record-args): Tolerate unbound op-ifield.
1822         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
1823         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
1824         Exclude multi-insns.
1825         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1826         * utils-sim.scm (op-extract?): Handle derived operands.
1827
1828         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
1829         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
1830         * hardware.scm (hardware-for-mode): New function.
1831
1832         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
1833         cleaning up decode tables.
1834         (mask-superset?): Little helper function for above.
1835         * decode.scm (-build-decode-table-entry): Call it.
1836         (-opcode-slots): Add some more tracing.
1837         * arm.cpu: Disable decode-splits construct due to implementation
1838         conflict with `filter-harmlessly-ambiguous-insns'
1839
1840         * decode.scm (-population-top-few): New function for better decode
1841         bit generation.  Includes minor helper functions.
1842         (decode-get-best-bits): Call it instead.
1843         (OLDdecode-get-best-bits): Renamed previous version of above.
1844
1845
1846 2000-06-13  Ben Elliston  <bje@redhat.com>
1847
1848         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
1849         for the Guile library directory.
1850         * configure: Regenerate.
1851         * Makefile.in, doc/Makefile.in: Regenerate.
1852
1853         * Makefile.in, doc/Makefile.in: Regenerate.
1854         * configure.in: Remove unnecessary tests. Move to version 1.0.
1855         * acconfig.h, config.in: Remove.
1856         * configure, aclocal.m4: Regenerate.
1857         * doc/stamp-vti, doc/version.texi: Likewise.
1858         * AUTHORS: New file.
1859
1860 2000-06-07 Ben Elliston  <bje@redhat.com>
1861
1862         * fixup.scm (symbol-bound?): Reduce debugging output.
1863
1864 2000-06-02  matthew green  <mrg@redhat.com>
1865
1866         * insn.scm (insn-base-ifields): Returns all the instruction fields for
1867         a given instruction, replacing derived fields with their subfields.
1868         (insn-value): Use `insn-base-ifields' to find all constant values.
1869         (multi-insn-instantiate!): Comment some debug messages.
1870
1871 2000-06-01  Ben Elliston  <bje@redhat.com>
1872
1873         * doc/rtl.texi (Expressions): Document a hazard with the choice of
1874         symbol names used in a (c-call ..) rtx.
1875
1876         * sim-test.scm (build-test-set): Return (()) for an instruction
1877         with no operands, so it too is included in the generated test set.
1878
1879 2000-05-31  Ben Elliston  <bje@redhat.com>
1880
1881         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
1882         (sim-test): Likewise.
1883         * Makefile.in: Regenerate.
1884
1885 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
1886
1887         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
1888         stack traceback, in an order that resembles gdb's `bt'.
1889
1890 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
1891
1892         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
1893         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
1894         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
1895         multi insns.
1896         * ifield.scm (multi-ifield): Define workable field-mask and field-value
1897         virtual functions.
1898         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
1899         * iformat.scm (ifmt-expanded-ifields): Gone.
1900         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
1901         work.
1902         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
1903         ifmt entries.
1904
1905         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
1906         code.
1907
1908 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
1909
1910         * sid.scm (with-any-profile?): New function clone.
1911
1912 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
1913
1914         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
1915
1916 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
1917
1918         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
1919         (-multi-ifield-read): Parse them.
1920         (define-full-multi-ifield): Pass #f/#f as defaults for them.
1921         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
1922         (multi-ifield gen-extract): Add decode hook.
1923         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
1924
1925         * insn.scm (syntax-break-out): More correctly handle \-escaped
1926         syntax characters.
1927         (syntax-make-elements): Ditto.
1928         * opc-itab.scm (compute-syntax): Ditto.
1929
1930 2000-05-17  Ben Elliston  <bje@redhat.com>
1931
1932         * gas-test.scm (cgen-build.sh): Log the correct script filename.
1933
1934 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
1935
1936         * gas-test.scm (build-test-set): Return (()) for an instruction
1937         with no operands, so it too is included in the generated test set.
1938
1939 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
1940
1941         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
1942         IFMT_OPERANDS and SYNTAX_BYTES.
1943
1944 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
1945
1946         * sim.scm (with-any-profile?): New function.
1947         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
1948         to decide whether or not to include profiling counters.
1949
1950 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
1951
1952         Fuller derived-operand support for opcodes.
1953         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
1954         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
1955         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
1956         (gen-operand-table): Omit derived- and anyof- operands from table.
1957         (gen-insn-table): Omit multi-insns from table.
1958         * iformat.scm (ifmt-expanded-fields): New function to expand
1959         subfields of derived-ifields.
1960         (ifmt-compute!): Ignore remaining multi-insns.
1961         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
1962         multi-insns.
1963         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
1964         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
1965         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
1966         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
1967         (gen-switch): Omit anyof-operands.
1968         * operand.scm (-anyof-syntax): New function.
1969         (-anyof-merge-syntax): Call it.
1970         * utils.scm (collect): New idiomatic function.
1971
1972 2000-05-10  Ben Elliston  <bje@redhat.com>
1973
1974         * m68k.cpu: New file (work in progress).
1975
1976 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
1977
1978         * Makefile.am (all-local): New target.  Create stamp-cgen.
1979         * Makefile.in: Regenerated.
1980         * doc/Makefile.in: Regenerated.
1981
1982 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
1983
1984         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
1985         (-operand-parse-setter): Ditto.
1986         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
1987         for CACHE-ADDR operands.
1988         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
1989         trace entries.  Widen byte-wide values for printing.
1990         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
1991         Widen byte-wide values for printing.  Hexify memory addresses.
1992
1993 2000-04-23  matthew green  <mrg@redhat.com>
1994
1995         * m32r.cpu: Fix a typo.
1996
1997 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
1998
1999         * ia64.cpu (define-model): Change merced to Itanium.
2000         (f-qp): Change quilifying to qualifying.
2001         (movbr_ph, movbr_pvec): Delete.
2002         (I-I21): Delete uses of movbr_ph and movbr_pvec.
2003
2004 2000-04-07  Ben Elliston  <bje@redhat.com>
2005
2006         * doc/porting.texi (Building a simulator test suite): Clarify
2007         where generated test cases are placed.
2008
2009 2000-04-07  Ben Elliston  <bje@redhat.com>
2010
2011         * Makefile.am (gas-test): Remove dependency on `cgen'.
2012         (sim-test): Ditto.
2013         * Makefile.in: Regenerate.
2014
2015 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
2016
2017         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
2018         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
2019         type reconfiguration.
2020         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
2021         with-profile?.
2022
2023 2000-03-30  Ben Elliston  <bje@redhat.com>
2024
2025         * doc/rtl.texi (Enumerated constants): Add concept index entries.
2026
2027 2000-03-24  Ben Elliston  <bje@redhat.com>
2028
2029         * Makefile.am (stamp-cgen): Reinstate target.
2030         * Makefile.in: Regenerate.
2031
2032 2000-03-22  Ben Elliston  <bje@redhat.com>
2033
2034         * slib/ppfile.scm: Remove; unused.
2035         * slib/defmacex.scm: Likewise.
2036
2037 2000-03-21  Ben Elliston  <bje@redhat.com>
2038
2039         * doc/internals.texi (Source file overview): Document.
2040
2041         * Makefile.am (GUILEDIR): Remove.
2042         (CGEN): Ditto. Callers use $(GUILE) instead.
2043         (GUILEFLAGS): Ditto.
2044         (CGENFILES): Ditto.
2045         (APPDESCFILES): Ditto.
2046         (OPCODESFILES): Ditto.
2047         (SIMFILES): Ditto.
2048         (pkgdata_SCRIPTS): Ditto.
2049         (stamp-cgen): Remove target.
2050         * Makefile.in: Regenerate.
2051
2052         * configure.in: Remove header and library tests.
2053         * configure: Regenerate.
2054         * config.in: Likewise.
2055
2056 2000-03-20  Ben Elliston  <bje@redhat.com>
2057
2058         * read.scm: Cease loading "hob-sup.scm".
2059         * utils.scm: Inherit the fastcall family of procedures (for now).
2060         * hob-sup.scm: Remove.
2061
2062 2000-03-20  Ben Elliston  <bje@redhat.com>
2063
2064         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
2065         * configure: Regenerate.
2066         * gdbinit.in: Remove.
2067
2068 2000-03-17  Ben Elliston  <bje@redhat.com>
2069
2070         * Makefile.am (CGEN): Use guile, not cgen.
2071         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
2072         (bin_PROGRAMS, cgen_SOURCES): Likewise.
2073         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
2074         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
2075         (HOB_OBJS): Likewise.
2076         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
2077         (CGENOBJS): Likewise.
2078         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
2079         (hobbit, hobbit.o, hobbit.c): Remove targets.
2080         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
2081         (CLEANFILES): Update.
2082         * acconfig.h (WITH_HOBBIT): Remove.
2083         * configure.in: Do not test for 3 arg scm_make_vector. Remove
2084         option --with-cgen-hobbit.
2085         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
2086         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
2087         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
2088         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
2089         * Makefile.in: Regenerate.
2090         * config.in: Likewise.
2091         * aclocal.m4: Likewise.
2092         * configure: Likewise.
2093         * README (Hobbit support): Remove.
2094         * doc/internals.texi (Conventions): Do not mention Hobbit.
2095         * doc/porting.texi (Supported Guile versions): Likewise.
2096
2097 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
2098
2099         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
2100         callback convention to new sid sidutil::basic_cpu code.
2101         (-gen-sfrag-engine-fn): Ditto.
2102         * sid.scm (-create-virtual-insns!): Ditto.
2103         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
2104         mode.
2105         (cxmake-skip): Implement properly for pbb mode.
2106
2107 2000-03-03  Ben Elliston  <bje@redhat.com>
2108
2109         * doc/internals.texi: New file.
2110
2111 2000-02-29  Ben Elliston  <bje@redhat.com>
2112
2113         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
2114         * doc/porting.texi: Formatting tweaks.
2115
2116 2000-02-25  Nick Clifton  <nickc@cygnus.com>
2117
2118         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
2119         field.
2120
2121 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
2122
2123         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
2124         mode.
2125
2126 2000-02-23  Andrew Haley  <aph@cygnus.com>
2127
2128         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
2129         instruction.
2130
2131 2000-02-24  Ben Elliston  <bje@redhat.com>
2132
2133         * doc/rtl.texi (Derived operands): Add some cindex entries.
2134
2135 2000-02-23  Ben Elliston  <bje@redhat.com>
2136
2137         * ia32.cpu (dndo): Move general purpose macro from here ..
2138         * simplify.inc (dndo): .. to here.
2139
2140 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
2141
2142         * arm.cpu (h-tbit): Add c-call setter function.
2143         (h-mbits): Ditto.
2144
2145 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
2146
2147         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
2148         (-frag-cost-compute!): Ditto.
2149         * utils.scm (copyright-cygnus): Add Y2K.
2150         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
2151
2152 2000-01-25  Nick Clifton  <nickc@cygnus.com>
2153
2154         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
2155         flags field of the CGEN_CPU_TABLE structure.
2156
2157 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
2158
2159         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
2160         All references updated.
2161
2162 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
2163
2164         * ia32.cpu: Rewrite addressing mode support.
2165
2166         * ifield.scm (<ifield>): New member `follows'.
2167         (ifld-known-values): New proc.
2168         (<ifield>): New method set-word-offset!.
2169         (ifld-set-word-offset!): New proc.
2170         (ifld-new-word-offset): New proc.
2171         (<ifield>): New method next-word.
2172         (<multi-ifield>): New method next-word.
2173         (ifld-next-word): New proc.
2174         (ifld-precedes?): New proc.
2175         (-ifield-parse): New args word-offset,word-length,follows.
2176         All callers updated.  Handle CISC-style vs RISC-style ifields.
2177         (-ifield-read): Recognize word-offset,word-length,follows specs.
2178         (-ifld-parse-follows): New proc.
2179         (-multi-ifield-make-default-insert): New proc.
2180         (-multi-ifield-make-default-extract): New proc.
2181         (-multi-ifield-parse): Provide default values for insert,extract
2182         handlers if not specified.
2183         (<derived-ifield>): New class.
2184         (derived-ifield?): New predicate.
2185         (ifld-derived-operand?): New predicate.
2186         (f-anyof): New global.
2187         (ifld-anyof?,ifld-anyof-operand?): New predicates.
2188         (f-derived,ifld-derived?): Delete.
2189         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
2190         * insn.scm (-sub-insn-ifields): New proc.
2191         (-sub-insn-make!): New proc.
2192         (multi-insn-instantiate!): Provide initial implementation.
2193         (-insn-parse): If insn contains "anyof" operands, create a
2194         <multi-insn> object instead of a plain <insn>.
2195         (-parse-insn-format-symbol): Rewrite derived operand handling.
2196         Add anyof operand handling.
2197         (-parse-insn-format-ifield-spec): Rewrite.
2198         (-parse-insn-format-operand-spec): Delete.
2199         (-parse-insn-format-list): Delete support for `(operand value)'.
2200         (anyof-operand-format?): Replaces derived-operand-format?.
2201         * operand.scm (-operand-parse-getter): Improve error messages.
2202         (-operand-parse-setter): Ditto.
2203         (<derived-operand>): New members args,syntax,base-ifield,encoding,
2204         ifield-assertion.
2205         (<anyof-operand>): Change baseclass from <derived-operand> to
2206         <operand>.  Delete member values.  New members base-ifield,choices.
2207         (anyof-operand?): New predicate.
2208         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
2209         (-derived-operand-parse): Rewrite.
2210         (-derived-operand-read): Rewrite.
2211         (-anyof-parse-choice): New proc.
2212         (-anyof-operand-parse): Rewrite.
2213         (-anyof-operand-read,define-anyof-operand): New procs.
2214         (<anyof-value>): Rewrite.
2215         (-anyof-initial-known): New proc.
2216         (anyof-satisfies-assertions?): New proc.
2217         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
2218         (-anyof-merge-getter,-anyof-merge-setter): New procs.
2219         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
2220         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
2221         (-anyof-value-from-derived): New proc.
2222         (-anyof-all-choices-1,anyof-all-choices): New procs.
2223         (operand-init!): Create define-anyof-operand reader command.
2224
2225         * insn (syntax-break-out): Take syntax as argument instead of insn.
2226         All callers updated.
2227         (syntax-make): Move here, from ???.
2228
2229         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
2230         bitrange-foo. All uses updated.
2231         (bitrange-next-word): New proc.
2232
2233         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
2234
2235         * rtl.scm (rtx-canonicalize): Provide initial implementation.
2236         (rtx-make-const,rtx-make-enum): New procs.
2237         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
2238         (rtx-mem-addr,rtx-mem-sel): New procs.
2239         (rtx-change-address): New proc.
2240         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
2241         (rtx-make-set,rtx-single-set?): New procs.
2242         (rtx-combine): New proc.
2243
2244         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
2245         (rtx-traverse-with-locals): Ditto.
2246         (-rtx-traverse,-rtx-traverse-*): Ditto.
2247
2248         * rtl.scm (define-subr): New proc.
2249         (rtl-init!): Create reader command `define-subr'.
2250
2251         * cos.c (_object_mi_p): Ensure argument is an object.
2252         (indent): New function.
2253         (_object_print_elms): Add pretty-printing support.
2254         (_object_print): Ditto.
2255
2256         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
2257         (*floats-s->c-fun-table*): Ditto.
2258         * hobbit.c,hobbit.h: Rebuild.
2259         * hob-sup.c (fastcall7): New proc.
2260         * hob-sup.h (fastcall7): Declare.
2261         * hob-sup.scm (fastcall7): New macro.
2262
2263         * mach.scm (<arch>): New member subr-list.
2264         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
2265         (arch-finish!): Reverse recorded subr list.
2266
2267         * read.scm (debug-env): New global.
2268         (debug-var-names,debug-var,debug-repl-env): New procs.
2269         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
2270         (debug-quit): Renamed from `continue'.
2271
2272         * simplify.inc (dsmf): New pmacro.
2273
2274         * utils.scm (plus-scan): New proc.
2275         (split-bits): Rewrite.
2276         (split-value): New proc.
2277
2278 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
2279
2280         * doc/Makefile.am (DOCFILES): Add notes.texi.
2281         * doc/Makefile.in: Rebuild.
2282
2283 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
2284
2285         * ifield.scm (ifld-derived?): New proc.
2286         (f-derived): New global.
2287         (ifield-builtin!): Create ifield f-derived.
2288         (<multi-insn>): New class.
2289         (multi-insn?): New predicate.
2290         (multi-insn-instantiate!): New proc.
2291         (-insn-parse): Create <multi-insn> objects for insns with derived
2292         ifields.
2293         (-parse-insn-format-symbol): Handle derived ifields.
2294         (-parse-insn-format-ifield-spec): New proc.
2295         (-parse-insn-format-operand-spec): New proc.
2296         (-parse-insn-format-list): Simplify.
2297         (-parse-insn-format): No longer allow (ifield-object value) spec.
2298         (derived-operand-format?): New proc.
2299         (insn-alias?): New proc.
2300         (non-alias-insns): Rewrite.
2301         (insn-real?): Renamed from real-insn?, all callers updated.
2302         (virutal-insns): Rewrite.
2303         (multi-insns): New proc.
2304         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
2305         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
2306         Return #f if operand doesn't have an index or if index is not an
2307         ifield.
2308         (hw-index-anyof): New proc.
2309         (-operand-parse): Allow integer indices.
2310         (<derived-operand>): New class.
2311         (derived-operand?): New predicate.
2312         (<anyof-operand>): New class.
2313         (<anyof-value>): New class.
2314         (-anyof-parse-value,-anyof-operand-parse): New procs.
2315         (-derived-operand-parse,-derived-operand-read): New procs.
2316         (define-derived-operand,define-full-derived-operand): New procs.
2317         (operand-init!): New reader command define-derived-operand.
2318
2319         * utils.scm (list-take): Handle negative amount.
2320         (element?): Rewrite.
2321
2322 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
2323
2324         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
2325
2326 1999-10-04  Richard Henderson  <rth@cygnus.com>
2327
2328         * ia64.cpu: Checkpoint.
2329
2330 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
2331
2332         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
2333
2334         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
2335         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
2336
2337 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
2338
2339         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
2340         PC returned by sim_engine_invalid_insn.
2341
2342 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
2343
2344         * ia32.cpu: New file.
2345
2346 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
2347
2348         * utils.scm (bit-set?): Fix off by one error.
2349
2350         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
2351
2352         * rtl.scm (hw): Check for valid hardware element before trying to
2353         get its mode.
2354
2355         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
2356         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
2357         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
2358         * thumb.cpu (*): arm_compute_operand2_foo renamed to
2359         compute_operand2_foo.
2360
2361         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
2362         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
2363         Call delayed_branch/branch methods instead of assigning to `vpc'.
2364         (<hw-pc>,cxmake-skip): Call skip method.
2365         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
2366         (<pc>,cxmake-skip): Ditto.
2367         (-create-virtual-insns!): Ditto.
2368         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
2369         (op:write): Ditto.
2370         (op:record-profile): Specify #:output-language "c++".
2371         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
2372         @arch@_insn_attr.
2373         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
2374         Define enums here.
2375         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
2376         (gen-semantic-code): Ditto.
2377         (-gen-sem-case,-gen-sfrag-code): Ditto.
2378         (-gen-hardware-types): Delete class @cpu@_cpu_base.
2379         (cgen-cpu.h): File is now #included by main cpu class, rather than
2380         subclassing.
2381         (cgen-defs.h): New proc.
2382         (-gen-scache-semantic-fn): Change result type to sem_status.
2383         New local `status'.  Call done_cti_insn/done_insn method at end.
2384         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
2385         cgen-ops.h.
2386         (cgen-sem-switch.cxx): Ditto.
2387         * sid-decode.scm (-gen-idesc-decls): Update return type of
2388         @prefix@_sem_fn.
2389         (cgen-decode.h): Add using namespace @arch@.
2390         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
2391
2392         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
2393         (estate-output-language-c?,estate-output-language-c++?): New procs.
2394         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
2395         (estate-make-for-normal-rtl-c++): New proc.
2396         (rtl-c++-parsed,rtl-c++): New proc.
2397         (s-c-call): Invoke cpu class method if c++.
2398         (join): Use s-c-raw-call.
2399
2400         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
2401         (nop): Rewrite.
2402
2403         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
2404         * rtl.scm (<eval-state>): New member `modifiers'.
2405         (<eval-state>,vmake!): Handle #:modifiers.
2406         (estate-with-modifiers): New proc.
2407
2408         * rtl.scm (rtx-side-effects?): New proc.
2409         (rtx-canonical-bool): Don't change expr if it has side effects.
2410         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
2411         better.
2412
2413 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
2414
2415         * sim.scm (gen-scache-type): Fix typo in last patch.
2416
2417 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
2418
2419         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
2420
2421 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
2422
2423         * sid.scm (<hw-pc>,cxmake-skip): New method.
2424         (<pc>,cxmake-skip): New method.
2425
2426         * decode.scm (decode-build-table): Delete args startbit,index-list.
2427         All callers updated.
2428         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
2429         All callers updated.
2430         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
2431         to decode-get-best-bits.
2432         * sid-decode.scm (-gen-decode-fn): Ditto.
2433
2434         * hardware.scm (hw-bits): New proc.
2435         (-hw-parse): New arg layout.  All callers updated.
2436         (define-full-hardware): New arg layout.  All callers updated.
2437         (-hw-validate-layout): New proc.
2438         (-hw-create-[gs]etter-from-layout): New procs.
2439         (<hw-register>,parse!): Handle layout spec.
2440         * types.scm (type-bits): New proc.
2441
2442         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
2443         UNARY, BINARY, TRINARY rtxs.
2444
2445         * attr.scm (<enum-attribute>,parse-value): Allow strings.
2446         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
2447         Support '- as "unused spot" indicator.
2448
2449 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
2450
2451         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
2452
2453 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
2454
2455         * rtx-funcs.scm (subword): Fix mode spec of `value'.
2456
2457         * rtl.scm (-rtx-traverse-operands): Fix debugging message
2458         construction.
2459         (tstate-make): New arg `depth'.  All callers updated.
2460         (tstate-depth,tstate-set-depth!): New procs.
2461         (tstate-incr-depth!,tstate-decr-depth!): New procs.
2462         (-rtx-traverse-operands): Indent debugging output by traversal depth.
2463         (-rtx-traverse): Ditto.  Keep track of traversal depth.
2464
2465 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
2466
2467         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
2468         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
2469         * utils-sim.scm: Decoder generator support moved here.
2470         (-decode-equiv-entries?,-decode-sort-entries): New procs.
2471         (-gen-decoder-switch): Sort entries for more fall-throughs.
2472
2473         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
2474         * Makefile.in: Rebuild.
2475         * sim-test.scm (build-sim-testcase): Add logging message.
2476         * dev.scm (cload): Recognize SIM-TEST application.
2477         (load-stest): Set APPLICATION to SIM-TEST.
2478
2479         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
2480
2481         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
2482         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
2483         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
2484
2485         * insn.scm (syntax-break-out): Handle ${foo}.
2486
2487 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
2488
2489         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
2490         (bin_PROGRAMS): Define.
2491         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
2492         (cgen-hob.c): Prepend $(srcdir)/ here.
2493         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
2494         (libcpu_a_SOURCES): Delete.
2495         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
2496         (CGEN_HOB_OBJ,CGENOBJS): New variables.
2497         * configure.in (LIBS): Replace -Wl,-rpath with -R.
2498         Add AC_CHECK_LIB(guile,main).
2499         * Makefile.in: Rebuild.
2500         * doc/Makefile.in: Rebuild.
2501         * aclocal.m4: Rebuild.
2502         * config.in: Rebuild.
2503         * configure: Rebuild.
2504
2505 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
2506
2507         Rename rtx functions from name: to name, accept optional leading
2508         modifier and mode.
2509         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
2510         * attr.scm (-attr-eval): Update.
2511         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
2512         (<hw-register>,mode-ok?): Disallow VOID.
2513         (<hw-immediate>,mode-ok?): Disallow VOID.
2514         (<hw-address>,mode-ok?): Disallow VOID.
2515         * mode.scm (mode-name?): New proc.
2516         (VOID): Renamed from VM.
2517         (DFLT): Renamed from DM.
2518         (mode-builtin!): Update.
2519         * opcodes.scm (<ifield>,gen-insert): Update.
2520         (<ifield>,gen-extract): Update.
2521         (<multi-ifield>,gen-insert,gen-extract): Update.
2522         * operand.scm (op:mode): Update.
2523         (<pc>,make!): Update.
2524         (op:new-mode): Update.
2525         (-operand-read): Update.
2526         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
2527         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
2528         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
2529         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
2530         (rtx-make): Call -rtx-munge-mode&options.
2531         (rtx accessors): Rewrite.
2532         (rtx-pretty-name): Update.
2533         (-rtx-traverse-*): Update.
2534         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
2535         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
2536         (-rtx-make-traverse-table): Update.
2537         (-rtx-traverse-operands): Update.
2538         (-rtx-option?,-rtx-option-list?): New procs.
2539         (-rtx-munge-mode&options): New proc.
2540         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
2541         (-rtx-traverse): Update.
2542         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
2543         (rtx-compile-time-constant?): Update.
2544         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
2545         (rtx-value): Update.
2546         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
2547         * rtx-funcs.scm (*): Update.
2548         * rtl-c.scm (rtl-c-get): Update.
2549         (rtl-c-set-quiet,rtl-c-set-trace): Update.
2550         (s-c-call,s-c-raw-call): Update.
2551         (s-boolifop,s-convop,s-if,s-cond): Update.
2552         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
2553         (-par-replace-set-dests,-par-replace-set-srcs): Update.
2554         (s-parallel,s-sequence): Update.
2555         (rtl-c-build-table): Update.
2556         * sem-frags.scm (-frag-hash-compute!): Update.
2557         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
2558         for temporary bug compatibility with previous version.
2559         (-frag-expr-locals,-frag-expr-stmts): Update.
2560         (-frag-compute-desired-frags,-frag-pick-best): Update.
2561         * semantics.scm (-simplify-expr-fn): Update.
2562         (rtx-simplify): Update.
2563         (-rtx-ref-type): Update.  Account for modifiers.
2564         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
2565         (-build-ifield-operand!): Update.
2566         (-build-known-values): Update.
2567         (semantic-compile): Update.
2568         (-gen-reg-access-defns): Update.
2569         (gen-semantic-code,-gen-sem-case): Update.
2570         (-gen-sfrag-code,-gen-sfrag-case): Update.
2571         * sim-cpu (gen-semantic-code): Update.
2572         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
2573         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
2574         (-hw-cxmake-get): Update.
2575         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2576         (<hw-index>,cxmake-get): Update.
2577         (<operand>,gen-type,gen-read,cxmake-get): Update.
2578         (<operand>,gen-set-quiet,gen-set-trace): Update.
2579         (<pc>,cxmake-get): Update.
2580         (sim-finish!): Update.
2581         * utils-gen.scm (-gen-ifld-extract-base): Update.
2582         (-gen-ifld-extract-beyond): Update.
2583         (gen-multi-ifld-extract): Update.
2584         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
2585         * sid.scm (<hw-pc>,gen-write): Update.
2586         (-gen-decode-insn-globals): Update.
2587         (-hw-cxmake-get): Update.
2588         (<hw-register>,cxmake-get-raw): Update.
2589         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
2590         (<hw-index>,cxmake-get): Update.
2591         (<operand>,gen-type,gen-read,cxmake-get): Update.
2592         (<operand>,gen-set-quiet,gen-set-trace): Update.
2593         (<pc>,cxmake-get): Update.
2594         (-create-virtual-insns!): Update.
2595         (-decode-split-build-assertion): Update.
2596         * *.cpu: Update.
2597         * simplify.inc: Update.
2598
2599 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
2600
2601         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
2602         Prefix queue function name with sim_ instead of @cpu@_.
2603
2604         * sim.scm (-with-parallel-only?): New global.
2605         (option-init!): Initialize it.
2606         (option-set!): Set it.
2607         (with-parallel-only?): New proc.
2608         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
2609         and writeback markers if with-parallel-only.
2610         (-gen-idesc-init-fn): Update.
2611         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
2612         with-generic-write.
2613
2614 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
2615
2616         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
2617         with the invalid insn handler.
2618
2619         * utils.scm (list-maybe-ref): New proc.
2620
2621         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
2622         define-arch.
2623         (-mach-parse): Signal error if mach wasn't specified in define-arch.
2624
2625         * i960.cpu (test*-*): Delete `expr' arg.
2626         (test-op,branch-op): Update.
2627
2628 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
2629
2630         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
2631         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
2632         updated.
2633         (gen-reg-access-defn): Ditto.
2634         (-gen-hw-addr): Rewrite.
2635         (-op-gen-queued-write): Rewrite.
2636         * sim-cpu.scm (-gen-cpu-reg-access-decls):
2637         (-gen-scache-semantic-fn): Handle with-generic-write.
2638         (-gen-no-scache-semantic-fn): Ditto.
2639
2640 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
2641
2642         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
2643
2644         * sim.scm (-with-generic-write?): New global.
2645         (option-init!): Initialize it.
2646         (option-set!): Set it.
2647         (with-generic-write?): New proc.
2648         (-gen-hw-addr): New proc.
2649         (-op-gen-queued-write): New proc.
2650         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
2651
2652         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
2653         turned off.
2654         (-gen-sem-switch): Preserve existing with-parallel? value.
2655         (-gen-sem-parallel-switch): Ditto.
2656         (-gen-write-case): Add /indent support.
2657         (cgen-write.c): Rewrite.
2658
2659         * utils.scm (-current-print-state): New global.
2660         (make-print-state): New proc.
2661         (pstate-indent,pstate-set-indent!): New procs.
2662         (pstate-cmd?,pstate-cmd-do): New procs.
2663         (/indent): New global.
2664         (/indent-set,/indent-add): New procs.
2665         (string-write): Set -current-print-state.
2666         (-string-write): New arg pstate, all callers updated.
2667         Handle print-state commands.
2668         (-string-list-flatten): New proc.
2669         (string-list->string): Use it.
2670
2671         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
2672         (-gen-sem-fn-table-entry): New proc.
2673         (-gen-semantic-fn-table): New proc.
2674         (-gen-scache-semantic-fn): Make fn static.
2675         (-gen-no-scache-semantic-fn): Ditto.
2676         (cgen-semantics.c): Define macro SEM_FN_NAME.
2677         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
2678         FAST,FULL.  Update @cpu@_insn_sem contents.
2679         (-gen-semf-fn-name): Delete.
2680         (-gen-sem-fn-decls): Delete.
2681         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
2682         @cpu@_semf_init_idesc_table.
2683         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
2684         handlers here.
2685         (cgen-decode.h): Print sfmt enum.
2686         * sid-decode.scm (-gen-semf-fn-name): Delete.
2687         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
2688
2689         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
2690         (ifmt-compute!): Ditto.
2691         * sim-decode.scm (-gen-decoder-switch): Ditto.
2692         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
2693         (-gen-decoder-switch): Ditto.
2694
2695         * insn.scm (insn-virtual?): New proc.
2696
2697         * enum.scm (gen-enum-decl): Speed up, build string as list and then
2698         convert to string.
2699         * mach.scm (<arch>): attr-list is now a pair of lists.
2700         (current-attr-list): Rewrite.
2701         (current-attr-add!,current-attr-lookup): Rewrite.
2702         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
2703
2704 1999-08-06  Richard Henderson  <rth@cygnus.com>
2705
2706         * ia64.cpu: Initial checkpoint.
2707
2708 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
2709
2710         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
2711         (pmacros-init!): Update .apply help string.
2712
2713 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
2714
2715         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
2716         (<hw-pc>,cxmake-skip): New method.
2717         (<pc>,cxmake-skip): New method.
2718         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
2719         (gen-argbuf-type): New member `skip_count'.
2720         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
2721         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
2722
2723         * utils-sim.scm: New file.
2724         * dev.scm (load-sim): Load it.
2725         (load-sid): Load it.
2726         * cgen-sid.scm: Load it.
2727         * cgen-sim.scm: Load it.
2728         * iformat.scm (<sformat>): New member sbuf, not initialized by
2729         default make.
2730         * rtx-funcs.scm (skip): Rewrite.
2731         * rtl-c.scm (skip): Rewrite.
2732         * m32r.cpu (sc,snc): Update `skip' usage.
2733         * mode.scm (mode-real-mode): New proc.
2734         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
2735         Distinguish fragments by the <sformat-abuf> they use.
2736         * sim.scm (gen-profile-index-type): Delete.
2737         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
2738         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2739         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
2740         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
2741         (-gen-argbuf-elm): Rewrite.
2742         (-gen-argbuf-hw-elm): Delete.
2743         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2744         of each sfmt.
2745         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
2746         (sim-init!): Initialize them.
2747         (sim-analyze-insns!): Set them.
2748         (current-sbuf-list): New proc.
2749         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
2750         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
2751         * sim-model.scm (-gen-model-insn-fn): Ditto.
2752         * sim-decode.scm (-gen-extract-decls): Delete.
2753         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2754         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2755         sim.scm.
2756         (<hw-register,gen-extract,gen-trace-extract): Ditto.
2757         (<hw-address,gen-extract,gen-trace-extract): Ditto.
2758         (-gen-op-extract,-gen-op-trace-extract): New procs.
2759         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2760         gen-sfmt-argvars-foo and rewrite.
2761         (-gen-record-args): Rewrite.
2762         (-gen-extract-case): Tweak.
2763         * sid.scm (gen-profile-index-type): Delete.
2764         (ifield argbuf support): Move to utils-sim.scm.
2765         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
2766         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
2767         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
2768         (-sim-sformat-argbuf-list): New global.
2769         (sim-init!): Initialize it.
2770         (sim-analyze-insns!): Set it.
2771         (current-sbuf-list): New proc.
2772         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
2773         (-gen-argbuf-hw-elm): Delete.
2774         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
2775         of each sfmt.
2776         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
2777         (-gen-extract-decls): Delete.
2778         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
2779         sid.scm.
2780         (<hw-register,gen-extract,gen-trace-extract): Ditto.
2781         (<hw-address,gen-extract,gen-trace-extract): Ditto.
2782         (-gen-op-extract,-gen-op-trace-extract): New procs.
2783         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
2784         gen-sfmt-argvars-foo and rewrite.
2785         (-gen-record-args): Rewrite.
2786         (-gen-extract-case): Tweak.
2787
2788         * cgen-gh.c (gh_putc,gh_puts): New functions.
2789         * cgen-gh.h (gh_putc,gh_puts): Declare them.
2790         * cos.c (_object_print_elms,_object_print): Use them.
2791         * hob-sup.c (fastcall_print): Use them.
2792         * configure.in: Check for scm_gen_puts, scm_puts.
2793         * config.in: Rebuild.
2794         * configure: Rebuild.
2795         * aclocal.m4: Rebuild.
2796         * Makefile.in: Rebuild.
2797
2798         * dev.scm (load-opc): Use load instead of maybe-load.
2799         (load-gtest,load-sim,load-stest): Ditto.
2800         (load-sid): Ditto.
2801
2802 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
2803
2804         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
2805         up to avoid g++ 'goto crosses initialization' warning.
2806         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
2807         (-gen-sfrag-case): Update use of NEXT_FRAG.
2808
2809 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
2810
2811         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
2812
2813         * read.scm: Load sem-frags.scm.
2814         * sem-frags.scm (*): Lots rewritten.
2815         * sid.scm (-with-sem-frags?): New global
2816         (with-sem-frags?): New proc.
2817         (option-init!): Initialize -with-sem-frags?.
2818         (option-set!): Recognize with-sem-frags.
2819         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
2820         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
2821         if asked to.
2822         (-gen-sfrag-engine-decls): New proc.
2823         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
2824         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
2825         (-gen-sfrag-engine): New proc.
2826         (-gen-sem-case): Emit setup-semantics if specified.
2827         (-gen-sem-switch-engine): Update init/use of computed goto label.
2828         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
2829         from local vars.
2830         (-gen-idesc-decls): Replace sem_address with cgoto.
2831         (-gen-scache-decls): Rewrite definition of `execute' member.
2832         * arm.cpu (arm isa): Enable decode-splits.
2833         * arm7.cpu (multiply insns): Rename result to mul-result.
2834
2835         Rename decode-specialize to decode-split.
2836         * decode.scm (*): Update.
2837         * insn.scm (*): Update.
2838         * mach.scm (*): Update.
2839         * sid.scm (*): Update.
2840
2841 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
2842
2843         Record objects as a smob.
2844         * cos.c (scm_tc16_object): New static global.
2845         (cos_init): Initialize it.
2846         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
2847         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
2848         (_object_tag): Delete.
2849         (_object_make_smob): New function.
2850         (_object_make_x,_object_make_with_values_x): Rewrite.
2851         (_object_elements,_object_class_desc): Rewrite.
2852         (_object_copy,object_p): Rewrite.
2853         (_object_specialize): Rewrite.
2854         (_object_print_elms,_object_print): New functions.
2855         (object_smob): New static global.
2856         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
2857
2858         * cos.c (_make_x_symbol): New static global.
2859         (object_make): Use it.
2860         (cos_init): Initialize it.
2861
2862 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
2863
2864         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
2865         instead to determine whether to use FLD macro.
2866         (<rtl-c-eval-state>): New member ifield-var?.
2867         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
2868         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
2869         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
2870
2871         * rtl.scm (rtx-sequence-assq-locals): New proc.
2872
2873         * cos.scm (-object-error): Don't crash on non-objects.
2874
2875         * Makefile.am (CLEANFILES): Add hobbit.
2876         * Makefile.in: Rebuild.
2877
2878         * rtl-c.scm (s-c-call): Delete unnecessary code.
2879
2880 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
2881
2882         * rtl-c.scm (ifield): Always reference value via `FLD'.
2883
2884         * cos.c (elm_bound_p): Return problem SCM boolean values.
2885
2886         * utils-cgen.scm (display-argv): New proc.
2887         * cgen-opc.scm (cgen): Call it.
2888         * cgen-sim.scm (cgen): Ditto.
2889         * cgen-gas.scm (cgen): Ditto.
2890         * cgen-stest.scm (cgen): Ditto.
2891         * cgen-sid.scm (cgen): Ditto.
2892
2893 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
2894
2895         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
2896         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
2897         (-gen-extract-switch): Initialize result to 1.
2898         * opcodes.scm (gen-ifield-default-type): New proc.
2899         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
2900         updated.
2901         (<hw-index>,gen-insert): Handle non-ifield indices.
2902         (<hw-index>,gen-extract): Ditto.
2903         (<hw-asm>,gen-parse): Ditto.
2904         (<hw-asm>,gen-print): Ditto.
2905         (<keyword>,gen-parse): Ditto.
2906         (<keyword>,gen-print): Ditto.
2907         (<operand>,gen-fget): Ditto.
2908         (<operand>,gen-fset): Ditto.
2909
2910         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
2911         (-gen-hw-index): Ditto.
2912         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
2913         (-gen-hw-index): Ditto.
2914
2915         * sem-frags.scm: New file.
2916
2917         * attr.scm (attr-parse): Add better checking of input.
2918
2919         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
2920         All uses updated.
2921         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
2922
2923         * ifield.scm (ifld-nil?): New proc.
2924
2925         * operand.scm (<operand>): New members getter,setter.
2926         (<operand>,make!): New args getter,setter.  All uses updated.
2927         (op:getter,op:setter): New procs.
2928         (<hw-index>,field-start): Return 0 for non-ifield indices.
2929         (<hw-index>,field-length): Return 0 for non-ifield indices.
2930         (-operand-parse-getter,-operand-parse-setter): New procs.
2931         (-operand-parse): New args getter,setter.  All callers updated.
2932         Always use hw-index-scalar for scalar operands.
2933         (-operand-read): Handle getter,setter.
2934         (define-full-operand): New args getter,setter.  All uses updated.
2935         * semantics.scm (-build-ifield-operand!): Update.
2936         (-build-index-of-operand!): Update.
2937         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
2938         * simplify.inc (define-normal-operand): Update.
2939
2940         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2941         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
2942         (s-binop,s-cmpop,s-convop): Ditto.
2943         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
2944         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
2945         (fcc-tests): New insn-enum.
2946         (fcc-value): Rename from fcc-type.
2947         * sparcfpu.cpu: New file.  All fp support moved here.
2948
2949         * rtl.scm (<rtx-func>): New member class.
2950         (rtx-class-*?): New procs.
2951         (def-rtx-node): New arg class.  All callers updated.
2952         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
2953         * rtx-funcs.scm (*): Specify class.
2954
2955         * utils-cgen.scm (context-make-reader): New proc.
2956
2957         * utils.scm (assert-fail-msg): New variable.
2958         (assert): Use it.
2959         (list-drop,list-tail-drop): New procs.
2960
2961 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
2962
2963         * desc-cpu.scm (-gen-hash-defines): Restore generation of
2964         CGEN_MIN_INSN_SIZE deleted on March 22.
2965
2966         * ifield.scm (<ifield>,needed-iflds): New method.
2967         (<multi-ifield>,needed-iflds): New method.
2968         (ifld-needed-iflds): New proc.
2969         (multi-ifield?): New proc.
2970         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
2971         (-sfmt-search-key): Include insn length in key.
2972         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
2973         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
2974         (-ifmt-lookup-ifmt!): Compute key here.
2975         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
2976         All callers updated.
2977         (ifmt-build): Delete arg desc.  New args search-key,iflds.
2978         All callers updated.
2979         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
2980         in-ops,out-ops,sorted-used-iflds.  All callers updated.
2981         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
2982         to ifmt-build.
2983         * operand.scm (op-iflds-used): New proc.
2984         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
2985         and sim-cpu.scm.
2986         And from sid.scm,sid-cpu.scm as well.
2987         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
2988         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
2989         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
2990         (gen-extracted-ifld-value): Ditto.
2991         (-extract-chunk-specs): Ditto.
2992         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
2993         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
2994         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
2995         (-extract-insert-subfields): New function.
2996         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
2997         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
2998         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
2999         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
3000         gen-extract-foo.
3001         (-gen-no-scache-semantic-fn): Ditto.
3002         (-gen-sem-case): Ditto.
3003         (-gen-read-case): Update calls to gen-define-ifields,
3004         gen-extract-ifields.
3005         * sim-decode.scm (-gen-record-args): Update.
3006         (-gen-sfmt-argvars-assigns): Update.
3007         (-gen-extract-case): Update.
3008         * sim-model.scm (-gen-model-insn-fn): Replace calls to
3009         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
3010         gen-extract-foo.
3011         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
3012         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
3013         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
3014         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
3015         gen-define-ifields, gen-extract-ifields.
3016         (-gen-record-args): Update.
3017         (gen-sfmt-argvars-assigns): Update.
3018         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
3019         with gen-define-ifields.  Ditto for gen-extract-foo.
3020         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
3021         procs rather than method calls.
3022
3023 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
3024
3025         * sid.scm (-create-virtual-insns!): New local `context', pass it
3026         to insn-read.
3027
3028         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
3029         (operand name) not (operand object), (local name) not (local object).
3030         (rtx-traverse-with-locals): New proc.
3031         (-compile-expr-fn): New proc.
3032         (rtx-compile): Rewrite.
3033         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
3034         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
3035         (rtl-c-set-trace): Ditto.
3036         (operand define-fn): Recognize operand name argument.
3037         (local define-fn): Recognize sequence temp name argument.
3038         * rtx-funcs.scm (operand): Argument is operand name, not object,
3039         so call current-op-lookup.
3040         (local): Similarily, so call rtx-temp-lookup.
3041
3042         * rtl.scm (rtx-field?): Use rtx-name instead of car.
3043         (rtx-operand?): Ditto.
3044         (rtx-pretty-name): Ditto.
3045         (rtx-local-obj): Flag symbol argument as an error.
3046         (rtx-local-name): New proc.
3047         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
3048
3049         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
3050
3051         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
3052         updated.
3053
3054         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
3055         (and: QI rd #xff).
3056
3057         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
3058         (*floats-s->c-fun-table*): Ditto.
3059         * hobbit.c,hobbit.h: Rebuild.
3060         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
3061         * semantics.scm (rtx-simplify): Use /fastcall-make.
3062
3063         * iformat.scm (-sfmt-search-key): Don't include memory modes.
3064
3065         * insn.scm (<insn>): Delete members condition, compiled-condition.
3066         (<insn>,make!): Update
3067         (<insn> getters,setters): Update.
3068         (-insn-parse,insn-read,define-full-insn): Update.
3069         * minsn.scm (minsn-make-alias): Update.
3070         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
3071         (ifmt-compute!): Ditto.
3072         * sim.scm (sim-finish!): Update.
3073         * simplify.inc: (define-normal-insn): Update.
3074         * sid-cpu.scm (gen-semantic-code): Update.
3075
3076         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
3077         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
3078         (ifmt-compute!): Ditto.
3079
3080 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
3081
3082         * minsn.scm (minsn-compute-iflds): Print better error message for
3083         missing ifields.
3084
3085 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
3086
3087         * rtl.scm (tstate->estate): Don't copy over expr-fn.
3088
3089         * Makefile.am (HOBFLAGS): New variable.
3090         (cgen-hob.c): Use it.
3091         (hobbit.c): Use it.
3092         (libcpu_a_SOURCES): Add hob-sup.c.
3093         (hob-sup.o): New rule.
3094         * Makefile.in: Rebuild.
3095         * cgen.c: #include hob-sup.h.
3096         (cgen_init_c): Call hobbit_init_support.
3097         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
3098         (*special-scm->c-functions*): Add them.
3099         (display-c-expression): Handle *c-symbol*.
3100         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
3101         (*floats-s->c-fun-table*): Ditto.
3102         (normalize): Recognize /fastcall-make.
3103         (normalize-fastcall-make): New proc.
3104         * hobbit.c,hobbit.h: Rebuild.
3105         * hob-sup.scm: New file.
3106         * hob-sup.c: New file.
3107         * hob-sup.h: New file.
3108         * read.scm: Load hob-sup.scm.
3109         * rtl.scm (-rtx-name-list): New variable.
3110         (rtx-name-list): New proc.
3111         (rtx-lookup): Try symbol first.
3112         (def-rtx-node): Add name to -rtx-name-list.
3113         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
3114         (-rtx-traverse-anymode): New proc.
3115         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
3116         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
3117         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
3118         (-rtx-traverse-{symornum,object}): New procs.
3119         (-rtx-make-traverse-table): Rewrite.
3120         (-rtx-traverse-operands): Rewrite arg-types handling.
3121         Handle #f result of traverser.
3122         (-rtx-traverse): Renamed from -rtx-traverse-normal.
3123         Move debug handling here.
3124         (-rtx-traverse-debug): Delete.
3125         (rtl-finish!): Change -rtx-traverse-table into list of handlers
3126         for each rtx.
3127         * semantics.scm (semantic-compile:process-expr!): Fix call to
3128         -rtx-traverse.
3129         * utils.scm (map1-improper): New proc.
3130
3131 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
3132
3133         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
3134         (h-mbits): Ditto.
3135         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
3136         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
3137         (<operand>,cxmake-get): Tweak.
3138         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
3139
3140 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
3141
3142         * thumb.cpu (dnti): Delete timing spec.
3143         (all insn): Update.
3144
3145         * arm.cpu (arm isa): New fields condition, setup-semantics.
3146         (thumb isa): New field setup-semantics.
3147         (h-gr): Add attribute CACHE-ADDR.
3148         * arm7.cpu (dnai): Delete condition.
3149         (eval-cond): Delete.
3150
3151         * mach.scm (<isa>): New member setup-semantics.
3152         (-isa-parse-setup-semantics): New proc.
3153         (-isa-parse): New arg setup-semantics.
3154         (-isa-read): Recognize setup-semantics.
3155
3156         * sid-cpu.scm (gen-extract-fields): Split into two:
3157         gen-extract-ifields, gen-extract-ifmt-ifields.
3158         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
3159         tracing begin/end messages (done by caller now).
3160         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
3161         tracing begin/end messages (done by x-before,x-after virtual insns).
3162         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
3163         end so don't have to look it up again next time.
3164         * sid-decode.scm (-decode-expr-ifield-values): New proc.
3165         (-decode-expr-ifield-tracking-key): New proc.
3166         (-decode-expr-ifield-tracking): New proc.
3167         (-decode-expr-ifield-values-used): New proc.
3168         (-decode-expr-ifield-mark-used!): New proc.
3169         (-gen-decode-expr-set-itype): New proc.
3170         (-gen-decode-expr-entry): Rewrite.
3171         (-gen-decode-table-entry): New proc.
3172         (-gen-decoder-switch): Use it.
3173         (-gen-virtual-insn-finder): New proc.
3174         (-gen-argbuf-elm): Move here from sid.scm.
3175         (-gen-argbuf-hw-elm): Ditto.
3176         (-gen-argbuf-fields-union): Add entries for chain,before insns.
3177         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
3178         conditional-execution isas.
3179         (-gen-decode-fn): Record conditional-exec ifield.
3180         * sid.scm (-current-pbb-engine?): New global.
3181         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
3182         (<ifield>,gen-ifld-extract): New arg `indent'.
3183         (<multi-ifield>,gen-ifld-extract): Ditto.
3184         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
3185         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
3186         (-gen-arch-model-decls): Only scan real insns.
3187         (scache-engine-insns,pbb-engine-insns): New procs.
3188         (-create-virtual-insns!): New proc.
3189         (sim-finish!): Call it.
3190         (-decode-specialize-insn?): New proc.
3191         (-decode-specialize-build-assertion): New proc.
3192         (-decode-specialize-insn-1): New proc.
3193         (-decode-specialize-insn): New proc.
3194         (-fill-sim-insn-list!): New proc.
3195         (sim-analyze!): Create copies of insns to be specialized.
3196         * utils-cgen.scm (obj-set-name!): New proc.
3197
3198         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
3199         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
3200         semantic-attrs.
3201         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
3202         sformats.
3203         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
3204         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
3205         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
3206         (attr): Rewrite test for insn owner.
3207         (member): New rtx function.
3208         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
3209         as separate function.
3210         (rtx-ifield?,rtx-ifield-name): New procs.
3211         (rtx-operand-obj): Rewrite.
3212         (rtx-operand-name): New proc.
3213         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
3214         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
3215         (tstate-make): New args owner, known.  All callers updated.
3216         (tstate-known-lookup): New proc.
3217         (rtx-traverse): New arg owner.  All callers updated.
3218         (rtx-make-bool): New proc.
3219         (rtl-find-ifields): Rewrite.
3220         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
3221         * semantics.scm: ... here.
3222         (rtx-const-equal,rtx-const-list-equal): New procs.
3223         (-build-known-values): New proc.
3224         (semantic-compile): New arg `insn'.  Call rtx-simplify.
3225         (semantic-attrs): Ditto.
3226         * rtx-funcs.scm (member,number-list): New rtx functions.
3227
3228         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
3229         Rewrite.  Delete arg `all-attrs'. All callers updated.
3230         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
3231         updated.
3232         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
3233
3234         * decode.scm (subdtable-add): Handle `expr' entries.
3235         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
3236         (exprtable-entry-*): Update.
3237         (exprtable-entry-iflds): New proc.
3238         (exprentry-cost): New proc.
3239         (exprtable-sort,-gen-exprtable-name): New procs.
3240         (exprtable-make): New arg `name'.  All callers updated.  use vector.
3241         (exprtable-*): Update.
3242         (-build-decode-table-entry): Don't issue collision warning if all are
3243         specialized insns.  Sort exprtable entries before building table.
3244
3245         * read.scm (-reader-process-expanded-1): Move pretty printing of
3246         input to logging level 4.
3247
3248         * utils.scm (string-list->string): New proc.
3249
3250         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
3251         semantics.
3252         (insn-read): Delete leading '-' in name.  All callers updated.
3253         (real-insn?): New proc.
3254         (real-insns): Rewrite.
3255         (insn-has-ifield?): New proc.
3256         (insn-builtin!): Create insn attribute SPECIALIZED.
3257
3258         * mach.scm (<arch>): Delete member app-data.
3259         (current-raw-insn-list): New proc.
3260         (insn-list-car,insn-list-splice!): New procs.
3261         (<decode-specialize>): New class.
3262         (-isa-parse-decode-specialize): New proc.
3263         (-isa-parse-decode-specializes): New proc.
3264         (<isa>): New members `condition', `decode-specializes'.
3265         (-isa-parse-condition): New proc.
3266         (-isa-parse): New args condition, decode-specializes.
3267         (-isa-read): Recognize condition, decode-specializes.
3268         (-isa-add-decode-specialize!): New proc.
3269         (modify-isa): New proc.
3270         (isa-conditional-exec?,state-conditional-exec?): New procs.
3271         (arch-init!): New reader command `modify-isa'.
3272
3273         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
3274         (mode-signed,mode-unsigned?): New procs.
3275
3276 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
3277
3278         * types.scm (<array>): New method get-shape.
3279         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
3280         onto type.
3281         (hw-shape,hw-num-elms): New procs.
3282         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
3283         if there's more than 255 registers.
3284         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
3285
3286         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
3287         with get/set specs.
3288
3289 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
3290
3291         * cgen-sid.scm (sim-arguments): Add -X.
3292         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
3293         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
3294         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
3295         Simplify by supporting pbb engine only.
3296         (-gen-sem-switch-init): New proc.
3297         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
3298         (cgen-sem-switch.cxx): New proc.
3299         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
3300         with with-pbb?.  Support dual scache/pbb engines.
3301         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
3302         Support dual scache/pbb engines.
3303         (cgen-decode.h): Generate semantic fn decls if with-scache?.
3304         * sid.scm (*) with-pbb? replaces with-sem-switch?.
3305         (sim-finish!): Create pbb support virtual insns if with-pbb?.
3306
3307 1999-05-10  Ben Elliston  <bje@cygnus.com>
3308
3309         * arm7.cpu: Remove coprocessor related fields, operands and insn
3310         definitions for now. Take the undefined instruction trap instead.
3311         (ldmda-wb): New instruction.
3312         (ldmib-wb): Likewise.
3313         (ldmdb-wb): Likewise.
3314         (stmdb-wb): Likewise.
3315         (stmib-wb): Likewise.
3316         (stmda-wb): Likewise.
3317
3318 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
3319
3320         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
3321         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
3322
3323         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
3324         hobbit can't handle optional third arg.
3325
3326 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
3327
3328         * arm.cpu (h-tbit): Delete set spec.
3329         (h-mbits): Don't call arm_mbits_set in set spec.
3330         * arm.sim: New file.
3331         * hardware.scm (modify-hardware): New proc.
3332         (hardware-init!): Add modify-hardware command.
3333         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
3334         (-hw-gen-set-quiet): Ditto.
3335         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
3336         hardware attribute.  Load $arch.sim file if present.
3337         * utils-cgen.scm (keyword-list?): New proc.
3338         (keyword-list->arg-list,arg-list-validate-name): New procs.
3339         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
3340
3341         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
3342
3343         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
3344         @cpu@_cpu_cgen.
3345
3346         * attr.scm (obj-prepend-atlist!): New proc.
3347
3348         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
3349
3350         * sid.scm (<operand>,profilable?): Use op:type.
3351         * sim.scm (<operand>,profilable?): Use op:type.
3352
3353 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
3354
3355         * utils.scm (find-index,find): Be more stack friendly.
3356
3357         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
3358         (bic-imm): Ditto.
3359
3360 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
3361
3362         * arm.cpu (h-gr-usr): New hardware element.
3363         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
3364         (arm-mode): New keyword.
3365         (h-mbits): Add set spec.
3366         (h-spsr): Implement get/set specs.
3367
3368         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
3369         (-reader-process-expanded-1): Pretty print logging output.
3370
3371         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
3372         (cgen-cpu.h): Print enums before hardware elements.
3373         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
3374         * sid-decode.scm (cgen-decode.cxx): Ditto.
3375         * sid-model.scm (cgen-model.cxx): Ditto.
3376
3377         * utils-cgen.scm (context-error): Accept variable number of
3378         trailing args.
3379
3380         * rtx-funcs.scm (error:): New rtx function.
3381         * rtl-c.scm (s-case-vm): New proc.
3382         (-gen-non-vm-case-get,s-case-non-vm): New procs.
3383         (s-case): Simplify, handle non-VM result.
3384         (error:): New rtx function.
3385
3386 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
3387
3388         * arm.cpu (h-pc): Add set spec to zero bottom bits.
3389         (test-hi,test-ls): Fix cbit handling.
3390         (shift-type,h-operand2-shifttype): Move here ...
3391         * arm7.cpu: ... from here.
3392         (set-cond,set-cond-maybe,dnix): Delete, unused.
3393         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
3394         * arm.cpu: ... to here.
3395         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
3396         (alu-cmn): Use set-add-flags.
3397         (alu-tst): Use set-zn-flags.
3398         (alu-cmp): Use set-sub-flags.
3399         (lsl,lsr,asr): Set condition codes.
3400         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
3401         (alu-op): Split into three: alu-logical-op,alu-arith-op,
3402         alu-shift-op.
3403         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
3404         All callers updated.
3405         (sub-sp): Rename from add-sp-neg.
3406         (f-lbwl-offset): Delete.
3407         (f-lbwl-hi,f-lbwl-lo): New ifields.
3408         (lbwl-hi,lbwl-lo): Update.
3409         (bl-hi): Add 4 to pc.
3410         (push-reg,pop-reg): Simplify.
3411         (push,push-lr): Push registers in correct order.
3412         (pop,pop-pc): Pop registers in correct order.
3413         (save-reg-inc,load-reg-inc): Simplify.
3414         (ldmia): Save registers in correct order.
3415
3416 1999-04-30  Ben Elliston  <bje@cygnus.com>
3417
3418         * arm7.cpu (f-op-hdt): Remove; unused.
3419         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
3420         (f-ror-imm8): New multi-ifield.
3421         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
3422         callers updated.
3423         (f-uimm12): New field.
3424         (ror-imm8): New operand.
3425         (uimm12): Likewise.
3426         (hdt-offset8): Reinstate operand.
3427         (offset4-hi,offset4-lo): Remove.
3428         (set-cond): Remove macro; unused.
3429         (set-cond-maybe): Likewise.
3430         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
3431         (store-word/byte): Likewise.
3432         (load-halfword): Use hdt-offset8 multifield operand instead of two
3433         4-bit operands that are explicitly combined by semantic code.
3434         (do-halfword-store): Bug fix. Set address when not preindexing.
3435         (store-halfword): Also use hdt-offset8 operand.
3436         (arith-op): Avoid clobbering source registers when one of them is
3437         the destination register.
3438         (arith-imm-op): Likewise.
3439         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
3440         (teq-imm): Likewise.
3441         (ldm-p): Rename to ldmdb.
3442         (stm-pw): Rename to stmdb-wb.
3443         (multi-action): New macro; test reg-list bits and execute a
3444         semantic fn if the bit is set.
3445         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
3446         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
3447         (all insns): Use dnai entries for simplicity rather than dni.
3448         (*): Use short-form of (const ..).
3449
3450 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
3451
3452         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
3453         member eval to evaluator.
3454         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
3455         (tstate-make): Delete arg op-fn.  All callers updated.
3456         (tstate-op-fn,tstate-set-op-fn!): Delete.
3457         (rtx-traverse): Delete op-fn arg.  All callers updated.
3458         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
3459         split out of -simplify-for-compilation.
3460
3461         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
3462         (cgen_DEPENDENCIES): Add stamp-cgen.
3463         (stamp-cgen): New rule.
3464         * Makefile.in: Rebuild.
3465
3466         * rtl-c.scm (enum:): Define emitter for.
3467         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
3468         enums as well.
3469         (rtx-constant-value,rtx-enum-value): New procs.
3470         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
3471         (rtx-compile-time-constant?): Return #t for enums.
3472         (rtx-true?,rtx-false?): Handle enums.
3473         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
3474         building result by hand.
3475         (rtx-simplify-eq-attr-insn): Ditto.
3476         * rtx-funcs.scm (enum:,enum): New rtx functions.
3477
3478         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
3479         aliases-analyzed?.
3480         (arch-analyze-insns!): New proc.
3481         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
3482         of calling ifmt-compute! directly.
3483         * sid.scm (-sim-insns-analyzed?): Delete.
3484         (sim-analyze!): Call arch-analyze-insns! instead of calling
3485         ifmt-compute! directly.
3486         * sim.scm (-sim-insns-analyzed?): Delete.
3487         (sim-analyze!): Call arch-analyze-insns! instead of calling
3488         ifmt-compute! directly.
3489
3490         * utils.scm (string-take-with-filler): New proc.
3491         (string-take): Use it.
3492
3493         * pgmr-tools.scm: New file.
3494         * read.scm: Load it.
3495         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
3496
3497         * insn.scm (insn-base-mask): Renamed from insn:mask.
3498         All callers updated.
3499         (insn-base-mask-length): Renamed from insn:mask-length.
3500         All callers updated.
3501         (insn-foo): Renamed from insn:foo.  All callers updated.
3502         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
3503         * iformat.scm (compute-insn-base-mask-length): Renamed from
3504         compute-insn-mask-length.  All callers updated.
3505         (compute-insn-base-mask): Renamed from compute-insn-mask.
3506         All callers updated.
3507
3508         * enum.scm (-enum-parse-prefix): New proc.
3509         (<enum>,make!): Don't parse enum values here.
3510         (-enum-parse): Do it here.  Call -enum-parse-prefix.
3511         (define-full-insn-enum): Ditto.
3512         (enum-vals-upcase): New proc.
3513         * hardware.scm (define-keyword): Make enum prefix uppercase.
3514         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
3515
3516         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
3517         (<ifield>,field-extract): New method.
3518         (<multi-ifield>,field-extract): New method.
3519         (ifld-extract): New proc.
3520         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
3521         (ifld-extract-fn-name): Renamed from ifld-extract.
3522
3523         * ifield.scm (ifld-new-value): Renamed from ifield-make.
3524         All callers updated.
3525
3526         * ifield.scm (ifld-lsb0?): New proc.
3527         (sort-ifield-list): New arg up?.  All callers updated.
3528         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
3529         rather than global state.
3530
3531 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
3532
3533         * insn.scm (pretty-print-insn-format): New proc.
3534
3535         * Makefile.in: Rebuild.
3536         * aclocal.m4: Rebuild
3537         * configure: Rebuild.
3538
3539 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
3540
3541         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
3542         * configure: Rebuild.
3543         * aclocal.m4: Rebuild.
3544         * Makefile.in: Rebuild.
3545         * doc/Makefile.in: Rebuild.
3546         * doc/version.texi: Rebuild.
3547
3548 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
3549
3550         * utils.scm (bits->bools): New proc.
3551
3552 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
3553
3554         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
3555         subfield's gen-ifld-extract-decl method.
3556
3557 1999-04-23  Ben Elliston  <bje@cygnus.com>
3558
3559         * arm7.cpu (ldrsh-pu): Remove.
3560         (do-halfword-load): New pmacro.
3561         (load-halfword): Likewise.
3562         (do-halfword-store): Likewise.
3563         (store-halfword): Likewise.
3564         (strh-*): New instructions.
3565         (ldrsb-*): Likewise.
3566         (ldrh-*): Likewise.
3567         (ldrsh-*): Likewise.
3568
3569 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
3570
3571         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
3572         fields.
3573
3574         * arm7.cpu (do-word/byte-store): Fix typo.
3575
3576 1999-04-22  Ben Elliston  <bje@cygnus.com>
3577
3578         * arm7.cpu (do-word/byte-load): Handle cases where the destination
3579         register is the program counter (R15).
3580
3581         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
3582         (str-*): Implement using store-word-byte. Remove older versions.
3583         (bic): Use the `inv' rtx for obtaining bitwise complements.
3584         (bic-imm): Likewise.
3585         (mvn): Likewise.
3586         (mvn-imm): Likewise.
3587         (store-indev-reg): Remove crufty pmacro.
3588         (load-indiv-reg): Likewise.
3589         (ldm-p): Reverse the order of register processing for decrement.
3590         (stm-p): Likewise.
3591         (stbi): Remove; handled by the str-* insns.
3592
3593 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
3594
3595         * thumb.cpu (cmp): Fix carry bit computation.
3596         (alu-cmp): Ditto.
3597
3598 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
3599
3600         * arm.cpu (h-tbit): Specify set spec.
3601         (h-cpsr): Ditto.
3602         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
3603         (set-sub-flags): Interpret "carry bit" as a borrow.
3604         (all sub/cmp insns): Carry bit is actually a borrow bit.
3605         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
3606         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
3607         .pmacro instead.
3608         (hireg-add,hireg-cmp,hireg-move): Ditto.
3609
3610         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
3611         (-CGEN-LANG-VERSION): Ditto.
3612
3613 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
3614
3615         * pmacros.scm (-pmacro-make): New arg `default-values',
3616         all callers updated.
3617         (-pmacro-default-values): New proc.
3618         (-pmacro-process-keyworded-args): New proc.
3619         (-pmacro-process-args): New proc.
3620         (-pmacro-invoke): Process arguments before expanding macro.
3621         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
3622         (define-pmacro): Handle default values specified in arg list.
3623         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
3624         (rtx-boolif-op-arg[01]): New procs.
3625         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
3626         (rtx-simplify): Handle not,orif,andif.
3627         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
3628         * utils.scm (alist-copy): New proc.
3629         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
3630         (ldr*): Rewrite.
3631         (swi): Explicitly set pc.
3632
3633         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
3634
3635 1999-04-17  Ben Elliston  <bje@cygnus.com>
3636
3637         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
3638         correctly adjusts the program counter now.
3639
3640         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
3641         (f-signed?): Rename from `f-hdt-signed?'.
3642         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
3643         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
3644         (f-hdt-offset8): Use new field names.
3645         (ldr): Use `imm12' field, not `offset12', since we do our own
3646         address arithmetic.
3647         (str, str-*): Likewise.
3648         (ldu-*): Remove most; better not implemented than broken.
3649         (ldrh*): Likewise.
3650         (ldrsh-pu): New insn.
3651         (stri): Likewise.
3652         (stri-p): Likewise.
3653         (stbi): Likewise.
3654         (ldm-p): Likewise; replace (load-indiv-reg) version.
3655
3656 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
3657
3658         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
3659         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
3660         (*): Explicitly specify mode in c-call.
3661         (logical-op): Recognize sets of h-gr[15] as sets of pc.
3662         (arith-op): Ditto.
3663         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
3664         (arith-imm-op): New pmacro.
3665         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
3666         * thumb.cpu (bx-rs,bx-hs): Rewrite.
3667
3668 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
3669
3670         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
3671
3672         * rtl.scm (rtl-find-ifields): Implement.
3673
3674         * utils-gen.scm: New file.
3675         * read.scm: Load it.
3676         * desc.scm: Move generic attribute code to utils-gen.scm.
3677         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
3678         * Makefile.in: Rebuild.
3679
3680         * arm7.cpu (R15-OFFSET): New attribute.
3681         (dnai): New pmacro.
3682         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
3683         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
3684         for reg-shift version.
3685         (arith-op): Ditto.
3686         (data processing insns): Reorganize.  Use dnai.
3687
3688         * attr.scm (attr-kind): New proc.
3689         (attr-list-enum-list): Rewrite.
3690         (-attr-sort): Split result into two lists, bools and non-bools.
3691         (current-attr-list-for): Update.
3692
3693         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
3694         * sid-cpu.scm (-gen-attr-decls): New proc.
3695         (-gen-insn-attr-decls): New proc.
3696         (cgen-desc.h): New proc.
3697         (cgen-cpu.h): Put everything in @cpu@ namespace.
3698         (gen-parallel-exec-type): Change prefix of parexec struct from
3699         @cpu@ to @prefix@.
3700         (-gen-trace-record-type): Ditto for trace_record struct.
3701         (-gen-write-case): Update.
3702         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
3703         @prefix@.  Update scache struct references.
3704         (-gen-sem-case): Update scache struct references.
3705         (-gen-sem-switch-fn): Update idesc struct reference.
3706         Update insn_type enum reference.
3707         (cgen-write.cxx): Update scache,argbuf references.
3708         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
3709         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
3710         from @cpu@ to @prefix@.
3711         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
3712         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
3713         from @CPU@ to @PREFIX@.
3714         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
3715         from @CPU@ to @PREFIX@.
3716         (-gen-decode-insn-globals): Generate insn attributes.
3717         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
3718         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
3719         semantic fn typedef.
3720         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
3721         Change prefix of scache struct from @cpu@ to @prefix@.
3722         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
3723         Change prefix of idesc struct from @cpu@ to @prefix@.
3724         Change prefix of insn_type enum from @cpu@ to @prefix@.
3725         (-gen-argbuf-fields-union): Change prefix of sem_fields union
3726         from @cpu@ to @prefix@.
3727         (-gen-scache-decls): Change prefix of scache struct from
3728         @cpu@ to @prefix@.  Update idesc struct name.
3729         Update decode,execute methods.
3730         (-gen-extract-case): Update to type name changes.
3731         (-gen-decode-fn): Ditto.
3732         (cgen-decode.h): Put everything in @cpu@ namespace (except
3733         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
3734         (cgen-decode.cxx): Add using namespace @cpu@.
3735         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
3736         model_mark_get/set from @cpu@ to @prefix@.
3737         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
3738         @prefix@.
3739         (gen-model-fn-decls): Update idesc struct name.  Change prefix
3740         of model_insn_before/after from @cpu@ to @prefix@.
3741         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
3742         Update insn_word type name.
3743         (-gen-model-timing-table): Update INSN_TIMING struct name.
3744         (-gen-model-init-fn): Update MODEL_DATA struct name.
3745         (-gen-mach-defns): Update name of init_idesc_table fn.
3746         (cgen-model.cxx): Add using namespace @cpu@.
3747         * sid.scm (gen-cpu-class): Delete.
3748         (gen-attr-type): New proc.
3749         (gen-obj-attr-sid-defn): New proc.
3750         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
3751         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
3752         @CPU@ to @PREFIX@.
3753         (gen-cpu-insn-enum): Update name of insn enum.
3754         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
3755         (bx-hs): Ditto.
3756         (swi): Rename @cpu@_swi to @prefix@_swi.
3757
3758         * decode.scm (-build-decode-table-entry): Remove heuristic for
3759         distinguishing insns, and use insn ifield-assertion specs.
3760
3761         * desc-cpu.scm (gen-A-attr-mask): Simplify.
3762         (gen-ifld-defns): Boolean attributes begin at number 0 now.
3763         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
3764         * opc-itab.scm (-gen-macro-insn-table): Ditto.
3765         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
3766         all callers updated.
3767         (gen-attr-name): New proc
3768         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
3769         (gen-obj-attr-defn): Delete num_nonbools count.
3770
3771         * iformat.scm (ifmt-analyze): Handle insn-condition.
3772         (ifmt-compute!): Ditto.
3773         * insn.scm (<insn>): Specify default value for condition,
3774         post-cond-trap,compiled-condition,compiled-semantics.
3775         (<insn>,make!): New arg condition.
3776         (<insn>): Add getters for condition,compiled-condition.
3777         (-insn-parse): New arg condition, all callers updated.
3778         (-insn-read): Recognize condition spec.
3779         (define-full-insn): New arg condition.
3780         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
3781         * semantics.scm (semantic-compile): Change arg sem-code to
3782         sem-code-list.
3783         (semantic-attrs): Ditto.
3784         * sim.scm (sim-finish!): Update calls to define-full-insn.
3785         * simplify.inc (define-normal-insn): Update call to define-full-insn.
3786         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
3787         * sid.scm (sim-finish!): Update call to define-full-insn.
3788
3789 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
3790
3791         * Makefile.am (sim-cpu): Allow specification of ISA.
3792         * Makefile.in: Rebuild.
3793
3794 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
3795
3796         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
3797
3798 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
3799
3800         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
3801
3802         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
3803
3804         * attr.scm (atlist?): New proc.
3805         (-attr-eval): Rewrite.
3806         (attr-parse): New proc.
3807         (atlist-parse): Use it.
3808
3809         * decode.scm (exprtable-entry-make): New proc.
3810         (exprtable-entry-insn,exprtable-entry-expr): New procs.
3811         (exprtable-make,exprtable-insns): New procs.
3812
3813         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
3814         All uses updated.
3815         (hardware-builtin!): Make h-memory a vector.
3816
3817         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
3818         All callers updated.
3819         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
3820
3821         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
3822         All uses updated.
3823         (-insn-parse): Set semantics to #f if not specified.
3824         (define-insn,define-full-insn): Take out code that ignores ALIAS's
3825         if simulator.
3826         (-parse-insn-format): Recognize `=' iformat spec.
3827
3828         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
3829         (isa-max-insn-bitsize): Ditto.
3830
3831         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
3832         rtl-c-with-alist.
3833         (<ifield>,gen-extract): Ditto.
3834         (<multi-ifield>,gen-insert,gen-extract): Ditto.
3835         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
3836         (gen-define-ifmt-ifields): New proc.
3837         (gen-semantic-code): Rewrite.
3838         * sid-decode.scm (-gen-decode-expr-entry): New proc.
3839         (-gen-decoder-switch): Handle expression tables.
3840         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
3841         gen-define-fields.
3842         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
3843         instead of gen-define-fields.
3844         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
3845         callers updated.
3846         (<multi-ifield,gen-ifld-extract-decl): Ditto.
3847         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
3848         (-gen-ifld-extract-beyond): Ditto.
3849         (<multi-ifield>,gen-ifld-extract): Ditto.
3850         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3851         rtl evaluation code.
3852         (op:read): Build an <eval-state> to pass to gen-read.
3853         (op:write): Build an <eval-state> to pass to gen-write.
3854         (op:record-profile): Build an <eval-state> to pass to
3855         gen-record-profile.
3856         * sim-cpu.scm (gen-semantic-code): Rewrite.
3857         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
3858         rtl-c-with-alist.
3859         (-gen-ifld-extract-beyond): Ditto.
3860         (<multi-ifield>,gen-ifld-extract): Ditto.
3861         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
3862         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
3863         rtl evaluation code.
3864         (op:read): Build an <eval-state> to pass to gen-read.
3865         (op:write): Build an <eval-state> to pass to gen-write.
3866         (op:record-profile): Build an <eval-state> to pass to
3867         gen-record-profile.
3868
3869         * operand.scm (<operand>): Give `selector' default value of #f.
3870         Give `num' default value of -1.  Give `cond?' default value of #f.
3871         (op:new-mode): Delete arg `set?', all uses updated.
3872
3873         * read.scm (reader-error): Handle #f return from port-filename.
3874         (-init-parse-cpu!): Call rtl-c-init!.
3875         (reader-install-builtin!): Call rtl-builtin!.
3876
3877         * rtl-c.scm: New file.
3878         * semantics.scm: New file.
3879         * read.scm: Load them.
3880         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
3881         to semantics.scm.
3882         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
3883         type,eval,num.
3884         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
3885         (-rtx-num-text,-rtx-max-num): New globals.
3886         (def-rtx-operand-node,define-rtx-operand-node): New procs.
3887         (-rtx-macro-lookup): New proc.
3888         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
3889         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
3890         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
3891         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
3892         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
3893         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
3894         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
3895         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
3896         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
3897         (rtx-pretty-name): New proc.
3898         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
3899         (rtx-traverse-*): Rewrite rtx traversing.
3900         (rtx-eval-*): Rewrite rtx evaluation.
3901         (rtx-compile): New proc.
3902         (rtx-simplify): New proc.
3903         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
3904         * rtx-funcs.scm: C generation moved to rtl-c.scm.
3905         (ifield,index-of): Rewrite.
3906         (name): Renamed from `operand:'.
3907         (operand,xop,local): New rtx's.
3908         (current-insn): Rewrite.
3909         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
3910         (cgen-hob.h): Remove rule for.
3911         (cgen-hob.o): Depend on cgen-hob.c only.
3912         * Makefile.in: Rebuild.
3913
3914         * utils-cgen.scm (vmake): New proc.
3915         (<context>): New class.
3916         (context-make-prefix,context-error): New procs.
3917
3918 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
3919
3920         * i960.cpu: Add some ??? comments.
3921         (xnor, ornot): New instructions.
3922         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
3923
3924 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
3925
3926         * cos.scm (-object-error): Print better error message.
3927
3928         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
3929         (-pmacro-env-ref): Renamed from -env-ref.
3930
3931 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
3932
3933         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
3934         (h-pc): Delete.
3935         (hardware-builtin!): Delete h-pc builtin.
3936         * arm.cpu (h-pc): Define.
3937         (h-gr): Delete get,set specs.  Make array of 16 regs again.
3938         * arm7.cpu (set-logical-cc-maybe): Delete.
3939         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
3940         (data processing insns): Rewrite.
3941         * m32r.cpu (h-pc): Define.
3942         * fr30.cpu (h-pc): Define.
3943         * i960.cpu (h-pc): Define.
3944         * sparc.cpu (h-pc): Define.
3945
3946         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
3947         (s-parallel): Replace do {...} while (0) with {...}.
3948         (s-sequence): Ditto.
3949
3950         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
3951         consistent.
3952         (-gen-write-case,-gen-sem-case): Ditto.
3953         (-gen-sem-case): Only specify `written' if profiling or
3954         parallel-write-back.
3955         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
3956         (-gen-sem-switch-fn): New proc.
3957         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
3958         based on with-sem-switch option.
3959         * sid-decode.scm (-gen-decode-insn-globals): Only define
3960         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
3961         addresses in idesc_table if !with-sem-switch.
3962         (-gen-sem-fn-decls): Rewrite.
3963         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
3964         member based on with-sem-switch.  Only define
3965         `idesc_table_initialized_p' member if with-sem-switch.
3966         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
3967         * sid.scm (-with-sem-switch?): New variable.
3968         (option-init!): Initialize it.
3969         (option-set!): Set it.
3970         (with-sem-switch?): New proc.
3971         (-op-gen-set-trace): Only emit `written' reference if profiling.
3972         (sim-finish!): Use h_pc_set to set pc.
3973
3974 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
3975
3976         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
3977         All callers updated.
3978         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
3979
3980         * sid.scm (gen-argbuf-type): Delete.
3981         (-gen-argbuf-fields-union): Move to ...
3982         * sid-decode.scm: ... here.
3983
3984         * read.scm (-reader-process-expanded-1): New proc.
3985         (-reader-process-expanded): Call it to catch nested begin's.
3986         (reader-process): Move `begin' handling to -reader-process-expanded.
3987
3988         * insn.scm (-insn-read): Fix name of `format' spec.
3989
3990         * pmacros.scm (.pmacro): New builtin.
3991         (scan-symbol): If procedure macro, return macro rather than its symbol.
3992         (check-macro): Don't do lookup, instead check if (car expr) is
3993         macro object.
3994         (scan-list): Handle .pmacro.
3995         (scan): No longer re-examine text for another macro invocation.
3996         (-pmacro-build-lambda): New proc.
3997         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
3998         another, fetch the other's value (rather than doing it during
3999         expansion).
4000
4001 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
4002
4003         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
4004         * Makefile.in: Rebuild.
4005
4006         * decode.scm (decode-get-best-bits): Use memq instead of element?.
4007         (-fill-slot!): Simplify.
4008         (-build-slots): Simplify.
4009
4010         * dev.scm (load-sid): Don't load sid-arch.scm.
4011
4012         * sid-decode.scm: Replace computed goto decoder/extractor with plain
4013         switch's.
4014         * sim-decode.scm: Replace computed goto decoder/extractor with plain
4015         switch's.
4016
4017 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
4018
4019         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
4020         * decode.scm: ... here.  New file.
4021         * sid-decode.scm: Use decoder computation code in decode.scm.
4022         * read.scm: Load decode.scm.
4023
4024         * arm.cpu (arm710 model): Add u-exec function unit.
4025         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
4026         Add get/set specs to redirect reg 15 to h-pc.
4027         (h-*): Indicate for both ARM and THUMB isas.
4028         (cbit,nbit,vbit,zbit): Ditto.
4029         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
4030         (h-cpsr): Make virtual.  Add get/set specs.
4031         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
4032         (h-spsr): New virtual reg.
4033         * arm7.cpu (shift-type): New explicitly defined keyword.
4034         (h-operand2-shifttype): Use it.
4035         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
4036         All callers updated.  Don't set cbit.
4037         (logical-op): Add rm to ifield list.  Change case to case:.  Use
4038         shift-type enum as case choices.  Set cbit.
4039         (and,orr,eor,add-imm): Uncomment out.
4040         (undefined): Temporarily comment out.
4041         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
4042         (lda-pc,lda-sp): Ditto.
4043         (ldr-pc): Rename from ldr.
4044         (cbranch): Mark insns as being thumb insns.
4045
4046         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
4047
4048         * cgen-sid.scm: Don't load sid-arch.scm.
4049         (sim-arguments): Delete unused entries.
4050         * sid-arch.scm: Delete.
4051
4052         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
4053         (<insn>,ifld-assertions): New member.
4054         (<insn>,make!): New arg ifld-assertions, all callers updated.
4055         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
4056         (insn:fields): Delete.
4057         (-insn-parse): New arg ifld-assertions.  All callers updated.
4058         (-insn-read,define-insn): New procs.
4059         (define-full-insn): New arg ifld-assertions.  All callers updated.
4060         (insn-init!): New comment define-insn.
4061
4062         * model.scm (-model-parse): Ensure at least one unit specified.
4063
4064         * rtl.scm (-rtx-traverse-operands): Recognize environments.
4065         (<c-expr-temp>,get-name): New method.
4066         (-rtx-make-current-closure,s-closure): New proc.
4067         (hw:): Wrap rtx indices in a closure.
4068         (-gen-case-prefix): New proc.
4069         (s-case): Simplify.
4070         * rtx-funcs.scm (case:): Fix call to s-case.
4071         (closure): New rtx func.
4072
4073         * hardware.scm (<hardware-base>): New member isas-cache.
4074         (<hardware-base>,get-isas): New method.
4075         (hardware-builtin): Indicate for all isas.
4076         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
4077         * mach.scm (current-arch-mach-name-list): Return list of names.
4078         (current-isa-mach-name-list): Ditto.
4079         (define-arch): Install builtin objects here.
4080         * read.scm (keep-atlist?): Only keep if both mach and isa are
4081         being kept.
4082         (keep-mach-atlist?): New proc.
4083         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
4084         (reader-install-builtin!): Renamed from -install-builtin!.
4085         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
4086         -gen-cpu-reg-access-defns.  Rewrite.
4087         (gen-reg-access-defn): Delete.
4088         (-gen-hardware-struct): New proc.
4089         (-gen-hardware-types): Simplify.  Add multiple-isa support.
4090         (gen-semantic-fn,-gen-all-semantics): Delete.
4091         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
4092         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
4093         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
4094         Call sem-analyze-insns!.
4095         (cgen-semantics.cxx): Add multiple-isa support.
4096         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
4097         (-gen-scache-decls,-gen-decode-fn): Ditto.
4098         (cgen-decode.h): Call sem-analyze-insns!.
4099         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
4100         * sid.scm (-with-multiple-isa?): New variable.
4101         (option-init!): Initialize it.
4102         (option-set!): Set it.
4103         (with-multiple-isa?): New proc.
4104         (gen-cpu-ref): New arg isas.  All callers updated.
4105         (gen-cpu-class): New proc.
4106         (*-get-macro,*-set-macro): Delete.
4107         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
4108         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
4109         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
4110         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
4111         (-sim-insns-analyzed): New global variable.
4112         (sim-init!): Reset it.
4113         (sim-analyze-insns!): New proc.
4114         (sim-analyze!): Don't do instruction analysis here.
4115         (sim-finish!): Specify isa of x-invalid insn.
4116         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
4117
4118 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
4119
4120         * thumb.cpu (cpu,mach,model): Delete.
4121         (dntf): New pmacro.  Use it for all field definitions.
4122         (dntop): New pmacro.  Use it for all operand definitions.
4123         (asr): Correct field list.
4124         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
4125
4126         * utils-cgen.scm (define-getters): New macro to simplify
4127         writing class accessors.
4128         (define-setters): Ditto.
4129         (sanitize): Recognize isa elements.
4130
4131         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
4132         state-parallel-exec?.
4133         * sid-model.scm (*): Ditto.
4134         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
4135         state-decode-assist.
4136
4137         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
4138         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
4139         * sim-decode.scm (-gen-decode-switch): Ditto.
4140
4141         * sim-arch.scm (-regs-for-access-fns): Delete.
4142         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
4143         (-gen-arch-reg-access-defns): Delete.
4144
4145         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
4146         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
4147         with state-parallel=exec?.
4148         (cgen-*): Call sim-analyze-insns! here.
4149         * sim-decode.scm (cgen-*): Ditto.
4150         * sim-model.scm (cgen-*): Ditto.
4151         * sim.scm (-sim-insns-analyzed): New global variable.
4152         (sim-init!): Reset it.
4153         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
4154         already done the analysis.
4155
4156         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
4157         MACH struct.
4158
4159         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
4160         (arm arch): Update isa spec.
4161         (arm,thumb isas): Define.
4162         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
4163         (arm7tdmi mach): Add isa spec.
4164         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
4165         `const' on word number.
4166         * fr30.cpu (fr30 arch): Update isa spec.
4167         (fr30 isa): Define.
4168         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4169         moved to isa spec.
4170         * i960.cpu (i960 arch): Update isa spec.
4171         (i960 isa): Define.
4172         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4173         liw-insns,parallel-insns moved to isas spec.
4174         * m32r.cpu (m32r arch): Update isas spec.
4175         (m32r isa): Define.
4176         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4177         liw-insns,parallel-insns moved to isa spec.
4178         * sparc.cpu (sparc arch): Update isas spec.
4179         (sparc isa): Define.
4180         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
4181         decode-assist moved to isa spec.
4182         * sparc64.cpu (sparc64 cpu): Ditto.
4183         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
4184         * desc-cpu.scm (-gen-isa-table-defns): New proc.
4185         (-gen-mach-table-defns): Output mach table.
4186         (-gen-hash-defines): Delete insn size macros, except for
4187         CGEN_MAX_INSN_SIZE.
4188         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
4189         (cgen-desc.h): Define MAX_ISAS.
4190         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
4191         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
4192         (arch-* accessors): Renamed from arch:*.  All callers updated.
4193         (current-arch-isa-name-list): New proc.
4194         (-arch-parse-isas): Renamed from -arch-parse-isa.
4195         (def-isa-attr!): Rewrite.
4196         (<iframe>): New class.
4197         (<itype>): New class.
4198         (<isa>): Rewrite.
4199         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
4200         (isa-integral-insn?,isa-parallel-exec?): New procs.
4201         (-isa-parse,-isa-read,define-isa): New proc.
4202         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
4203         liw-insns moved to <isa>.
4204         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
4205         (-cpu-parse,-cpu-read): Update.
4206         (state-*): Renamed from state:*.  All callers updated.
4207         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
4208         not cpu.
4209         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
4210         (state-decode-assist): New proc.
4211         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
4212         (-adata-set-derived!): Rewrite.
4213         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
4214         callers updated.
4215         (arch-init!): Add define-isa command.
4216         * read.scm (<reader>): Default keep-isa member to (all).
4217         (reader-* accessors): Renamed from reader:*.  All callers updated.
4218         (-keep-isa-set!): Call string->symbol on isa name list.
4219         (keep-isa-validate!): Rewrite.
4220         (current-isa): New proc.
4221         (keep-isa?): Recognize "all".
4222         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
4223         Call -keep-isa-set!.
4224         (cmd-if): Recognize keep-isa?.
4225         (cpu-load): New arg keep-isa.  All callers updated.
4226         (-opt-spec-update): New proc.
4227         (common-arguments): First arg is string, not symbol.
4228         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
4229
4230         * rtl.scm (rtx-get): Default mode of string arg is INT.
4231
4232         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
4233
4234         * rtx-funcs.scm (join:): Pass cpu to handler.
4235
4236         * configure.in (guile_include_dir): Delete.
4237         * configure: Rebuild.
4238         * Makefile.in: Rebuild.
4239         * doc/Makefile.in: Rebuild.
4240
4241         * sid-cpu.scm (-extract-chunk-specs): New proc.
4242         (gen-define-fields): Use it.
4243         (-extract-chunk): New proc.
4244         (-gen-extract-beyond-var-list): Use it.
4245         (gen-extract-fields): Simplify.
4246
4247 1999-03-22  Ben Elliston  <bje@cygnus.com>
4248
4249         * arm7.cpu (ldri-p): New instruction.
4250         (swi): Do not vector through 0x8 yet--there is nothing there.
4251         (addi): Reinstate.
4252         (movi): Likewise.
4253         (all): Use (const x) in subreg expressions.
4254
4255 1999-03-19  Ben Elliston  <bje@cygnus.com>
4256
4257         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
4258         (smlal): Likewise.
4259
4260 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
4261
4262         * fr30.cpu (define-arch): Specify "forced" default-alignment.
4263         * mach.scm (-parse-alignment): Recognize "forced" alignment.
4264         * sim-cpu.scm (-extract-chunk-specs): New proc.
4265         (gen-define-fields): Use it.
4266         (-extract-chunk): New proc.
4267         (-gen-extract-beyond-var-list): Use it.
4268         (gen-extract-fields): Simplify.
4269
4270         Port to guile 1.3.1.
4271         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
4272         (LIBIBERTY): New var.
4273         (HOB_OBJS): Add cgen-gh.o.
4274         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
4275         * Makefile.in: Rebuild.
4276         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
4277         * config.in: Rebuild.
4278         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
4279         libncurses, libtermcap.
4280         Add checks for needed functions in guile 1.2 not in guile 1.3,
4281         and vice versa.  Add test for 3 argument scm_make_vector.
4282         * configure: Rebuild.
4283         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
4284         definitions if guile doesn't have them.
4285         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
4286         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
4287         with gh_vector_set_x.
4288         (cgh_qsort): Replace gh_list_length with gh_length.
4289         * cgen-gh.h: Add decls for added functions.
4290         (cgh_qsort): Don't declare if IN_HOBBIT.
4291         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
4292         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
4293         scm_make_vector with gh_make_vector.
4294         * cos.scm: Use vector-length instead of length on vectors.
4295         * dev.scm (cload): Make varargs proc with keyword/value args.
4296         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
4297         provide version that works with guile 1.2 or 1.3.
4298         Include private copy of scmhob.h.
4299         * scmhob.h: New file.  Keep our own copy for now.
4300
4301 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
4302
4303         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
4304         plain text.
4305         (-rtx-traverse-operands): Dump cx temp stack if debugging.
4306         (-cx-temp-dump-stack): Pretty up output.
4307
4308         * arm.cpu: comment out thumb.cpu until isa support ready.
4309         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
4310         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
4311         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
4312
4313         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4314
4315 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
4316
4317         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
4318         (<hw-address>,mode-ok?): unsigned/signed are compatible.
4319
4320         * operand (op:new-mode): Improve error message.
4321
4322         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
4323         * arm7.cpu: New file.
4324
4325 1999-03-12  Ben Elliston  <bje@cygnus.com>
4326
4327         * arm.cpu: Lots of minor fixes after desk checking.
4328
4329 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
4330
4331         * thumb.cpu: snapshot of current work
4332
4333         * rtl.scm (rtx-get): Tweak error message.
4334
4335 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
4336
4337         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
4338         * Makefile.in: Rebuild.
4339
4340         * cos.c (cos_vector_copy): New function.
4341         (_object_copy): Use it.
4342
4343         * mode.scm (mode:eq?): Clean up.
4344         * rtl.scm (cx-new-mode): Copy attributes.
4345         (rtx-get): Don't make copy if <c-expr> with identical mode.
4346
4347         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
4348         add new isas spec.
4349         (gr-names): h-gr register names moved here.
4350         (h-gr): Update.
4351         (cr-names): h-cr register names moved here.
4352         (h-cr): update.
4353         (dr-names): h-dr register names moved here.
4354         (h-dr): update.
4355         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
4356         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
4357         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
4358         add new isas spec.
4359         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
4360         add new isas spec.
4361         (gr-names): h-gr register names moved here.
4362         (h-gr): Update.
4363         (cr-names): h-cr register names moved here.
4364         (h-cr): update.
4365         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
4366         (h-accums,h-psw): Ditto.
4367         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
4368         add new isas spec.
4369         (gr-names): h-gr register names moved here.
4370         (h-gr-indices): Delete.
4371         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
4372         (sparc64 h-gr): Ditto.
4373         (h-y): Add get/set specs.
4374         (fp regs): Rewrite.
4375         (fp operands): Rewrite.
4376         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
4377         (h-tbr,h-cwp,h-wim): Ditto.
4378         * sparc64.cpu (h-fpsr): Add get/set specs.
4379         * sparccom.cpu (ldd-reg+reg): Load value all at once.
4380         (fp-ld-op): New arg `dest', all callers updated.
4381         (*): Replace `make-di' with `join'.
4382
4383         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
4384         present.
4385         (gen-semantic-code): Save/restore rtl generator state.
4386         (cgen-cpu.h): Call rtl-gen-init!.
4387         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4388         (-gen-ifld-extract-beyond): Ditto.
4389         (<multi-ifield>,gen-ifld-extract): Ditto.
4390         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4391         `gstate'.
4392         (-hw-gen-set-quiet-pc): Ditto.
4393         (<hw-pc>,gen-write): Ditto.
4394         (-hw-cxmake-get): Ditto.  Call getter function if present.
4395         (<hw-register>,cxmake-get-raw): New method.
4396         (<hw-register>,gen-set-quiet-raw): New method.
4397         (-hw-gen-set-quiet): New arg `gstate'.
4398         (hw-fun-access?): Delete.
4399         (gen-reg-access-defn): Output function contents.
4400         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
4401         invocation.
4402         (-gen-hw-index): Ditto.
4403         (op:read): Update gen-read invocation.
4404         (op:write): Update gen-write invocation.
4405         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
4406         operands.
4407         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4408         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4409         (<unit>,gen-profile-code): Update to sim.scm version.
4410
4411         * sim-arch.scm (-regs-for-access-fns): New proc.
4412         (-biggest-reg-mode): New proc.
4413         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
4414         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
4415         virtual regs separately.
4416         (-gen-cpu-reg-access-defns): Replace fun-access? with new
4417         get/set specs.
4418         (gen-semantic-code): Save/restore rtl generator state.
4419         (cgen-cpu.h): Call rtl-gen-init!.
4420         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
4421         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
4422         renamed to mach-bfd-name.
4423         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
4424         (-gen-ifld-extract-beyond): Ditto.
4425         (<multi-ifield>,gen-ifld-extract): Ditto.
4426         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
4427         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
4428         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
4429         `gstate'.
4430         (hw-fun-access?): Delete.
4431         (-hw-gen-set-quiet-pc): New arg `gstate'.
4432         (<hw-register>,gen-get-macro): Rewrite.
4433         (<hw-register>,gen-set-macro): Rewrite.
4434         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
4435         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
4436         (<hw-register>,cxmake-get-raw): New method.
4437         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
4438         (<hw-register>,gen-set-quiet-raw): New method.
4439         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
4440         invocation.
4441         (-gen-hw-index): Ditto.
4442         (<hw-index>): New arg `gstate'.
4443         (-gen-hw-selector): Update call to rtx-c.
4444         (<pc>): New arg `gstate'.
4445         (op:read): Update gen-read invocation.
4446         (op:write): Update gen-write invocation.
4447         (<operand>,cxmake-get): Handle raw-reg.
4448         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
4449         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
4450         (<operand>,gen-set-quiet): Handle raw-reg.
4451         (<operand>,gen-set-trace): Handle raw-reg.
4452         (-gen-mach-data): mach:cpu renamed to mach-cpu.
4453
4454         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
4455         cgen_operand_type enum.
4456         (gen-operand-table): Add operand type enum.  Replace pointer to
4457         hardware element with its enum.  Null terminate table.
4458         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
4459         Build operand table.
4460         * ifield.scm (-ifield-parse): Recognize ISA attribute.
4461         * mach.scm (<arch-data>): New member `isas'.
4462         (adata-isas): New accessor.
4463         (<isa>): New class.
4464         (isa-default-insn-word-bitsize): New accessor.
4465         (isa-enum): New proc.
4466         (current-arch-default-insn-word-bitsize): Delete.
4467         (current-isa-list,current-isa-lookup): New procs.
4468         (-arch-parse-isa): New proc.
4469         (-arch-parse): Rewrite.
4470         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
4471         (define-arch): Define ISA attribute.
4472         (def-isa-attr!,isa-supports?): New procs.
4473         (<mach>): New member `isas'.
4474         (mach-isas): New accessor.
4475         (-mach-parse): New arg `isas', all callers updated.
4476         (-mach-read): Recognize `isas'.
4477         (arch-finish!): Rewrite.
4478         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
4479         @arch@_cgen_get_{int,vma}_operand.
4480         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
4481         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
4482         of pointer to table entry.
4483         * opcodes.scm (gen-switch): Handle multiply defined operands.
4484         * operand.scm (op-sort): New proc.
4485
4486         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
4487         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
4488         (hw-enum): Accept symbol argument.
4489         (hardware-builtin!): Delete attribute FUN-ACCESS.
4490         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
4491
4492         * attr.scm (atlist-source-form): New proc.
4493         (attr-builtin!): New attr `PRIVATE'.
4494         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
4495         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
4496         if they have `PRIVATE' attribute.
4497         (gen-hw-table-defns): Output definitions of explicitly defined
4498         keyword tables.
4499         * hardware.scm (<keyword>): New member print-name.  Rename member
4500         `value' to `values', all uses updated.
4501         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
4502         (keyword-parse): Rewrite.
4503         (-keyword-read): New proc.
4504         (define-keyword): New proc.
4505         (-hw-parse-keyword): New proc.
4506         (-hw-parse-indices): Rewrite keyword handling, support new index spec
4507         `extern-keyword'.
4508         (-hw-parse-values): Ditto.
4509         (-hw-parse-get,-hw-parse-set): Rewrite.
4510         (hardware-init!): Add new comment define-keyword.
4511         * mach.scm (<arch>): New member `kw-list'.
4512         (arch:kw-list,arch_set-kw-list!): New accessors.
4513         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
4514
4515         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
4516         * mode.scm (mode-class-integral?): New proc.
4517         (mode-class-float?,mode-class-numeric?): New procs.
4518         (mode-integral?,mode-float?,mode-numeric?): New procs.
4519         (mode-compatible?): New proc.
4520         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
4521         rtx-c-with-alist.
4522         (<ifield>,gen-extract): Ditto.
4523         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
4524         (<gstate>): New class.
4525         (gstate-simulator?,gstate-set-simulator?!): New accessors.
4526         (gstate-context,gstate-set-context!): New accessors.
4527         (gstate-macro?,gstate-set-macro?!): New accessors.
4528         (gstate-make,gstate-copy): New procs.
4529         (-rtl-current-gstate): New global.
4530         (current-gstate-simulator?): New proc.
4531         (current-gstate-context,current-gstate-macro?): New procs.
4532         (current-gstate,current-gstate-set!): New procs.
4533         (rtl-gen-init!): Rewrite.
4534         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
4535         (tstate-make): New arg `gstate', all callers updated.
4536         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
4537         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
4538         (tstate-gstate,tstate-set-gstate!): New accessors.
4539         (tstate-copy): New proc.
4540         (tstate-new-cond?,tstate-new-set?): Rewrite.
4541         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
4542         (rtx-traverse): New arg `gstate', all callers updated.
4543         (rtx-strdump): New proc.
4544         (-simplify-for-compilation): New arg `gstate', all callers updated.
4545         (semantic-in-out-operands): Ditto.
4546         (semantic-attrs): Ditto.
4547         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
4548         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
4549         (rtx-value): Rewrite.
4550         (<c-expr>,gen-name): New method.
4551         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
4552         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
4553         (cx-new-mode): New proc.
4554         (-rtx-c-with-tstate): New proc.
4555         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
4556         callers updated.
4557         (-rtx-mode): Rewrite.
4558         (-rtx-mode-compatible?): New proc.
4559         (<c-expr-temp>): New member `value'.
4560         (cx-temp:value): New accessor.
4561         (<c-expr-temp>,make!): Override default method.
4562         (<c-expr-temp>,cxmake-get): Rewrite.
4563         (<c-expr-temp>,gen-set-quiet): Rewrite.
4564         (<c-expr-temp>,gen-set-trace): Rewrite.
4565         (gen-temp-defs): Use cx-temp:value.
4566         (record-temp!): New arg value, all callers updated.
4567         (cx-temp:cx:make): Delete.
4568         (-cx-temp-dump-stack): New proc.
4569         (rtx-get): New arg `gstate', all callers updated.  Do mode
4570         compatibility checks.  Ensure result has specified mode.
4571         (rtx-set-quiet): New arg `gstate', all callers updated.
4572         (rtx-set-trace): Ditto.
4573         (s-c-call): New arg `tstate', all callers updated.
4574         (s-c-raw-call): Ditto.
4575         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
4576         (s-cmpop,s-if,e-if): Ditto.
4577         (s-subreg): New proc.
4578         (-par-new-temp!): New proc.
4579         (-par-next-temp!): Rewrite.
4580         (-par-replace-set-dests): Use -par-new-temp!.
4581         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
4582         (s-sequence): Use -rtx-c-with-state.
4583         * rtx-funcs.scm (*): Update.
4584         (raw-reg:): New rtx function.
4585         (make-di): Delete.
4586         (join:,subreg:): New rtx functions.
4587
4588         * insn.scm (<insn>): New members pre-cond-trap, condition,
4589         post-cond-trap, compiled-condition.
4590
4591         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
4592
4593         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
4594
4595         * utils-cgen.scm (parse-symbol): New proc.
4596         (parse-string): New proc.
4597         (gen-get-macro,gen-set-macro): New arg `index-args'.
4598         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
4599         Prepend \ to newlines.
4600
4601         * utils.scm (alist-remove-duplicates): Delete.
4602
4603         * sid.scm (sim-init!): Delete private debugging code.
4604
4605 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
4606
4607         * cgen-sid.scm: New file for C++ simulator application.
4608         * sid-arch.scm: Ditto.
4609         * sid-cpu.scm: Ditto.
4610         * sid-decode.scm: Ditto.
4611         * sid-model.scm: Ditto.
4612         * sid.scm: Ditto.
4613         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
4614
4615 1999-03-05  Ben Elliston  <bje@cygnus.com>
4616
4617         * arm.cpu: New file.
4618
4619 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
4620
4621         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
4622         * Makefile.in: Rebuild.
4623
4624         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
4625         (-attr-parse): Validate default value.
4626
4627         * read.scm (-CGEN-VERSION): Change to 0.7.1.
4628         (-CGEN-LANG-VERSION): Ditto.
4629         (-keep-all-machs): Renamed from -keep-all, all uses updated.
4630         (<reader>): New member keep-isa plus accessors.
4631         (-keep-isa-set!,keep-isa-validate!): New procs.
4632         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
4633         (common-arguments): New variable.
4634         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
4635         (-debug-repl,continue): New procs.
4636         (-cgen,cgen): New procs.
4637         * cgen-gas.scm: Rewrite.
4638         * cgen-opc.scm: Rewrite.
4639         * cgen-sim.scm: Rewrite.
4640         * cgen-stest.scm: Rewrite.
4641
4642         * gas-test.scm (gas-test-init!): Call opcodes-init!.
4643         (gas-test-finish!): Call opcodes-finish!.
4644         (gas-test-analyze!): Call opcodes-analyze!.
4645         (<hw-asm>): New method test-data.
4646         (<operand>,testdata): Rewrite.
4647         * sim-test.scm (sim-test-init!): Call opcodes-init!.
4648         (sim-test-finish!): Call opcodes-finish!.
4649         (sim-test-analyze!): Call opcodes-analyze!.
4650         (<hw-asm>): New method test-data.
4651         (<operand>,testdata): Rewrite.
4652
4653 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
4654
4655         * fixup.scm (reverse!): Define if missing.
4656         * *.scm: Use reverse! instead of list-reverse!.
4657
4658         * utils.scm (leading-id-char?): New proc.
4659         (id-char?): Rewrite.
4660         (chars-until-delimiter): New proc.
4661         * opc-itab.scm (extract-syntax-operands): Rewrite.
4662         (strip-mnemonic): Rewrite.
4663         (compute-syntax): Rewrite.
4664
4665         * pmacros.scm (-pmacro-substr): New proc.
4666         (pmacros-init!): Add builtin .substr.
4667
4668 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
4669
4670         * thumb.cpu: New file.
4671
4672 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
4673
4674         * Makefile.am (CGENCFLAGS): New variable.
4675         (WITH_HOBBIT): Use automake conditional.
4676         (CGEN_HOB_SRC): New variable.
4677         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
4678         (*.o): Compile with CGENCFLAGS.
4679         (cgen-hob.c): Simplify.
4680         (cgen-nohob.c): New rule.
4681         (hobbit): Renamed from hob.x.
4682         (CLEANFILES): Add cgen-nohob.c.
4683         * Makefile.in: Rebuild.
4684         * doc/Makefile.in: Rebuild.
4685         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
4686         (WITH_HOBBIT): Use AM_CONDITIONAL.
4687         * configure: Rebuild.
4688         * aclocal.m4: Rebuild.
4689
4690         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
4691         with string-write-map.
4692
4693         * sim-cpu.scm (hw-need-storage?): New proc.
4694         (-gen-hardware-types): Use it.
4695         (gen-parallel-exec-elm): Call op-save-index?.
4696
4697         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
4698
4699         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
4700         UNSIGNED attribute.
4701         (-gen-ifld-extract-beyond): Ditto.
4702         (<integer>): Delete all references.
4703         (<sim-hardware>): Delete.
4704         (hw-profilable?): New proc.
4705         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
4706         (<hw-register>): Rename method get-index-mode to save-index?.
4707         (<hw-register>): New methods gen-get-macro,gen-set-macro.
4708         (<hw-register>,gen-sym-decl): Make virtual.
4709         (<hw-memory>,gen-sym-decl): Make virtual.
4710         (<hw-memory>): Rename method get-index-mode to save-index?.
4711         (<hw-address>,gen-sym-decl): Make virtual.
4712         (<operand>): New method save-index?.
4713         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
4714
4715         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
4716         prefix added.  All uses updated.
4717
4718         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
4719         rather than pointer to table entry.
4720
4721         * opcodes.scm: Remove all attribute support, lives in desc.scm.
4722         Remove all hw-asm,op-asm support.
4723         (-gen-parse-number,-gen-parse-address): New procs.
4724         (<keyword>,gen-parse): Redo function name computation.
4725         (<keyword>,gen-print): Ditto.
4726         (<operand>,gen-function-name): Rewrite.
4727         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
4728         (opcodes-init!): Delete call to add-parser!.
4729
4730         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
4731         Define enum using hardware semantic name.
4732         (-gen-hw-decl,-gen-hw-defn): New procs.
4733         (gen-hw-table-decls): Use -gen-hw-decl.
4734         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
4735         CGEN_HW_ENTRY structs.
4736         (gen-operand-table): Output hw's enum, not pointer to table entry.
4737         (-gen-cpu-open): Build table of selected hardware elements.
4738
4739         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
4740         (<hardware> support): Delete.
4741         (<hw-asm>): Delete, moved to hardware.scm.
4742         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
4743         (<hw-asm>,gen-table-entry): New method.
4744         (<hw-asm>,parse!): Delete.
4745         (<keyword>,gen-table-entry): New method.
4746         (<keyword>,parse!): Delete.
4747         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
4748         for gen-decl,gen-defn,gen-ref,gen-init.
4749         (desc-init!): Don't create parser for operand asm specs.
4750
4751         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
4752         * ifield.scm (<ifield>): New member `mode'.
4753         (<ifield>,make!): New arg `mode'.
4754         (ifld-mode): Rewrite.
4755         (ifld-hw-type): Rewrite.
4756         (<ifield>,min-value): Rewrite.
4757         (<ifield>,max-value): Rewrite.
4758         (-ifield-parse): New arg `mode'.
4759         (-ifield-read): Update.
4760         (define-full-ifield): New arg `mode'.
4761         (define-full-multi-ifield): Ditto.
4762         (-multi-ifield-parse): Ditto.
4763         (-multi-ifield-read): Update.
4764         (define-full-multi-ifield): New arg `mode'.
4765         (ifield-builtin!): Update definition of f-nil.
4766         * simplify.inc (define-normal-ifield): Update call to
4767         define-full-ifield.
4768         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
4769         (define-normal-hardware): Delete arg asm.  New args indices, values,
4770         handlers.  Update call to define-full-hardware.
4771         (define-simple-hardware,dsh): New pmacros.
4772         (define-normal-operand): Update call to define-full-operand.
4773         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
4774         Specify INT/UINT mode instead.
4775         (h-gr,h-cr): Use "indices" instead of "asm".
4776         (h-dr,h-ps): Update keyword syntax.
4777         (h-r13,h-r14,h-r15): Ditto.
4778         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
4779         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
4780         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
4781         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
4782         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
4783         Specify INT/UINT mode instead.
4784         (h-gr): Use "indices" instead of "asm".
4785         (h-cc): Update keyword syntax.
4786         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
4787         Specify INT/UINT mode instead.
4788         (h-hi16,h-slo16,h-ulo16): Update.
4789         (h-gr,h-cr): Use "indices" instead of "asm".
4790         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
4791         (h-accums): Update keyword syntax.
4792         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
4793         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
4794         Specify INT/UINT mode instead.
4795         (h-gr-indices): New pmacro.
4796         (h-gr32,h-gr64): Split up from h-gr.
4797         (h-a): Update type spec.  Use values instead of asm spec.
4798         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
4799         (h-y,h-annul-p): Ditto.
4800         (h-asr): Update keyword spec.
4801         (h-lo10,h-lo13,h-hi22): Update.
4802         (get-freg-spec,set-freg-spec): New pmacros.
4803         (h-fr32,h-fr64): Split up from h-fr.
4804         (rdd): Comment out get/set specs.
4805         (lo10,lo13,hi22): Use "handlers" instead of "asm".
4806         * sparc32.cpu (h-psr): Use dsh instead of dnh.
4807         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
4808         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
4809         UNSIGNED.  Specify INT/UINT mode instead.
4810         (h-*): Use dsh instead of dnh where appropriate.
4811         (h-ixcc): Update type spec.  Use "values" instead of "asm".
4812         (h-p,h-membarmask): Ditto.
4813         (membarmask): Use "handlers" instead of "asm".
4814
4815         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
4816         values,handlers,getters,setters plus accessors.
4817         (hw-mode-ok?,hw-default-mode): New procs.
4818         (<hardware-base>): Rename method new-mode to mode-ok?
4819         (<hardware-base>): New method get-index-mode.
4820         (hw-index-mode): New proc.
4821         (pc?): Delete, moved to operand.scm.
4822         (address?): New proc.
4823         (<hardware>): Delete.
4824         (<hw-asm>): Definition moved here from desc.scm.
4825         (keyword-parse): New proc.
4826         (hardware-parsers): Delete.
4827         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
4828         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
4829         (-hw-parse-get,-hw-parse-set): New procs.
4830         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
4831         indices,values,handlers,get,set.  Rewrite.
4832         (-hw-read-extra): Delete.
4833         (-hw-read): Update.
4834         (define-hardware): Don't add object if not selected.
4835         (define-full-hardware): Ditto.
4836         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
4837         (<hw-register>): Member `type' moved to baseclass.  Delete member
4838         hw-asm.
4839         (<hw-register>,parse!): Rewrite.
4840         (<hw-register>): Delete methods get-rank,get-mode.
4841         (<hw-register>): Method new-mode renamed to mode-ok?
4842         (<hw-register>): New method get-index-mode.
4843         (<hw-pc>,parse!): Rewrite.
4844         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
4845         (<hw-memory>,parse!): Rewrite.
4846         (<hw-memory>): Delete methods get-rank,get-mode.
4847         (<hw-memory>): Method new-mode renamed to mode-ok?
4848         (<hw-memory>): New method get-index-mode.
4849         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
4850         hw-asm.
4851         (<hw-immediate>,parse!): Rewrite.
4852         (<hw-immediate>): Delete methods get-rank,get-mode.
4853         (<hw-immediate>): Method new-mode renamed to mode-ok?
4854         (<hw-address>): Delete member hw-asm.
4855         (<hw-address>,parse!): Rewrite.
4856         (<hw-address>): Delete methods get-rank,get-mode.
4857         (<hw-address>): Method new-mode renamed to mode-ok?
4858         (hw-profilable?): Delete.
4859         (hardware-init!): Delete hardware-parsers reference.
4860         Update argument specs of command define-full-hardware.
4861         (hardware-builtin!): Update definitions of hardware builtins.
4862         * operand.scm (<operand>): New members hw-name,mode-name.
4863         Delete member op-asm.  New member handlers.
4864         (<operand>,make!): Update.
4865         (op:hw-name,op:mode-name,op:handlers): New procs.
4866         (op:type): Rewrite.
4867         (op:mode): Rewrite.
4868         (<operand>): New method get-index-mode.
4869         (<pc>,make!): Update.
4870         (op:new-mode): Rewrite.
4871         (operand-parsers): Delete.
4872         (-operand-parse): Rewrite.  Return #f if insn not selected.
4873         (-op-read-extra): Delete.
4874         (-operand-read): Update.
4875         (define-operand,define-full-operand): Update.
4876         (operand-init!): Delete operand-parsers reference.
4877         Update syntax of define-full-operand command.
4878
4879         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
4880         (define-full-insn): Update.
4881         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
4882         (define-full-minsn): Update.
4883
4884         * mode.scm (<mode>): New member class.
4885         (mode:class): New proc.
4886         (mode?): Rewrite.
4887         (-mode-parse): New arg class.
4888         (define-full-mode): Update.
4889         (mode-find): Rewrite.
4890         (mode-make-int,mode-make-uint): New procs.
4891         (mode-init!): Update syntax of define-full-mode command.
4892         (mode-builtin!): Update definitions of builtin modes.
4893
4894         * model.scm (<profile>): Delete.
4895
4896         * read.scm (keep-atlist?): New proc.
4897         (keep-multiple?): New proc.
4898         (<parser-list>): Delete.
4899         (add-parser!,parse-spec!): Delete.
4900
4901         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
4902         (def-rtx-syntax-node): Ditto.
4903         (-rtx-traverse-debug?): New variable.
4904         (tstate-make): New proc.
4905         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
4906         (tstate-new-cond?,tstate-new-set?): New procs.
4907         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
4908         tstate.  All callers updated.
4909         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
4910         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
4911         (-build-operand!): Replace arg cond? with tstate.
4912         (-build-reg-operand!,-build-mem-operand!): Ditto.
4913         (-build-index-of-operand!): Update making of <operand> object.
4914         (s-ifield): New arg tstate.  All callers updated.
4915         (hw:): New arg tstate.  All callers updated.  Replace call to
4916         current-hw-lookup with current-hw-sem-lookup-1.
4917         (s-index-of): New arg tstate.  All callers updated.
4918         (reg:,mem:): Ditto.
4919         (-rtx-use-sem-fn?): New proc.
4920         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
4921         semantic cover fns.
4922         (s-convop): Only use semantic mode when using semantic cover fns.
4923         (s-cmpop): Call -rtx-use-sem-fn?.
4924         (s-cond,s-case): New arg tstate.  All callers updated.
4925         (s-parallel,s-sequence): Ditto.
4926
4927         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
4928
4929         * types.scm (<scalar>): Rewrite implementation.
4930         (<integer>): Delete.
4931         (parse-type): Rewrite.
4932
4933         * utils-cgen.scm (parse-handlers): New proc.
4934
4935         * utils.scm (!=): New proc.
4936
4937 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
4938
4939         * pmacros.scm (-pmacro-expand): Fix typo.
4940
4941 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
4942
4943         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
4944         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
4945         * i960.cpu (build-hex2): New pmacro.
4946         (insn-opcode): Simplify.
4947         (insn-opcode2): Ditto.
4948
4949         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
4950         * cgen-stest.scm (catch-with-backtrace): Ditto.
4951
4952 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
4953
4954         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
4955         All callers updated.
4956         (-pmacro-invoke): New proc.
4957         (-pmacro-sym,-pmacro-str): New procs.
4958         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
4959         (pmacros-init!): Install builtins .iota, .map, .apply.
4960         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
4961         (h-fr): Simplify register name spec.
4962         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
4963         * utils.scm (num-args-ok?): New proc.
4964
4965 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
4966
4967         * pmacros.scm (-pmacro-error): New proc.
4968         (-pmacro-expand): Use it.
4969         (-pmacro-splice): New proc.
4970         (pmacros-init!): Install new builtin .splice.
4971
4972         * sparc.cpu: Include sparc64.cpu when appropriate.
4973         (f-mmask,f-simm11): Moved to sparc64.cpu.
4974         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
4975         (ANNUL attribute): Delete.
4976         (test-* pmacros): New arg cc, all callers updated.
4977         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
4978         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
4979         atomic-opc.
4980         (ldstub,swap): Moved to sparccom.cpu.
4981         * sparc64.cpu: Add more insns.
4982
4983 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
4984
4985         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
4986         CGEN_ATTR_VALUE.
4987         (cgen-sem-switch.c): Ditto.
4988         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
4989         moved to cgen-engine.h.
4990         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
4991         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
4992         global.  Cache attributes and insn length in IDESC.
4993         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
4994         @cpu@_opcode renamed to @cpu@_get_idata.
4995         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
4996         done later underneath sim_resume.
4997         (@mach@_mach): Record @cpu@_prepare_run.
4998         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
4999         updated.
5000         (-hw-gen-set-quiet-pc): Ditto.
5001         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
5002         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
5003         (<hw-addr>,cxmake-get): Ditto.
5004         (<hw-iaddr>,cxmake-get): Ditto.
5005         (<pc>,cxmake-get): Ditto.
5006         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
5007         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
5008         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5009         (<hw-pc>,gen-write): Use hw-selector-default.
5010         (<hw-register>,gen-write): Ditto.
5011         (<hw-memory>,gen-write): Ditto.
5012         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
5013         (-gen-hw-selector): New proc.
5014
5015         * desc.scm: New file.
5016         * desc-cpu.scm: New file.
5017         * opcodes.scm: Split up into several smaller files.
5018         * opc-asmdis.scm: New file.
5019         * opc-ibld.scm: New file.
5020         * opc-itab.scm: New file.
5021         * opc-opinst.scm: New file.
5022         * Makefile.am (desc): New target.
5023         (opcodes): Update args to cgen-opc.scm.
5024         * Makefile.in: Rebuild.
5025         * aclocal.m4: Rebuild.
5026         * config.in: Rebuild.
5027         * configure.in: Update arg to AC_INIT.
5028         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
5029         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
5030         AC_PROG_INSTALL.
5031         * configure: Rebuild.
5032         * cgen-gas.scm: Update files to load.
5033         * cgen-opc.scm: Ditto.  Reorganize option letters.
5034         * cgen-sim.scm: Update files to load.
5035         * cgen-stest.scm: Ditto.
5036         * dev.scm (cload): New app "DESC".
5037         (load-opc): Update files to load.
5038         (load-gtest,load-sim,load-stest): Ditto.
5039
5040         * attr.scm (bool-attr?): New proc.
5041         (attr-list-enum-list): New proc.
5042         (-attr-sort): Rewrite.
5043         (attr-builtin!): Give ALIAS attribute a fixed index.
5044         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
5045         calculate attribute enum list.
5046         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
5047
5048         * insn.scm (-insn-parse): Renamed from parse-insn.
5049
5050         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
5051         (-hw-read): Ditto.
5052
5053         * mode.scm (-mode-parse): Renamed from parse-mode.
5054
5055         * operand.scm (<operand>): New member `selector'.
5056         (<operand>,make!): Use default selector.
5057         (hw-selector-default): New variable.
5058         (hw-selector-default?): New proc.
5059
5060         * pmacros.scm (pmacros-init!): New proc.
5061         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
5062         (-env-set!): Delete.
5063         (-pmacro-expand): New proc apply-macro.
5064         Use it in scan-list,scan.  Scan list first, then see if macro
5065         invocation.
5066         (define-pmacro): Rewrite.
5067         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
5068
5069         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
5070         selected if (current-mach) seen.
5071         (rtx?): Renamed from rtx-uneval?, all callers updated.
5072         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
5073         updated.
5074         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
5075         selector, all callers updated.
5076         (hw:): New arg selector, all callers updated.  Delete old comments
5077         and code.
5078         (reg:,mem:): Handle selectors
5079         * rtx-funcs.scm (reg:): Handle selectors.
5080
5081         * read.scm: Renamed from cpu.scm.
5082         (<command>): New class.
5083         (<reader>): New member commands.
5084         (reader-add-command!): New proc.
5085         (reader-lookup-command): New proc.
5086         (reader-error,-reader-process-expanded,reader-process): New procs.
5087         (reader-read-file!): New proc.
5088         (include): Call reader-read-file!.
5089         (cmd-if): New proc.
5090         (cpu-load): Call reader-read-file!.
5091         * utils.scm (num-args): New proc.
5092         * simplify.inc: New file.
5093         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
5094         procs.  Move define-normal-foo procs (and abbreviated forms) to
5095         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
5096         routines.
5097         * fr30.cpu: Include simplify.inc.
5098         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5099         * i960.cpu: Include simplify.inc.
5100         * m32r.cpu: Include simplify.inc.
5101         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5102         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
5103         * sparc.cpu: Include simplify.inc.
5104         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5105         * utils-cgen.scm (parse-error): Moved to read.scm.
5106         (sanitize): Rewrite.
5107         (utils-init!): New proc.
5108
5109 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
5110
5111         * sparc.cpu: New file.
5112         * sparc32.cpu: New file.
5113         * sparc64.cpu: New file.
5114         * sparccom.cpu: New file.
5115         * sparc.opc: New file.
5116
5117 1999-01-27  Frank Eigler  <fche@cygnus.com>
5118
5119         * utils.scm (gen-copyright): New proc.
5120
5121 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
5122
5123         Parameterize rtl parsing, rather than having lots of little handlers.
5124         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
5125         Delete member traverse.
5126         (rtx:set-traverse!): Delete.
5127         (-rtx-valid-types,-rtx-valid-matches): New variables.
5128         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
5129         instead of expression.  All callers updated.
5130         (def-rtx-node): New args arg-types,arg-modes.
5131         (def-rtx-syntax-node): Ditto.
5132         (def-rtx-dual-mode): Ditto.
5133         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
5134         All callers updated.
5135         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
5136         All callers updated.
5137         (rtx-macro-expand): New proc.
5138         (-rtx-traverse-check-args): Delete.
5139         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
5140         an rtx specific traverser.
5141         (-rtx-any-mode?,-rtx-symornum?): New procs.
5142         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
5143         (-rtx-traverse-no-mode): Delete.
5144         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
5145         (-rtx-traverse-operands): Rewrite.
5146         (-rtx-traverse-expr): Rewrite.
5147         (rtx-traverse): Don't expand macros here, leave for caller to do.
5148         (rtx-simplify): Delete.
5149         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
5150         attributes.
5151         (rtx-true?,rtx-false?): Ditto.
5152         (-rtx-ref-type): Set dest is operand 1 now.
5153         (-simplify-for-compilation): New proc.
5154         (semantic-in-out-operands): Recognize regno as an alias for index-of.
5155         Expand macros before calling rtx-traverse.  Sort operands by name
5156         to avoid unnecessary semantic formats.
5157         (semantic-attrs): New proc.
5158         (rtx-uneval?): Handle (<rtx-func> ...).
5159         (s-boolifop): Delete arg mode.  All callers updated.
5160         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
5161         (eq-attr): New arg obj.
5162         (eq-attr:): Delete.
5163         * m32r.cpu (rach): Update calls to andif.
5164
5165         * minsn.scm (-minsn-parse-expansion): Renamed from
5166         parse-minsn-expansion.
5167         (-minsn-parse): Renamed from parse-minsn.
5168         (-minsn-read): Renamed from read-minsn.
5169         (def-minsn): Don't check APPLICATION here.
5170         (def-full-minsn): New proc.
5171         (define-macro-insn): Check APPLICATION here.  Expand macros.
5172         (define-normal-macro-insn): Ditto.
5173
5174         * utils.scm (word-value): New arg start-lsb?.
5175         (word-mask,word-extract): Ditto.
5176         (split-bits,powers-of-2): Use integer-expt instead of expt.
5177         (bit-set?): Handle 32 bit values (which are bignums).
5178         (cg-logand,cg-logxor): New functions.
5179         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
5180         (<ifield>,field-value): Update call to word-value.
5181         (<ifield>,min-value): Use integer-expt instead of expt.
5182         (<ifield>,max-value): Ditto.
5183
5184         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
5185
5186         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
5187
5188         Compute raw instruction format in addition to semantic based format.
5189         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
5190         (<iformat> accessors): Rename accessors to ifmt-*.
5191         (<sformat>): New class.
5192         (fmt-enum): Renamed from fmt:enum.
5193         (-ifmt-search-key): Rewrite.
5194         (-sfmt-search-key): New proc.
5195         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
5196         Compute iformat and sformat search keys.
5197         (ifmt-build): Update.
5198         (sfmt-build): New proc.
5199         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
5200         (ifmt-compute!): Compute instruction format <iformat> based on
5201         instruction fields alone.  Compute new semantic format <sformat>
5202         based on instruction fields and semantic information.
5203         (ifmt:lookup): Delete.
5204         * mach.scm (<arch>): New member sfmt-list, plus accessors.
5205         (current-sfmt-list): New proc.
5206         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
5207         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
5208         (insn-length,insn-length-bytes): Update.
5209         (insn:mask-length,insn:mask): Update.
5210         (insn-lookup-op): Update.
5211         * gas-test.scm (gas-test-analyze!): Update.
5212         (gen-gas-test): Ditto.
5213         * sim-test.scm (sim-test-analyze!): Update.
5214         (gen-sim-test): Ditto.
5215         * opcodes.scm (gen-operand-instance-table): Update.
5216         (gen-operand-instance-ref): Ditto.
5217         (max-operand-instances): Use heuristic if semantics not parsed.
5218         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
5219         (opcodes-analyze!): Only scan semantics of building operand instance
5220         tables.
5221         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
5222         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
5223         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
5224         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
5225         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
5226         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
5227         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
5228
5229         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
5230         New arg lsb0?  All callers updated.
5231         (decode-bits): New arg lsb0?.  All callers updated.
5232         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
5233         of expt.
5234         (-gen-decode-bits): New arg lsb0?.  All callers updated.
5235         (build-slots): Call integer-expt instead of expt.
5236         (build-decode-table-entry): Handle crossing word boundaries better.
5237         (-gen-decode-switch): New arg lsb0?.  All callers updated.
5238         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
5239
5240         * enum.scm (define-enum): Rewrite.
5241         (define-normal-enum): Ditto.
5242         (def-full-insn-enum): New proc.
5243         (define-normal-insn-enum): Rewrite.
5244
5245         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
5246         valid C.
5247         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
5248
5249         * dev.scm: Add sid support.
5250
5251         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
5252         (CLEANFILES): Add tmp-*.
5253         * Makefile.in: Rebuild.
5254
5255         * doc/Makefile.am: New file.
5256         * doc/Makefile.in: New file.
5257         * doc/cgen.texi: New file.
5258         * Makefile.am (SUBDIRS): Define.
5259         * Makefile.in: Rebuild.
5260         * configure.in: Create doc/Makefile.
5261         * configure: Rebuild.
5262
5263 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
5264
5265         * insn.scm (insn:syn): Delete.
5266
5267 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
5268
5269         * fr30.cpu (model fr30-1): Add state variables load-regs,
5270         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
5271         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
5272         (model m32rx): Ditto.
5273         (addi): Simplify function unit usage spec.
5274         (ld-plus): Rewrite operand names in function unit usage spec.
5275         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
5276         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
5277         overridden.  Allow operand to appear in input and output spec.
5278         (<insn>,gen-profile-code): string-append -> string-list.
5279
5280         * ifield.scm (define-ifield): Call pmacro-expand.
5281         (define-full-ifield,define-normal-ifield): Ditto.
5282         (define-multi-ifield,define-normal-multi-ifield): Ditto.
5283
5284         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
5285         with-scache and without-scache cases.
5286
5287 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
5288
5289         * fr30.cpu (fr30-1): Add state variable h-gr.
5290         Add units u-cti, u-load, u-store, u-ldm, u-stm.
5291         (all insns): First pass at providing cycle counts.
5292         * sim.scm (<unit>,gen-profile-code): Only check for output operands
5293         when initializing unit output operands, ditto for input operands.
5294
5295         * insn.scm (insn-length,insn-length-bytes): New procs.
5296         * mach.scm (-adata-set-derived!): Use them.
5297         * sim-cpu.scm (-gen-sem-case): Ditto.
5298
5299         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
5300         (-gen-write-case): Ditto.
5301         (gen-semantic-fn): Ditto.  Split into two:
5302         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
5303         in non-scache case.
5304         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
5305         scache/no-scache appropriately.  All callers updated.
5306         (-gen-sem-case): PCADDR->IADDR.
5307         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
5308
5309         * sim-decode.scm (*): Replace string-append,string-map with
5310         string-list,string-list-map where the result is sufficiently large.
5311         (-gen-decode-insn-table): Go back to simple version for non-scache
5312         case: just record IDESC in decoder tables and leave field extraction
5313         to the caller.
5314         (-gen-decode-switch): Ditto.
5315         (-gen-decode-fn): Ditto.
5316         (-gen-extract-decls): Only emit format enum if with-scache?.
5317         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
5318         non-scache case.
5319         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
5320         (-gen-insn-timing): Ditto.
5321         * sim.scm (gen-argbuf-type): Only output sem_fields union in
5322         with-scache case.
5323
5324         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
5325         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
5326
5327 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
5328
5329         * cpu.scm (keep-mach-validate!): New proc.
5330         (include): New proc.
5331
5332         * mach.scm (current-arch-mach-name-list): New proc.
5333         (-parse-arch-machs): Always return canonical form.
5334         (def-arch): Validate user specified machs to be kept.
5335         (def-mach-attr!): Simplify.
5336
5337         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
5338         (option-init!): Initialize it.
5339         (option-set!): Set it.
5340         (gen-insn-table-entry): Emit 0 for operand instance ref if not
5341         output operand instance tables.
5342         (cgen-opc.in): Only output operand instance tables if asked to.
5343
5344         * sim.scm (option-init!,option-set!): Clarify returned value.
5345
5346         * sim.scm (gen-mach-bfd-name): Move from here.
5347         * utils-cgen.scm: To here.
5348
5349 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
5350
5351         * fr30.cpu (ilm): Fix comment field.
5352         (cond-branch): Remove explicit setting of COND-CTI, let cgen
5353         compute it.
5354
5355         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
5356         (rtx-true?, rtx-false?): New procs.
5357         * rtx-funcs.scm (annul): Rename vpc to pc.
5358         (-rtx-traverse-if): Improve determination of whether then/else parts
5359         are conditionally executed.
5360
5361         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
5362         outer level.
5363         (gen-argbuf-type): Simplify generated definition (big sem_fields
5364         union moved outside).
5365
5366 1999-01-11  Ben Elliston  <bje@cygnus.com>
5367
5368         * doc/porting.texi: New file.
5369
5370         * doc/intro.texi: New file.
5371         (Layout): Use @example to insert preformatted ASCII text (such as
5372         diagrams). @code is inappropriate here.
5373
5374 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
5375
5376         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
5377
5378         * m32r.opc (print_hash): Cast dis_info.
5379
5380         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
5381         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
5382         get/set macros.
5383
5384 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
5385
5386         * i960.cpu (f-br-disp): Remove RELOC attribute.
5387         (f-ctrl-disp): Ditto.
5388         (callx-disp): set-quiet -> set for (reg h-gr 2).
5389         (callx-indirect,callx-indirect-offset): Ditto.
5390
5391         * Makefile.am (gas-test): Fix dependencies.
5392         * Makefile.in: Rebuild.
5393         * cgen-gas.asm: File creation args are -<uppercase-letter>.
5394         * gas-test.scm (break-out-syntax,make-file-name): Delete.
5395         (gas-test-analyze!): Use syntax-break-out.
5396         * sim-test.scm (break-out-syntax,make-file-name): Delete.
5397         (sim-test-analyze!): Use syntax-break-out.
5398         (cgen-build.sh): Use gen-file-name.
5399         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
5400         * insn.scm (syntax-break-out): New proc.
5401         * utils.scm (gen-file-name): New proc.
5402
5403         * fixup.scm (nil,<?,<=?,>?): Delete.
5404
5405         * utils.scm (count-true): Rewrite.
5406
5407         * slib/sort.scm: Move sort.scm to slib directory.
5408         * cpu.scm: Update.
5409
5410         * iformat.scm (ifmt-compute!): Record empty format.
5411
5412         * rtl.scm (semantic-in-out-operands): Simplify by moving several
5413         internal procs outside.  Handle expression register numbers.
5414         Handle index-of.
5415
5416         * rtx-funcs.scm (annul): Rename new_pc to vpc.
5417
5418         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
5419         every register.
5420         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
5421         (gen-semantic-fn,-gen-sem-case): Ditto.
5422         (cgen-cpu.c): Define WANT_CPU to @cpu@.
5423         (cgen-semantics.c): Ditto.
5424         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
5425         (gen-ifmt-argvars-defns): New proc.
5426         (gen-ifmt-argvars-assigns): New proc.
5427         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
5428         (-gen-decode-fn): Handle non-with-scache case.
5429         (cgen-decode.c): Define WANT_CPU to @cpu@.
5430         * sim-models.scm (-gen-mach-defns): Emit bfd name.
5431         (cgen-model.c): Define WANT_CPU to @cpu@.
5432         * sim.scm (gen-ifld-extract-argvar): New proc.
5433         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
5434         with FUN-ACCESS specified.
5435         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
5436         (<hw-register>,gen-extract): New arg local?.
5437         (<hw-address>,gen-extract): Ditto.
5438         (-hw-cxmake-get): Handle non-with-scache case.
5439         (-hw-gen-set-quiet): Ditto.
5440         (<hw-address>,cxmake-get): Handle non-with-scache case.
5441         (gen-op-extract-argvar): New proc.
5442         (<operand>,gen-record-profile): Rewrite.
5443         (<operand>,gen-profile-code): Rewrite.
5444         (<unit>,gen-profile-code): Use -gen-argfld-ref.
5445         (gen-argbuf-fields-union): New proc.
5446         (gen-argbuf-type): Use it.  Handle non-scache case.
5447
5448         * *.scm: class:foo procs renamed to class-foo.
5449         * attr.scm (<attribute>): New member `for'.
5450         (-attr-parse): New first value in list for default if
5451         none specified.
5452         (non-bool-attr-list,attr:add!): Delete.
5453         (def-attr): Use current-attr-add!.
5454         (atlist-attr-value-no-default): New proc.
5455         (attr-lookup-default): Handle boolean attributes.
5456         (gen-attr-enum): New proc.
5457         (-attr-remove-meta-attrs-alist): New proc.
5458         (attr-nub): New proc.
5459         (current-attr-list-for): New proc.
5460         (current-{ifld,hw,op,insn}-attr-list): New procs.
5461         (attr-builtin!): New proc.
5462         * cpu.scm (keep-obj?): Rewrite.
5463         (-init-parse-cpu!): Call arch-init!.
5464         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
5465         (-finish-parse-cpu!): Call arch-finish!.
5466         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
5467         (def-enum,def-full-enum): Use current-enum-add!.
5468         (gen-obj-list-enums): New proc.
5469         * hardware.scm (hw:add!,hw:lookup): Delete.
5470         (def-hardware,def-hardware-ext): Use current-hw-add!.
5471         (hw:std-attrs,hw:attr-list): Delete.
5472         (hardware-builtin!): Define builtin hardware attributes.
5473         * ifield.scm (ifld:add!,ifld:lookup): Delete.
5474         (def-ifield,def-full-ifield): Use current-ifld-add!.
5475         (ifld:std-attrs,ifld:attr-list): Delete.
5476         (ifield-builtin!): New proc.
5477         * insn.scm (insn:add!,insn:lookup): Delete.
5478         (def-full-insn): Use current-insn-add!.
5479         (insn:std-attrs): Delete.
5480         (insn-builtin!): New proc.
5481         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
5482         minsn-list.
5483         (<arch-data>): New member machs.
5484         (current-attr-list,current-enum-list): New procs.
5485         (current-op-list,current-minsn-list): New procs.
5486         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
5487         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
5488         Ditto.
5489         (-parse-arch-machs): New proc.
5490         (-arch-parse): New arg machs, all callers updated.
5491         (-arch-read): Handle machs spec.
5492         (def-arch): Define MACH attribute here.
5493         (mach-init!,mach-finish!): Not here.
5494         (cpu:add!,cpu:lookup): Delete.
5495         (def-cpu): Use current-cpu-add!.
5496         (<mach>): New member bfd-name.
5497         (-mach-parse): New arg bfd-name, all callers updated.
5498         (-mach-read): Handle bfd-name spec.
5499         (mach:add!,mach:lookup): Delete.
5500         (def-mach): Use current-mach-add!.
5501         (def-mach-attr!): New proc.
5502         (arch-init!): New proc.
5503         (arch-finish!): New proc.  Reverse all object lists here.
5504         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
5505         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
5506         (define-normal-macro-insn): Ignore minsn if mach not kept.
5507         * mode.scm (mode-builtin!): New proc.
5508         * model.scm (model:add!,model:lookup): Delete.
5509         (def-model): Use current-model-add!.
5510         * opcodes.scm (insn:attr-list): Delete.
5511         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
5512         (gen-attr-table-defn): Emit value for default.
5513         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
5514         (op:attr-list): Delete.
5515         (gen-operand-decls,gen-insn-decls): New proc.
5516         (compute-insn-attr-list): Delete.
5517         (cgen-opc.h): Reorganize and simplify.
5518         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
5519         (def-operand,def-full-operand): Use current-op-add!.
5520         (op:std-attrs): Delete.
5521         (operand-enum): Delete.
5522         (operand-builtin!): Define builtin operand attrs.
5523         * utils-cgen.scm (sanitize): Update calls to lookup procs.
5524         (gen-attr-enum-decl): Use gen-obj-list-enums.
5525         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
5526         Rewrite.
5527         * fr30.cpu (define-arch): Add machs spec.
5528         (f-i4): SIGNED attribute -> !UNSIGNED.
5529         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
5530         (HASH-PREFIX): Define operand attribute.
5531         (NOT-IN-DELAY-SLOT): Define insn attribute.
5532         * i960.cpu (define-arch): Add machs spec.
5533         * m32r.cpu (define-arch): Add machs spec.
5534         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
5535         (HASH-PREFIX): Define operand attribute.
5536         (FILL-SLOT): Define insn attribute.
5537
5538 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
5539
5540         * fr30.cpu (stilm): Correct mask for and operation.
5541
5542 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
5543
5544         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
5545         Replace START/EXIT with start/pass.
5546         (gen-sim-test): Delete ".text".
5547
5548 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
5549
5550         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
5551
5552 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
5553
5554         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
5555         (h-sbit): Make it FUN-ACCESS.
5556         (h-gr): Reorder so that general regs are always printed by number.
5557
5558 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
5559
5560         * i960.cpu (flushreg): Use nop.
5561
5562 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
5563
5564         * m32r.cpu (default-alignment): Specify.
5565         * mach.scm (<arch-data>): New member default-alignment.
5566         (adata:default-alignment): New proc.
5567         (current-arch-default-alignment): New proc.
5568         (-arch-parse): New arg default-alignment.
5569         (parse-alignment): New proc.
5570         (-arch-read): Handle default-alignment spec.
5571
5572         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
5573
5574         * insn.scm (f-%): Delete.
5575         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
5576         be readded if proved useful.
5577         (gen-extract-fields): Ditto.  Use gen-ifetch.
5578         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
5579         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
5580
5581 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
5582
5583         * fr30.cpu (div2): Set zbit properly when remainder not zero.
5584
5585 1998-12-14  Dave Brolley  <brolley@cygnus.com>
5586
5587         * fr30.cpu: Remove stub macros.
5588         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
5589         (div2): Don't use addc/subc.
5590
5591 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
5592
5593         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
5594         if opcodes.
5595
5596 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
5597
5598         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
5599
5600 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
5601
5602         * cpu.scm (keep-all?): New proc.
5603         (assert-keep-all): Use it.
5604         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
5605         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
5606         Check for spelling errors.
5607
5608 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
5609
5610         * rtl.scm (s-convop): Call -rtx-sem-mode.
5611
5612 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
5613
5614         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
5615         (-parse-hw-profile): Ditto.
5616         (<hw-register>, parse!): Return `void' result.
5617         (<hw-pc>, parse!): Ditto.
5618         (<hw-memory>, parse!): Ditto.
5619         (<hw-immediate>, parse!): Ditto.
5620         (<hw-address>, parse!): Ditto.
5621
5622         * ifield.scm (-ifield-parse): Validate encode/decode fields.
5623         (-ifld-parse-encode-decode): New proc.
5624         (-ifld-parse-encode,-ifld-parse-decode): New proc.
5625         (-multi-ifield-parse): Set encode/decode to #f.
5626         (ifld:decode-mode): New proc.
5627         * utils.scm (nub): Rewrite.
5628         * operand.scm (op-nub): Rewrite.
5629         * sim.scm (<ifield>, gen-type): Rewrite.
5630         (-gen-ifld-argbuf-defn): New proc.
5631         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
5632         (<sim-hardware>): Forward gen-trace-extract onto `type'.
5633         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
5634         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
5635         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
5636         New method gen-trace-extract.
5637         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
5638         from gen-argbuf-elm, return "" if not caching register address.
5639         Rewrite gen-extract.  New method gen-trace-extract.
5640         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
5641         gen-extract, gen-trace-extract, cxmake-get.
5642         (<hw-iaddress>): New method cxmake-get.
5643         (op-needed-iflds): New proc.
5644         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
5645         (-gen-op-argbuf-defn): New proc.
5646         (gen-op-extract): Renamed from op:extract.
5647         (gen-op-trace-extract): Renamed from op:trace-extract.
5648         (fmt-extractable-operands): Renamed from fmt-semantic-operands
5649         and rewritten.
5650         (gen-argbuf-elm): Rewrite.
5651         * sim-decode.scm (-gen-record-args): Update.
5652
5653         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
5654
5655         * pmacros.scm (-pmacro-expand): Handle procedural macros in
5656         argument position.  Flag symbolic macros in function position as
5657         an error.
5658         (define-pmacro): Handle quoting in definition of symbolic macros.
5659         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
5660
5661 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
5662
5663         * fr30.opc (parse_register_list): Account for reverse masks
5664         for load and store.
5665         (print_register_list): Ditto.
5666         (parse_low_register_list_ld): New function.
5667         (parse_hi_register_list_ld): New function.
5668         (parse_low_register_list_st): New function.
5669         (parse_hi_register_list_st): New function.
5670         (print_hi_register_list_ld): New function.
5671         (print_hi_register_list_st): New function.
5672         (print_low_register_list_ld): New function.
5673         (print_low_register_list_st): New function.
5674         * fr30.cpu (ldr15dr): Implement workaround.
5675         (ldm0,ldm1,stm0,stm1): Implemented.
5676
5677 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
5678
5679         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
5680         * configure: Regenerate.
5681         * Makefile.am (WITH_HOBBIT): Update.
5682         (cgen-hob.c): Remove Makefile dependency.
5683         (cgen.o): Depend on cgen-gh.h, config.h.
5684         * Makefile.in: Regenerate.
5685         * aclocal.m4: Regenerate.
5686
5687 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
5688
5689         * i960.cpu, i960.opc: New files.
5690
5691 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
5692
5693         * fr30.opc (parse_register_number): New function.
5694         (parse_register_list): New function.
5695         (parse_low_register_list): Use parse_register_list.
5696         (parse_hi_register_list): Use parse_register_list.
5697         * fr30.cpu (sth): Fix assembler syntax. Implement more
5698         insns.
5699
5700 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
5701
5702         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
5703         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
5704         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
5705         (-op-gen-set-trace-parallel): Ditto.
5706         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
5707
5708         * fr30.cpu (call,calld): Fix setting of pc.
5709         (f-op5): Fix start bit number.
5710
5711 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
5712
5713         * fr30.cpu (st): Fix operand ordering. Implement more
5714         insns.
5715
5716 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
5717
5718         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
5719         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
5720         (fmt-semantic-operands): Move to sim.scm.
5721         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
5722         * operand.scm (<hw-index>): New member `name'.  All builders updated.
5723         (<hw-index>): New method get-name.
5724         (op-profilable?): Moved to sim.scm.
5725         (op-nub): New proc.
5726         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
5727         (op-profilable?): Moved here from operand.scm.
5728         (gen-extract-type): Delete.
5729         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
5730         (-gen-argfld-ref): New proc.
5731         (-gen-ifld-argfld-name): New proc.
5732         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
5733         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
5734         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
5735         (<hardware-base>): Delete method gen-extract-type.  New method
5736         gen-argbuf-elm.
5737         (<hw-register): Ditto.  Update method gen-extract.
5738         (<operand>, method gen-argbuf-elm): Rewrite.
5739         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
5740         (s-cmpop): Fix handling of eq,ne for unsigned modes.
5741         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
5742
5743         * sim-decode.scm (-gen-record-args): Tweak.
5744
5745         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
5746
5747 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
5748
5749         * doc/porting: Fix typo: gas->sim.
5750         * fr30.opc (print_m4): New function.
5751         * fr30.cpu: Implemented many insns.
5752
5753 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
5754
5755         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
5756
5757         * fr30.cpu (f-rel9): Delete RELOC attribute.
5758         (f-rel12): Add PCREL-ADDR attribute.
5759         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
5760         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
5761         * fr30.opc (print_label9): Delete.
5762
5763         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
5764         code for CTI indicators.
5765         * insn.scm (insn-cti?): Simplify.
5766         * utils-cgen.scm (atlist:cti?): New proc.
5767
5768 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
5769
5770         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5771         (f-i20-4,f-i20-16,f-i20): New fields.
5772         (i20): New operand.
5773         (ldi8): Implement.
5774         (ldi20): New insn.
5775         (ldi32m): Delete.
5776         (jmpd): Implement.
5777         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
5778         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
5779         * mach.scm (arch-data): Ditto.
5780         (current-arch-default-insn-word-bitsize): Renamed from
5781         current-arch-default-insn-bitsize [ya, that's a pretty long name].
5782         (-arch-read): Update.
5783
5784         * hardware.scm (hw:attr-list): Move here ...
5785         * opcodes.scm: ... from here.
5786
5787         * ifield.scm (fld:bitrange): Delete.
5788         (fld:word-offset,fld:word-length): New procs.
5789         (ifield?): Use class-instance.
5790         (<ifield>, method field-start): Rewrite.
5791         (ifld:enum): New proc.
5792         (<ifield>, methods field-mask,field-value): Rewrite.
5793         (-ifield-parse): Rewrite.
5794         (<multi-ifield> support): Rewrite.
5795         (ifld-beyond-base?): Rewrite.
5796         (ifld:std-attrs): New variable.
5797         (ifld:attr-list): New proc.
5798         * iformat.scm (-compute-insn-mask): Rewrite.
5799         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
5800         Simplify.
5801         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
5802         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
5803         onto type.
5804         (<operand>): Ditto.  Forward onto index instead.
5805         (gen-ifld-decls,gen-ifld-defns): New procs.
5806         (ifld:insert,ifld:extract): New procs.
5807         (<ifield>): New methods gen-insert, gen-extract.
5808         (<multi-ifield>): Ditto.
5809         (<hw-index>): Forward gen-insert,gen-extract onto value.
5810         (<hw-asm>): Delete insert/extract support.
5811         (<hw-register,hw-memory,hw-immediate>): Ditto.
5812         (gen-hash-defines): Use string-list.
5813         Define CGEN_MAX_IFMT_OPERANDS.
5814         (gen-switch): Use string-list,string-list-map.
5815         (gen-fget-switch,gen-fset-switch): Use string-list.
5816         (gen-parse-switch,gen-insert-switch): Ditto.
5817         (gen-extract-switch,gen-print-switch): Ditto.
5818         (gen-insert-switch,gen-extract-switch): New local `total_length'.
5819         (gen-ifmt-table-1,gen-ifmt-table): New procs.
5820         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
5821         (gen-ivalue-entry): New proc.
5822         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
5823         computation.  Use 0 for operand ref table if ALIAS insn.
5824         (gen-minsn-table-entry): Use string-list.
5825         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
5826         (gen-opcode-open): Record address of ifield table.
5827         (cgen-opc.h): Call gen-ifld-decls.
5828         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
5829         * types.scm (<bitrange>): New members word-offset,word-length.
5830         Delete member total-length.  Delete methods start,mask,value.
5831         (bitrange:word-offset,bitrange:word-length): New procs.
5832         * sim-cpu.scm (gen-define-fields): Simplify.
5833         (gen-extract-fields): Simplify.
5834         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
5835         (<ifield>): New methods gen-ifld-extract-decl.
5836         Delete method gen-ifld-extract-beyond.
5837         (<multi-ifield>): New methods gen-ifld-extract-decl.
5838         (<multi-ifield>, method gen-ifld-extract): Implement.
5839         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
5840         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
5841
5842         * rtl.scm (-rtx-traverse-no-mode): Process operands.
5843         (-rtx-traverse-syntax-no-mode): New proc.
5844         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
5845         (s-ifield): New proc.
5846         (s-shop): Don't prepend `unsigned' for unsigned modes.
5847         * rtx-funcs.scm (ifield): New rtx function.
5848         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
5849         (delay): New rtx function.
5850         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
5851
5852         * cos.scm (-elm-make-method-getter): Fix typo.
5853
5854         * utils.scm (backslash): Handle lists of strings.
5855
5856 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
5857
5858         * fr30.cpu (f-rel9): Correct for pc+2.
5859         (label9): Use print_label9.
5860         * fr30.opc (print_label9): New function.
5861
5862 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
5863
5864         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
5865         * fr30.opc (parse_low_register_list): Renamed.
5866         (parse_hi_register_list): Renamed.
5867         (print_hi_register_list): Renamed.
5868         (print_low_register_list): Renamed.
5869
5870 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
5871
5872         * fr30.cpu (f-rel9): Now a pc relative offset.
5873
5874 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
5875
5876         * opcodes.scm (op-asm): Move to here, from operands.scm.
5877         (<op-asm>, method parse!): Validate arguments.
5878         (<operand>, method gen-function-name): Fix thinko.
5879         * operand.scm (<operand>, method make!): Don't set op-asm here.
5880         * utils.scm (list-elements-ok?): New proc.
5881
5882         * opcodes.scm: Clean up pass.
5883
5884 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
5885
5886         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
5887         the fr30_int function.
5888         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
5889         (h-dr): Add FUN-ACCESS attribute.
5890
5891 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
5892
5893         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
5894         for C symbol for models array.
5895
5896 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
5897
5898         * fr30.opc (parse_reglist_low): New function.
5899         (parse_reglist_hi): New function.
5900         (print_reglist_low): New function.
5901         (print_reglist_hi): New function.
5902         * fr30.cpu: Finish remaining insn stubs.
5903
5904 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
5905
5906         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
5907
5908         * fr30.cpu (ldi32m): Don't use for disassembly.
5909
5910 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
5911
5912         * fr30.cpu (int): Implement it.
5913
5914 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
5915
5916         * rtx-funcs.scm (nop): Fix C code.
5917
5918         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
5919
5920         * fr30.cpu (f-i32): New ifield.
5921         (i32): New operand.
5922         (ldi32): New insn.
5923         (ldi32m): New macro insn.
5924         (inte): Provide simple version for now.
5925
5926         * sim-arch.scm: New file.
5927         * sim.scm: Move architecture support generation to sim-arch.scm.
5928         * cgen-sim.scm: Load sim-arch.scm.
5929         * dev.scm: Ditto.
5930
5931         * hardware.scm (pc?) New proc.
5932         (class <hardware-base>): Rewrite method 'pc?.
5933         (class <hardware>): Forward 'pc? to the hardware type.
5934         (class <hw-pc>): New method 'pc?.
5935
5936         Add support for variable length ISAs.
5937         * ifield.scm (ifld-beyond-base?): New proc.
5938         * m32r.cpu: Remove integral-insn? spec.
5939         * mach.scm (arch:derived,arch:set-derived!): New procs.
5940         (arch:app-data,arch:set-app-data!): New procs.
5941         (class <arch>): New members derived, app-data.
5942         (class <cpu>): Delete member integral-insn?.
5943         (cpu:integral-insn?): Delete.
5944         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
5945         (-cpu-read): Delete integral-insn? support.
5946         (state:decode-assist): Delete.
5947         (state:int-insn?): Delete.
5948         (<derived-arch-data>): New class.
5949         (-adata-set-derived!): New proc.
5950         (mach-finish!): Call it.
5951         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
5952         (gen-operand-instance): Add COND_REF support.
5953         (gen-operand-instance-table): Ditto.
5954         (gen-hash-defines): Update.
5955         (gen-extract-switch): Update type of `insn_value' arg.
5956         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
5957         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
5958         updated.
5959         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
5960         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
5961         beyond the base insn (for large insns).
5962         (-gen-extract-beyond-var-list): New proc.
5963         (gen-extract-fields): Handle large insns.
5964         (-gen-write-case): Update sem_arg computation.
5965         Update initial vpc computation.
5966         (gen-semantic-fn): Ditto.  Update type of `insn'.
5967         (-gen-sem-case): Update sem_arg computation.
5968         Update initial vpc computation.
5969         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
5970         (-gen-extract-word): New proc.
5971         (<ifield>): New method gen-ifld-extract-beyond.
5972         (gen-ifld-extract-beyond): New proc.
5973         * types.scm (bitrange-overlap?): New proc.
5974
5975         * utils.scm (bits->bytes): New proc.
5976         (bytes->bits): New proc.
5977
5978         Move extraction support into decoder.
5979         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
5980         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
5981         support to sim-decode.scm.
5982         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
5983         be array of IDESC,FMT entries.  Make the array const.
5984         (-gen-gcc-label-table): Make array const.
5985         (-gen-decode-switch): Branch to extraction code after insn has been
5986         identified.
5987         (-gen-decode-insn-globals): Delete extract handler from
5988         @cpu@_insn_sem.
5989         (gen-decode-fn): Add extraction support.
5990         (-gen-sem-fn-decls): Delete extraction fn decls.
5991         (-gen-idesc-decls): Update @cpu@_decode decl.
5992         (-gen-idesc-init-fn): Delete extraction support.
5993         (-gen-extract-decls): New proc.
5994
5995         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
5996         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
5997
5998         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
5999         All callers updated.
6000         (table-entry:make): Record insn value as insn object, not name.
6001         All uses updated.
6002
6003         * hobbit.scm (path_basename): Renamed from `basename' to avoid
6004         collision with C function.
6005         (path_dirname): Similarily.
6006         * hobbit.c,hobbit.h: Rebuild.
6007
6008 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
6009
6010         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
6011
6012 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
6013
6014         * fr30.cpu: Implement more instruction stubs.
6015
6016 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
6017
6018         * fr30.cpu: Implement more instruction stubs.
6019
6020 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
6021
6022         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
6023
6024         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
6025
6026         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
6027         (op:std-attrs): Ditto.
6028         * opcodes.scm (gen-operand-instance): Ditto.
6029         (gen-switch): Ditto.
6030         * m32r.cpu (condbit,accum): Update.
6031         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
6032
6033 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
6034
6035         * enum.scm (-enum-read): Fix typo.
6036
6037         * iformat.scm (-ifmt-search-key): Simplify a little.
6038
6039 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
6040
6041         * doc/porting: semantics.c -> sem.c.
6042         * Makefile.in: Regenerate.
6043         * fr30.cpu (add): Change ADD to add. Add more registers and set
6044         status bits on 'add' instruction.
6045
6046 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
6047
6048         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
6049         of 0.
6050
6051 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
6052
6053         * minsn.scm (minsn:enum): Update, call current-arch-name.
6054
6055         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
6056
6057         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
6058         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
6059         (ARCH,CGEN,CGENFLAGS): New variables.
6060         (gas-test,sim-test): New rules.
6061         * Makefile.in: Rebuild.
6062         * configure.in (arch): Define.
6063         * configure: Rebuild.
6064
6065         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
6066         * All .scm files: Ditto.
6067
6068         * dev.scm: Fix gas-test call to cpu-load.
6069         * gas-test.scm: Clean up pass to remove bit-rot.
6070         * sim-test.scm: Ditto.
6071
6072         * enum.scm (read-enum): Fix typo in `vals' handling.
6073
6074         * hardware.scm (-parse-hw-type): Fix typo.
6075         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
6076         (def-hardware,define-normal-hardware): Ditto.
6077
6078         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
6079         (display-var): Use it.
6080         * hobbit.c: Rebuild.
6081         * hobbit.h: Rebuild.
6082
6083         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
6084         avoid hobbit problem.
6085         * mach.scm (-cpu-read): Rename local `parallel-insns' to
6086         `parallel-insns-' to avoid hobbit problem.
6087
6088 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
6089
6090         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
6091         (parse_slo16,parse_ulo16): Ditto.
6092         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
6093
6094 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
6095
6096         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
6097         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
6098         * Makefile.in: Rebuild.
6099         * insn.scm (define-normal-insn): Expand pmacros.
6100         * mode.scm (<mode>): New member `host?'.  All uses updated.
6101         (mode:host?): New proc.
6102         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
6103         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
6104         (define-rtx-dual-mode): Ditto.
6105         (s-index-of): New proc.
6106         (s-unop): Use plain C for host mode operations.
6107         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
6108         * rtx-funcs.scm (index-of): New rtx function.
6109         * sim.scm (<hw-index>): New method cxmake-get.
6110
6111 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
6112
6113         * sim-cpu.scm (-gen-engine-decls): Delete.
6114
6115 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
6116
6117         * doc/rtl (Example): Correct Typo.
6118         * doc/porting: Add 'make dep' step to opcodes port instructions.
6119         * fr30.opc: New file.
6120         * fr30.cpu: New file.
6121
6122 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
6123
6124         * configure.in: Handle guile $exec_prefix = $prefix/foo.
6125         * Makefile.am (GUILEINCDIR): New variable.
6126         (INCLUDES): Use it.
6127         * configure: Regenerate.
6128         * Makefile.in: Ditto.
6129         * aclocal.m4: Ditto.
6130
6131 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
6132
6133         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
6134         (cgen-semantics.c): Ditto.
6135         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
6136         * sim-model.scm (cgen-model.c): Ditto.
6137         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
6138         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
6139
6140         * opcodes.scm (read-cpu.opc): Handle empty file.
6141
6142         * cos.scm (-elm-make-method-setter): Fix typo.
6143
6144         * cpu.scm (-init-parse-cpu!): Call types-init!.
6145         (-finish-parse-cpu!): Call types-finish!.
6146         * ifield.scm (<ifield>): Delete members start,length.
6147         New member bitrange.
6148         (<ifield>, methods field-start,field-length): Update.
6149         (fld:start): New arg insn-len.  All callers updated.
6150         (<ifield>, methods field-mask,field-value): Update.
6151         (-ifield-parse): Update.
6152         (ifield-init!): Update.
6153         * iformat.scm (compute-insn-length): Simplify.
6154         (compute-insn-mask): Update.
6155         * insn.scm (insn:value): Update.
6156         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
6157         (current-arch-default-insn-bitsize): New proc.
6158         (current-arch-insn-lsb0?): New proc.
6159         (-arch-parse,-arch-read): Update.
6160         (<cpu>): New member file-transform.
6161         (-cpu-parse,-cpu-read): Update.
6162         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
6163         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
6164         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
6165         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
6166         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
6167         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
6168         * operand.scm (op:start): Update call to field-start method.
6169         * sim-decode.scm (opcode-slots): New arg lsb0?.
6170         (fill-slot!,build-slots): Ditto.
6171         (build-decode-table-entry,build-decode-table-guts): Ditto.
6172         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
6173         (gen-decode-fn): Ditto.
6174         (cgen-decode.c): Update call to gen-decode-fn.
6175         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
6176         (-gen-cpu-header,-gen-cpuall-includes): New procs.
6177         (cgen-cpuall.h): Call -gen-cpuall-includes.
6178         * types.scm (<bitrange>): New class.
6179         (types-init!,types-finish!): New procs.
6180         * utils-cgen.scm (parse-number): New proc.
6181         (parse-boolean): New proc.
6182         * utils.scm (word-value): Renamed from shift-bits, rewrite.
6183         (word-mask): Rewrite.
6184         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
6185         (m32rxf): New field `file-transform'.
6186         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
6187
6188         * hobbit.h: Fix include file name.
6189
6190 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
6191
6192         * slib: New directory of slib files used by cgen/hobbit.
6193         * hobbit.scm: New file.
6194         * hobbit.c: New file.
6195         * hobbit.h: New file.
6196         * hobscmif.h: New file.
6197         * hob-main.c: New file.
6198         * hobslib.scm: New file.
6199         * hob.sh: New file.
6200         * Makefile.am: Add support for compiling hobbit, and using compiled
6201         version of hobbit to compile cgen.
6202         * Makefile.in: Regenerate.
6203         * configure.in: Support --with-hobbit.
6204         * configure: Regenerate.
6205         * acconfig.h (WITH_HOBBIT): Add.
6206         * config.in: Regenerate.
6207
6208         * rtl.scm: New file, was cdl-c.scm.
6209         Definition of rtx funcs moved to rtx-funcs.scm.
6210         (semantic-in-out-operands): Rewrite to compute object form of
6211         semantic code.
6212         * rtx-funcs.scm: New file.
6213
6214         * cgen-gh.c: #include "config.h".
6215         (gh_cadddr,gh_cddddr): New fns.
6216         (cgh_vector_to_list): New fn.
6217         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
6218         (cgh_init): Prefix qsort procs with "cgh-".
6219         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
6220         * cgen.c: #include "config.h".
6221
6222         * attr.scm (bitset-attr?): New proc.
6223         (<bitset-attribute>, method parse-value): Value syntax changed from
6224         (val1 val2 ...) to val1,val2,....
6225         (<bitset-attribute>): New method gen-value.
6226         (<integer-attribute>): New method gen-value.
6227         (<enum-attribute>): New method gen-value.
6228         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
6229         (<reader>): New class.
6230         (CURRENT-ARCH,CURRENT-READER): New globals.
6231         (keep-mach?): Move here from mach.scm.
6232         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
6233         (<arch>): New class.
6234         (<arch-data>): New class.
6235         (<cpu>): Make subclass of <ident>.
6236         (*ENDIAN* variables): Delete.
6237         (process-state-vars): Delete.
6238         (mach-finish!): Add `base' value to MACH attribute.
6239         * hardware.scm (<hardware>): Make subclass of <ident>.
6240         (hw:std-attrs): New global.
6241         (hw-profilable?): New proc.
6242         * ifield.scm (<ifield>): Make subclass of <ident>.
6243         (sort-ifield-list): Move here from iformat.scm.
6244         * iformat.scm (<iformat>): Renamed from <insn-format>.
6245         Make subclass of <ident>.
6246         (-ifmt-search-key): Include cti? in categorization of formats.
6247         (ifmt-analyze): Compile semantics (turn to object form).
6248         * insn.scm (<insn>): Make subclass of <ident>.
6249         New member compiled-semantics.
6250         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
6251         * mode.scm (<mode>): Make subclass of <ident>.
6252         (UBI): Delete.
6253         * model.scm (<unit>): Make subclass of <ident>.
6254         New members inputs,outputs.
6255         (<model>): Make subclass of <ident>.  New member state.
6256         (-unit-parse): Parse inputs,outputs.
6257         (<iunit>): New class.
6258         (-insn-timing-parse-model): New proc.
6259         (parse-insn-timing): Function unit spec rewritten.
6260         * operand.scm (<operand>): Make subclass of <ident>.
6261         New members sem-name,num,cond?  New method gen-pretty-name.
6262         (hw-index-scalar): New global.
6263         (op-nub-hw): Move here from rtl.scm.
6264         (op:lookup-sem-name,op-profilable?): New procs.
6265         * pmacros.scm: Rewrite to pass through hobbit.
6266         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
6267         * utils.scm (logit): Make a macro.
6268         (bit-set?): Rewrite.
6269         (high-part): Rewrite.
6270
6271         * m32r.cpu (define-arch): Move to top of file.
6272         (cpu family m32rbf): Renamed from m32rb.
6273         (model m32r/d): Function unit spec rewritten.
6274         (all insns): Ditto.  Replace UBI with BI.
6275
6276         * opcodes.scm (gen-attr-table-decls): Declare
6277         @arch@_cgen_hw_attr_table.
6278         (gen-attr-table-defns): Generate hw attribute table.
6279
6280         * sim-cpu.scm (-gen-engine-decls): New proc.
6281         (-gen-model-decls): New proc.
6282         (gen-parallel-exec-type): Add new member `written' to struct parexec.
6283         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
6284         (-gen-record-profile-args): Simplify.
6285         (-gen-parallel-sem-case): Delete.
6286         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
6287         New local `written'.  Delete profiling code.
6288         (-gen-sem-case): Ditto.
6289         (-uncond-written-mask,-any-cond-written?): New procs.
6290         (cgen-sem-switch.c): Include duplicates of insns that can be executed
6291         parallelly or serially, and write-back handlers for all parallel insns.
6292         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
6293         support to initialization of struct insn_sem.
6294         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
6295         (-gen-insn-sem-type): Add parallel write-back support to struct
6296         insn_sem.
6297         (-gen-idesc-init-fn): Add support for virtual insns.
6298         Add parallel write-back support.
6299         * sim-model.scm (gen-model-profile-fn): Delete
6300         (-gen-model-fn-decls): New proc.
6301         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
6302         (-gen-model-init-fn): New proc.
6303         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
6304         members in @mach@_init_cpu.
6305         (cgen-model.c): Generate model handlers for each insn.
6306         * sim.scm (gen-define-field-macro): Cti insns handled differently.
6307         (<hw-pc>): New method gen-write.
6308         (<hw-register>, method gen-write): New arg `mode'.
6309         (<hw-register>): Delete method gen-record-profile!.
6310         New method gen-profile-index-type.
6311         (<hw-memory>, method gen-write): New arg `mode'.
6312         (<hw-address>, method gen-extract): Delete.
6313         (<hw-address>, method gen-write): New arg `mode'.
6314         (<hw-index>, method get-write-index): Rewrite.
6315         (<pc>, method cxmake-get-direct): Delete.
6316         (<pc>): New method cxmake-get.  Comment out methods
6317         gen-set-quiet,gen-set-trace.
6318         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
6319         gen-profile-index-type,gen-profile-code.
6320         Delete method gen-pretty-name.  Rewrite method gen-write.
6321         Delete method cxmake-get-direct.
6322         (-op-gen-set-trace): Update `written'.
6323         (-op-gen-set-trace-parallel): Ditto.
6324         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
6325         (gen-cpu-insn-enum-decl): Add extra entries for parallel
6326         insns and their write-back handlers.
6327         (insn-op-lookup): New proc.
6328         (<unit>): New method gen-profile-code.
6329         (<iunit>): New method gen-profile-code.
6330         (gen-argbuf-elm): Add profiling elements.
6331         (gen-argbuf-type): Define cti insns separately in their own struct.
6332         Add member `addr_cache' to this struct.  Add entries for pbb virtual
6333         insns.  Move semantic entries here from struct scache.
6334         Delete everything from struct scache except argbuf.
6335         (<insn>, method gen-profile-locals): Rewrite.
6336         (<insn>, method gen-profile-code): Rewrite.
6337         (sim-finish!): Create virtual pbb insns.
6338
6339 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
6340
6341         * m32r.cpu (h-cr): Add bbpc,bbpsw.
6342         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
6343         (h-psw,h-bpsw,h-bbpsw): Define.
6344         (rte,trap): Handle bbpc,bbpsw.
6345         * opcodes.scm (max-operand-instances): Fix typo.
6346         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
6347         hardware elements to be fun-access.
6348         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
6349
6350 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
6351
6352         * m32r.cpu (trap): Pass `pc' to m32r_trap.
6353
6354 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
6355
6356         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
6357
6358 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
6359
6360         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
6361         architecture name.
6362         (mach m32r): Update.
6363
6364         * mach.scm (mach:supports?): New proc.
6365         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
6366         gen-reg-access-{decls,defns}.
6367         * sim.scm (gen-reg-access-{decl,defn}): New procs.
6368         (gen-mach-bfd-name): New proc.
6369         (gen-arch-reg-access-{decls,defns}): New procs.
6370         (cgen-arch.[ch]): Output register access cover fns.
6371
6372         * hardware.scm (hardware-builtin!): Set print handlers for
6373         h-addr,h-iaddr.
6374         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
6375         `od'.
6376         (CGEN_PRINT_NORMAL,print_hash): Ditto.
6377         (my_print_insn): Ditto.  Delete args buf, buflen.
6378         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
6379         (-hw-asm-specs): Add `handlers' spec.
6380         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
6381         `normal-hw-asm'.
6382         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
6383         print.
6384         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
6385         (<hw-asm>, parse!): New method.
6386         (gen-insn-table-entry): Print semantics.
6387         (gen-opcode-open): Renamed from gen-opcode-table.
6388
6389         * utils.scm (string-write): No longer a macro.
6390         (-string-write): Handle procedure args.
6391         * opcodes.scm: Update all calls to string-write.
6392         * sim-cpu.scm: Ditto.
6393         * sim-decode.scm: Ditto.
6394         * sim-model.scm: Ditto.
6395         * sim.scm: Ditto.
6396
6397 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
6398
6399         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
6400         (-gen-insn-builders,-gen-insn-builder): New procs.
6401
6402 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
6403
6404         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
6405         (gen-opcode-table): Properly terminate comment.
6406
6407 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
6408
6409         * Version 0.6.0.
6410         Clean up pass over everything, so starting fresh.