Commit Graph

164 Commits

Author SHA1 Message Date
Nick Clifton 8b7197b6bc Rebuilt from latest cen files 1998-04-29 01:07:56 +00:00
Doug Evans d9e3a135fa * cpu.c,model.c,sem-switch.c,sem.c: Regenerated. Mostly comment
and variable renaming due to macro insn additions.
	* mloop.in: Update to use CGEN_INSN_NUM.
	* cpu.x,modelx.c,readx.c,semx.c: Regenerated.
	* mloopx.in: Update to use CGEN_INSN_NUM.
1998-04-27 22:42:22 +00:00
Doug Evans e926707c80 * cpu.c,model.c,sem-switch.c,sem.c: Regenerated. Mostly comment
and variable renaming due to macro insn additions.
	* mloop.in: Update to use CGEN_INSN_NUM.
	* cpu.x,modelx.c,readx.c,semx.c: Regenerated.
	* mloopx.in: Update to use CGEN_INSN_NUM.
1998-04-27 22:41:32 +00:00
Tom Tromey 5da9ce07eb * configure: Regenerated to track ../common/aclocal.m4 changes.
* config.in: Ditto.
	* acconfig.h: New file.
	* configure.in: Reverted change of Apr 24; use sinclude again.
1998-04-26 22:03:55 +00:00
Tom Tromey b1df34b9ed * configure: Regenerated to track ../common/aclocal.m4 changes.
* config.in: Ditto.
	* configure.in: Don't call sinclude.
1998-04-24 20:39:48 +00:00
Doug Evans 970a8fd6c3 * cpu.c,sem.c,sem-switch.c: Regenerate. From
- cgen/m32r.cpu (h-accum): Add attribute FUN-ACCESS.
	* m32r.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
	#include cgen-ops.h.
	* cpux.c,readx.c,semx.c: Regenerate.
	* m32rx.c (m32r_h_accum_get,m32r_h_accum_set): New functions.
	#include cgen-ops.h.  Delete inclusion of several unnecessary headers.
	(m32r_h_accums_get): Sign extend top 8 bits.
1998-04-20 23:20:22 +00:00
Doug Evans 94a5989b24 * semx.c: Regenerate.
PR 15693.
1998-04-14 21:07:45 +00:00
Doug Evans e0a85af6eb * cpu.h,decode.c,decode.h,extract.c,sem.c,sem-switch.c: Regenerate.
* cpux.h,decodex.c,decodex.h,readx.c,semx.c: Regenerate.
Main change is to remove ordinal from format names.
1998-04-11 01:26:47 +00:00
Andrew Cagney 278bda4050 Cleanup INLINE support for simulators using common framework.
Make IGEN responsible for co-ordinating inlining of generated files.
By default, aclocal.m4 disabled all inlining.
1998-04-04 12:33:11 +00:00
Doug Evans b01a8697e2 * config.in (HAVE_FCNTL_H): Add.
* configure: Regenerate.
	* Makefile.in (SIM_OBJS): Add devices.o.
	* m32r-sim.h (m32r_devices): Renamed from m32r_mspr_device.
	(UART_*): Define m32r serial port parameters.
	(M32R_DEVICE_ADDR,M32R_DEVICE_LEN): Define.
	* m32r.c (device_io_{read,write}_buffer,device_error): Move from here,
	* devices.c: To here.
	* sim-if.c: Don't include signal.h,sim-core.h.
	(sim_open): Use M32R_DEVICE_{ADDR,LEN} in sim_core_attach call.
	(sim_resume): Call sim_module_{resume,suspend}.
	* m32r.c (m32r_h_cr_{get,set}): Use register number enums.

	* tconfig.in (SIM_HANDLES_LMA): Define.

	* sim-if.c (do_trap): Result is new pc.
	Handle --environment=operating.
	* sem-switch.c,sem.c: Regenerate.
start-sanitize-m32rx
	* semx.c: Regenerate.
