OSDN Git Service

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