OSDN Git Service

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