end-sanitize-m32rx
1998-03-15 05:15:18 +00:00
Doug Evans 599bae2187 * Makefile.in (SIM_EXTRA_DEPS): Add cpu-opc.h.
(arch.o): Delete cpu-opc.h dependency.
	(decode.o,model.o): Likewise.
	(decodex.o,modelx.o): Likewise.
1998-03-04 21:22:09 +00:00
Doug Evans 83d9ce0029 * cpu.h,model.c,sem-switch.c,sem.c: Regenerate.
* cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
1998-03-04 20:14:51 +00:00
Andrew Cagney 0e701ac37b Add generic sim-info.c:sim_info() function using module mechanism.
Clean up compile probs in mips/vr5400.
1998-02-28 02:51:06 +00:00
Doug Evans 2e7236783e * mloopx.in: Fix handling of branch in parallel with another insn.
* semx.c: Regenerate.
1998-02-27 18:24:00 +00:00
Doug Evans 02310b01ca * sim-main.h: #include symcat.h.
* m32r-sim.h (BRANCH_NEW_PC): Delete current_cpu arg.
	(NEW_PC_{BASE,SKIP,2,4,BRANCH_P}): New macros.
	* cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
	* sem.c,sem-switch.c: Regenerate.
	* m32r-sim.h (SEM_NEXT_PC): Modify to handle parallel exec.
	* mloopx.in: Rewrite.
	* cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
1998-02-23 21:36:15 +00:00
Nick Clifton 677c3439a7 Implment backup PC shadowing of CR6. 1998-02-23 20:31:19 +00:00
Doug Evans cab581557e * m32r.c (do_lock,do_unlock): Delete.
* cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
	* sem.c,sem-switch.c: Regenerate.
	* cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
1998-02-20 00:45:47 +00:00
Doug Evans b8641a4d20 * Makefile.in (M32R_OBJS): Add cpu.o.
(cpu.o): Add rule for.
	(NL_TARGET): Define.
	* configure.in: Add AC_CHECK_PROG(SCHEME).
	* cpu.c: New file.
	* cpuall.h,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
	* sem-switch.c,sem.c: Regenerate.
	* mloop.in (execute): Update call to semantic fn.
	(M32RX_OBJS): Add cpux.o.
	(cpux.o): Add rule for.
	cpux.c: New file.
	* cpux.h,decodex.c,decodex.h,modelx.c,readx.c,semx.c: Regenerate.
	* m32rx.c (m32rx_h_accums_{get,set}): Rewrite.
	(m32rx_h_cr_{get,set}): New functions.
	(m32rx_h_accums_{get,set}): New functions.
	* mloopx.in: Rewrite main loop.

	* m32r.c (do_trap): Move from here.
	* sim-if.c (do_trap): To here, and rewrite to use CB_SYSCALL support.
	(sim_create_inferior): Use h_pc_set.
	(h_pc_{get,set}): New functions.
	(h_gr_{get,set}): New functions.
	(syscall_{read,write}_mem): New functions.
	* sim-main.h (h_{gr,pc}_{get,set}): Declare.
1998-02-18 02:26:47 +00:00
Andrew Cagney fbb8b6b9ab For sim_fetch_register / sim_store_register: Add LENGTH parameter,
return actual size of register, 0 if not applicable, -1 of legacy
implementation.
1998-02-17 04:06:38 +00:00
Doug Evans 02e565a270 * sim-main.h (CIA_GET,CIA_SET): Provide dummy definitions for now. 1998-02-12 03:55:30 +00:00
Doug Evans e0bd6e186c * decode.c, decode.h, sem.c, sem-switch.c, model.c: Regenerate.
* cpux.c, decodex.c, decodex.h, readx.c, semx.c, modelx.c: Regenerate.
1998-02-12 02:54:20 +00:00
Doug Evans dc4e95adcc * decode.c, sem.c: Regenerate.
start-sanitize-m32rx
	* cpux.h, decodex.c, readx.c, semx.c: Regenerate.
	* m32rx.c (m32rx_h_accums_set): New function.
	(m32rx_model_mark_[gs]et_h_gr): New function.
	* mloopx.in: Rewrite.
	* Makefile.in (mloopx.o): Build with -parallel.
	* sim-main.h (_sim_cpu): Delete member `par_exec'.
	* tconfig.in (WITH_SEM_SWITCH_FULL): Define as 0 for m32rx.
end-sanitize-m32rx
1998-02-10 03:51:12 +00:00
Doug Evans d542677191 Sanitize m32rx from cpu.h and m32r-sim.h. 1998-02-05 21:16:08 +00:00
Doug Evans b8a9943dd4 * Makefile.in (m32r.o): Depend on cpu.h
(extract.o): Pass -DSCACHE_P.
	* mloop.in (extract{16,32}): Update call to m32r_decode.
	* arch.h,cpu.h,cpuall.h,decode.[ch]: Regenerate.
	* extract.c,model.c,sem-switch.c,sem.c: Regenerate.
	* sim-main.h: #include "ansidecl.h".
	Don't include cpu-opc.h, done by arch.h.
start-sanitize-m32rx
	* Makefile.in (M32RX_OBJS): Build m32rx support now.
	(m32rx.o): New rule.
	* m32r-sim.h (m32rx_h_cr_[gs]et): Define.
	* m32rx.c (m32rx_{fetch,store}_register): Update {get,set} of PC.
	(m32rx_h_accums_get): New function.
	* mloopx.in: Update call to m32rx_decode.  Rewrite exec loop.
	* cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
end-sanitize-m32rx
1998-02-05 21:01:06 +00:00
Andrew Cagney 412c4e940e Add config support for the size of the target address and OF cell. 1998-01-31 14:07:23 +00:00
Doug Evans d034002794 * Makefile.in (M32RX_OBJS): Comment out until m32rx port working.
* arch.h (HAVE_CPU_M32R{,X}): Delete, moved to m32r-opc.h.
	* arch.c (machs): Check ifdef HAVE_CPU_FOO for each entry.
1998-01-29 21:03:41 +00:00
Doug Evans 7649e13e67 * Makefile.in (M32RX_OBJS): Comment out until m32rx port working.
* arch.h (HAVE_CPU_M32RX): Likewise.
	* arch.c (machs): Check ifdef HAVE_CPU_FOO for each entry.
1998-01-29 19:25:37 +00:00
Doug Evans ea32bce773 sanitize m32rx piece of _sim_cpu 1998-01-23 23:03:29 +00:00
Doug Evans 84af43e37d add m32rx sanitization to tconfig.in 1998-01-23 23:01:06 +00:00
Nick Clifton 34a3df1d20 Fixed duplicate definition of h_accums field in fmt_53_sadd structure 1998-01-20 22:23:34 +00:00
Doug Evans 94188a771a Add m32rx sanitization for new files. 1998-01-20 10:43:37 +00:00
Doug Evans 8e42015266 * Makefile.in: Add m32rx objs, and rules to build them.
* cpux.h, decodex.h, decodex.c, readx.c, semx.c, modelx.c: New files.
	* m32rx.c, mloopx.in: New files.
1998-01-20 10:43:16 +00:00
Doug Evans d4feafa692 Regenerate. 1998-01-20 10:38:29 +00:00
Doug Evans 462cfbc4eb * aclocal.m4: Recognize --enable-maintainer-mode.
*/configure: Regenerated.
1998-01-20 06:37:00 +00:00
Doug Evans 2ddc0492e4 * arch-defs.h: Deleted.
* sem-switch.c: Regenerate.
1998-01-20 06:24:44 +00:00
Doug Evans 47d57be1db * cpu.h: New file. 1998-01-20 06:20:45 +00:00
Doug Evans 9d70630e0d Regenerate. 1998-01-20 06:18:51 +00:00
Doug Evans 369fba3089 * arch.c, arch.h, cpuall.h: New files.
* arch-defs.h: Deleted.
	* mloop.in: Renamed from mainloop.in.
	* sem.c: Renamed from semantics.c.
	* Makefile.in: Update.
	* sem-ops.h: Deleted.
	* mem-ops.h: Deleted.
start-sanitize-cygnus
	Add cgen support for generating files.
end-sanitize-cygnus
	(arch): Renamed from CPU.
	* decode.c: Redone.
	* decode.h: Redone.
	* extract.c: Redone.
	* model.c: Redone.
	* sem-switch.c: Redone.
	* sem.c: Renamed from semantics.c, and redone.
	* m32r-sim.h (PROFILE_COUNT_FILLNOPS): Update.
	(GETTWI,SETTWI,BRANCH_NEW_PC): Define.
	* m32r.c (WANT_CPU,WANT_CPU_M32R): Define.
	(m32r_{fetch,store}_register): New functions.
	(model_mark_{get,set}_h_gr): Prefix with m32r_.
	(m32r_model_mark_{busy,unbusy}_reg): Prefix with m32r_.
	(h_cr_{get,set}): Prefix with m32r_.
	(do_trap): Fetch state from current_cpu, not current_state.
	Call sim_engine_halt instead of engine_halt.
	* sim-if.c (alloc_cpu): New function.
	(free_state): New function.
	(sim_open): Call sim_state_alloc, and malloc space for selected cpu
	type.  Call sim_analyze_program.
	(sim_create_inferior): Handle selected cpu type when setting PC.
start-sanitize-m32rx
	(sim_resume): Handle m32rx.
end-sanitize-m32rx
	(sim_stop_reason): Deleted.
	(print_m32r_misc_cpu): Update.
start-sanitize-m32rx
	(sim_{fetch,store}_register): Handle m32rx.
end-sanitize-m32rx
	(sim_{read,write}): Deleted.
	(sim_engine_illegal_insn): New function.
	* sim-main.h: Don't include arch-defs.h,sim-core.h,sim-events.h.
	Include arch.h,cpuall.h.  Include cpu.h,decode.h if m32r.
start-sanitize-m32rx
	Include cpux.h,decodex.h if m32rx.
end-sanitize-m32rx
	(_sim_cpu): Include member appropriate cpu_data member for the cpu.
	(M32R_MISC_PROFILE): Renamed from M32R_PROFILE.
	(sim_state): Delete members core,events,halt_jmp_buf.
	Change `cpu' member to be a pointer to the cpu's struct, rather than
	record inside the state struct.
	* tconfig.in (WITH_DEVICES): Define here.
	(WITH_FAST,WITH_SEM_SWITCH_{FULL,FAST}): Define for the cpu.
1998-01-20 06:17:32 +00:00
Nick Clifton ea9cac8aee Fix typo: .syntax.name should have been .name 1998-01-16 20:19:21 +00:00
Doug Evans 62381069c9 * m32r-sim.h (MSPR_ADDR): New macro.
(m32r_mspr_device): Declare.
	(struct _devicep: Define.
	* m32r.c (m32r_mspr_device): New global.
	(device_{io_{read,write}_buffer,error}): New functions.
	* mem-ops.h (SETMEM*): Use sim_core_write_map, not read map.
	* sim-if.c: Delete redundant inclusion of cpu-sim.h.
	(sim_open): Attach device to handle MSPR register.
	* sim-main.h (WITH_DEVICES): Define as 1.
	Include cpu-sim.h.
1997-12-05 00:48:05 +00:00
Doug Evans 6e51f990a2 Regenerate configure files. 1997-12-04 17:26:06 +00:00
Doug Evans bbb9b83c5e * configure.in (SIM_AC_OPTION_ENVIRONMENT): Call.
* configure: Regenerated.
1997-12-04 02:09:26 +00:00
Doug Evans 62fb62925f * mem-ops.h: Rename SIM_SIG{ACCESS,ALIGN} to SIM_SIG{SEGV,BUS}.
* sim-if.c (sim_open): Call sim_config.
	(sim_stop_reason): Update call to sim_signal_to_host.
1997-11-19 20:18:56 +00:00
Doug Evans 590fc16693 * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS). 1997-11-18 23:46:14 +00:00
Doug Evans 084219a513 * sem-ops.h (U{DIV,MOD}[BHSD]I): Use unsigned division. 1997-10-27 20:45:56 +00:00
Andrew Cagney 92f91d1ff0 Remove need to update <targ>/Makefile.in when adding optional options
to <targ>/configure.in.
Simplify logic used to select target [default] endianness.
1997-09-23 01:25:26 +00:00
Andrew Cagney 76a6247f07 Add memory alignment config option. 1997-09-22 09:40:57 +00:00
Andrew Cagney 794e9ac96a Simplify logic behind the generic configuration option --enable-sim-alignment. 1997-09-22 02:49:57 +00:00
Andrew Cagney b45caf050c Add support for --enable-sim-alignment to simulator common aclocal.m4
Add support for --alignment={strict,nonstrict,forced} to simulator common
run-time options.
For v850 use, make the default NONSTRICT_ALIGNMENT.
1997-09-22 00:24:46 +00:00
Andrew Cagney a2ab5e65eb Update to reflect change to sim/common/aclocal.m4 (allow sim/common
directory to specify its own unqiue config.h file).
1997-09-15 08:25:04 +00:00
David Edelsohn 6fea47635b * configure: Regenerated to track ../common/aclocal.m4 changes. 1997-09-05 00:42:05 +00:00
Andrew Cagney 30efae3acd Define SIGNED64 and UNSIGNED64 macros - handle MSC/GCC LL issue. 1997-09-05 00:30:38 +00:00
Andrew Cagney a34abff813 o Add modulo argument to sim_core_attach
o	Add sim-memopt module - memory option processing.
1997-09-04 03:47:39 +00:00
Andrew Cagney 8811705410 Fix doco on enable-sim-inline. 1997-08-27 22:43:18 +00:00
Andrew Cagney fafce69ab1 Add ABFD argument to sim_create_inferior. Document.
Add file sim-hload.c - generic load for hardware only simulators.
Review each simulators sim_open, sim_load, sim_create_inferior so that
they more closely match required behavour.
1997-08-27 04:44:41 +00:00
Andrew Cagney 7230ff0faa Flush defunct sim_kill. 1997-08-26 02:05:18 +00:00
Andrew Cagney 247fccdeb5 Add ABFD argument to sim_open call. Pass through to sim_config so
that image properties such as endianness can be checked.

More strongly document the expected behavour of each of the sim_*
interfaces.

Add default endian argument to simulator config macro
SIM_AC_OPTION_ENDIAN.  Use in sim_config.
1997-08-25 23:14:25 +00:00
Andrew Cagney 50a2a69182 Watchpoint interface. 1997-05-21 06:54:13 +00:00
Andrew Cagney f03b093cd3 o Implement generic halt/restart/abort module.
Use in tic80 and d30v simulators.
o	Add signal hook to sim-core module
1997-05-19 03:42:33 +00:00
Andrew Cagney 7a418800c1 Start of implementation of a distributed (between processors)
simulator core object.
1997-05-05 13:21:04 +00:00
David Edelsohn 67ae5c9ac9 * decode.c (decode): Add computed goto support. 1997-05-03 15:41:24 +00:00
Andrew Cagney 1fe052808a Update devo version of m32r sim to build with recent sim/common changes. 1997-05-02 08:41:15 +00:00
David Edelsohn 646c6f2b83 Merge from branch into devo. CGEN generic files moved to common
directory.  K&R C support is no longer provided.
1997-05-01 22:33:23 +00:00
David Edelsohn 5c8f1c0183 Getting there ... 1996-12-17 21:08:20 +00:00