Commit Graph

2350 Commits

Author SHA1 Message Date
Chris Demetriou
9b17d183bf 2002-02-03 Chris Demetriou <cgd@broadcom.com>
* mips.igen: Fix formatting of check_fpu calls.
2002-03-04 04:14:51 +00:00
Chris Demetriou
41774c9d7b 2002-03-03 Chris Demetriou <cgd@broadcom.com>
* mips.igen (FLOOR.L.fmt): Store correct destination register.
2002-03-04 04:06:47 +00:00
Chris Demetriou
4a0bd8769a 2002-03-03 Chris Demetriou <cgd@broadcom.com>
* mips.igen: Remove whitespace at end of lines.
2002-03-04 03:19:49 +00:00
Chris Demetriou
09297648e2 2002-03-02 Chris Demetriou <cgd@broadcom.com>
* mips.igen (loadstore_ea): New function to do effective
	address calculations.
	(do_load, do_load_left, do_load_right, LL, LDD, PREF, do_store,
	do_store_left, do_store_right, SC, SCD, PREFX, SWC1, SWXC1,
	CACHE): Use loadstore_ea to do effective address computations.
2002-03-03 07:36:42 +00:00
Chris Demetriou
043b7057fd 2002-03-02 Chris Demetriou <cgd@broadcom.com>
* interp.c (load_word): Use EXTEND32 rather than SIGNEXTEND.
	* mips.igen (LL, CxC1, MxC1): Likewise.
2002-03-03 06:49:43 +00:00
Chris Demetriou
c1e8ada406 2002-03-02 Chris Demetriou <cgd@broadcom.com>
* mips.igen (LL, LLD, PREF, SC, SCD, ABS.fmt, ADD.fmt, CEIL.L.fmt,
        CEIL.W, CVT.D.fmt, CVT.L.fmt, CVT.S.fmt, CVT.W.fmt, DIV.fmt,
        FLOOR.L.fmt, FLOOR.W.fmt, MADD.D, MADD.S, MOV.fmt, MOVtf.fmt,
        MSUB.D, MSUB.S, MUL.fmt, NEG.fmt, NMADD.D, NMADD.S, NMSUB.D,
        NMSUB.S, PREFX, RECIP.fmt, ROUND.L.fmt, ROUND.W.fmt, RSQRT.fmt,
        SQRT.fmt, SUB.fmt, SWC1, SWXC1, TRUNC.L.fmt, TRUNC.W, CACHE):
        Don't split opcode fields by hand, use the opcode field values
        provided by igen.
2002-03-03 02:11:23 +00:00
Chris Demetriou
3e1dca16f2 2002-03-01 Chris Demetriou <cgd@broadcom.com>
* mips.igen (do_divu): Fix spacing.

        * mips.igen (do_dsllv): Move to be right before DSLLV,
        to match the rest of the do_<shift> functions.
2002-03-01 23:51:18 +00:00
Chris Demetriou
fff8d27d23 2002-03-01 Chris Demetriou <cgd@broadcom.com>
* mips.igen (do_dsll, do_dsllv, DSLL32, do_dsra, DSRA32, do_dsrl,
        DSRL32, do_dsrlv): Trace inputs and results.
2002-03-01 23:40:51 +00:00
Frank Ch. Eigler
ce93e51a12 * vaporous abdication 2002-03-01 21:51:21 +00:00
Chris Demetriou
0d3e762b2f 2002-03-01 Chris Demetriou <cgd@broadcom.com>
* mips.igen (CACHE): Provide instruction-printing string.

        * interp.c (signal_exception): Comment tokens after #endif.
2002-03-01 19:55:42 +00:00
Chris Demetriou
eb5fcf9324 2002-02-28 Chris Demetriou <cgd@broadcom.com>
* mips.igen (LWXC1): Mark with filter "64,f", rather than just "32".
        (MOVtf, MxC1, MxC1, DMxC1, DMxC1, CxC1, CxC1, SQRT.fmt, MOV.fmt,
        NEG.fmt, ROUND.L.fmt, TRUNC.L.fmt, CEIL.L.fmt, FLOOR.L.fmt,
        ROUND.W.fmt, TRUNC.W, CEIL.W, FLOOR.W.fmt, RECIP.fmt, RSQRT.fmt,
        CVT.S.fmt, CVT.D.fmt, CVT.W.fmt, CVT.L.fmt, MOVtf.fmt, C.cond.fmta,
        C.cond.fmtb, SUB.fmt, MUL.fmt, DIV.fmt, MOVZ.fmt, MOVN.fmt, LDXC1,
        SWXC1, SDXC1, MSUB.D, MSUB.S, NMADD.S, NMADD.D, NMSUB.S, NMSUB.D,
        LWC1, SWC1): Add "f" to filter, since these are FP instructions.
2002-03-01 07:53:46 +00:00
Chris Demetriou
bb22bd7d9e 2002-02-28 Chris Demetriou <cgd@broadcom.com>
* mips.igen (DSRA32, DSRAV): Fix order of arguments in
        instruction-printing string.
        (LWU): Use '64' as the filter flag.
2002-03-01 07:34:57 +00:00
Chris Demetriou
91a177cf81 2002-02-28 Chris Demetriou <cgd@broadcom.com>
* mips.igen (SDXC1): Fix instruction-printing string.
2002-03-01 06:40:28 +00:00
Chris Demetriou
387f484ade 2002-02-28 Chris Demetriou <cgd@broadcom.com>
* mips.igen (LDC1, SDC1): Remove mipsI model, and mark with
        filter flags "32,f".
2002-03-01 06:34:21 +00:00
Chris Demetriou
3d81f39116 2002-02-27 Chris Demetriou <cgd@broadcom.com>
* mips.igen (PREFX): This is a 64-bit instruction, use '64'
        as the filter flag.
2002-02-28 07:07:56 +00:00
Chris Demetriou
af5107af97 2002-02-27 Chris Demetriou <cgd@broadcom.com>
* mips.igen (PREFX): Tweak instruction opcode fields (i.e.,
        add a comma) so that it more closely match the MIPS ISA
        documentation opcode partitioning.
        (PREF): Put useful names on opcode fields, and include
        instruction-printing string.
2002-02-28 07:01:14 +00:00
Chris Demetriou
ca97154034 2002-02-27 Chris Demetriou <cgd@broadcom.com>
* mips.igen (check_u64): New function which in the future will
        check whether 64-bit instructions are usable and signal an
        exception if not.  Currently a no-op.
        (DADD, DADDI, DADDIU, DADDU, DDIV, DDIVU, DMULT, DMULTU, DSLL,
        DSLL32, DSLLV, DSRA, DSRA32, DSRAV, DSRL, DSRL32, DSRLV, DSUB,
        DSUBU, LD, LDL, LDR, LLD, LWU, SCD, SD, SDL, SDR, DMxC1, LDXC1,
        LWXC1, SDXC1, SWXC1, DMFC0, DMTC0): Use check_u64.

        * mips.igen (check_fpu): New function which in the future will
        check whether FPU instructions are usable and signal an exception
        if not.  Currently a no-op.
        (ABS.fmt, ADD.fmt, BC1a, BC1b, C.cond.fmta, C.cond.fmtb,
        CEIL.L.fmt, CEIL.W, CxC1, CVT.D.fmt, CVT.L.fmt, CVT.S.fmt,
        CVT.W.fmt, DIV.fmt, DMxC1, DMxC1, FLOOR.L.fmt, FLOOR.W.fmt, LDC1,
        LDXC1, LWC1, LWXC1, MADD.D, MADD.S, MxC1, MOV.fmt, MOVtf,
        MOVtf.fmt, MOVN.fmt, MOVZ.fmt, MSUB.D, MSUB.S, MUL.fmt, NEG.fmt,
        NMADD.D, NMADD.S, NMSUB.D, NMSUB.S, RECIP.fmt, ROUND.L.fmt,
        ROUND.W.fmt, RSQRT.fmt, SDC1, SDXC1, SQRT.fmt, SUB.fmt, SWC1,
        SWXC1, TRUNC.L.fmt, TRUNC.W): Use check_fpu.
2002-02-28 02:57:34 +00:00
Chris Demetriou
1c47a468ec 2002-02-27 Chris Demetriou <cgd@broadcom.com>
* mips.igen (do_load_left, do_load_right): Move to be immediately
        following do_load.
        (do_store_left, do_store_right): Move to be immediately following
        do_store.
2002-02-27 22:46:35 +00:00
Chris Demetriou
603a98e7a1 2002-02-27 Chris Demetriou <cgd@broadcom.com>
* mips.igen (mipsV): New model name.  Also, add it to
        all instructions and functions where it is appropriate.
2002-02-27 21:52:52 +00:00
Andrew Cagney
080fe24b58 Fix PR gdb/287. From wiz at danbala. Then->than and typos. 2002-02-25 02:13:10 +00:00
Keith Seitz
b3ba81f8ee * armos.c (SWIWrite0): Use generic host_callback mechanism
for supported OS functions "open", "close", "write", etc.
	(SWIopen): Likewise.
	(SWIread): Likewise.
	(SWIwrite): Likewise.
	(SWIflen): Likewise.
	(ARMul_OSHandleSWI): Likewise.
2002-02-21 20:22:49 +00:00
Chris Demetriou
c5d00cc701 2002-02-18 Chris Demetriou <cgd@broadcom.com>
* mips.igen: For all functions and instructions, list model
        names that support that instruction one per line.
2002-02-19 08:10:44 +00:00
Chris Demetriou
074e9cb865 2002-02-11 Chris Demetriou <cgd@broadcom.com>
* mips.igen: Add some additional comments about supported
        models, and about which instructions go where.
        (BC1b, MFC0, MTC0, RFE): Sort supported models in the same
        order as is used in the rest of the file.
2002-02-11 23:35:07 +00:00
Chris Demetriou
9805e2294e 2002-02-11 Chris Demetriou <cgd@broadcom.com>
* mips.igen (ADD, ADDI, DADDI, DSUB, SUB): Add comment
        indicating that ALU32_END or ALU64_END are there to check
        for overflow.
        (DADD): Likewise, but also remove previous comment about
        overflow checking.
2002-02-11 22:49:45 +00:00
Chris Demetriou
f701dad2ba 2002-02-10 Chris Demetriou <cgd@broadcom.com>
* mips.igen (DDIV, DIV, DIVU, DMULT, DMULTU, DSLL, DSLL32,
        DSLLV, DSRA, DSRA32, DSRAV, DSRL, DSRL32, DSRLV, DSUB, DSUBU,
        JALR, JR, MOVN, MOVZ, MTLO, MULT, MULTU, SLL, SLLV, SLT, SLTU,
        SRAV, SRLV, SUB, SUBU, SYNC, XOR, MOVtf, DI, DMFC0, DMTC0, EI,
        ERET, RFE, TLBP, TLBR, TLBWI, TLBWR): Tweak instruction opcode
        fields (i.e., add and move commas) so that they more closely
        match the MIPS ISA documentation opcode partitioning.
2002-02-11 06:13:49 +00:00
Chris Demetriou
20ae00985d 2002-02-10 Chris Demetriou cgd@sibyte.com
* mips.igen (ADDI): Print immediate value.
        (BREAK): Print code.
        (DADDIU, DSRAV, DSRLV): Print correct instruction name.
        (SLL): Print "nop" specially, and don't run the code
        that does the shift for the "nop" case.
2002-02-11 02:19:38 +00:00
Chris Demetriou
6439295f61 2002-02-10 Chris Demetriou <cgd@broadcom.com>
* callback.c: Fix some spelling errors.
        * hw-device.h: Likewise.
        * hw-tree.c: Likewise.
        * sim-abort.c: Likewise.
        * sim-alu.h: Likewise.
        * sim-core.h: Likewise.
        * sim-events.c: Likewise.
        * sim-events.h: Likewise.
        * sim-fpu.h: Likewise.
        * sim-profile.h: Likewise.
        * sim-utils.c: Likewise.
2002-02-10 23:11:37 +00:00
Nick Clifton
72ca629fe1 Document check-in procedures 2002-02-07 09:09:13 +00:00
Nick Clifton
c17aa31873 Modify previous patch so that it is only triggered for COFF format executables. 2002-02-05 11:22:26 +00:00
Nick Clifton
25180f8aef If a v5 architecture is detected, assume it might be an XScale binary, since
there is no way to distinguish between    the two in the COFF file format.
2002-02-04 16:27:22 +00:00
Andrew Cagney
b78bd0bd68 Revert sh64 changes. Accidently committed. 2002-02-02 04:48:32 +00:00
Ben Elliston
cbb38b47b3 * Contribute Hitachi SH5 simulator. 2002-02-01 11:44:32 +00:00
Hans-Peter Nilsson
dea03d4e10 * cgen-ops.h (ADDCQI, ADDCFQI, ADDOFQI, SUBCQI, SUBCFQI, SUBOFQI):
New functions.
2002-01-31 17:55:16 +00:00
Ben Elliston
1636f0bbeb 2002-01-20 Ben Elliston <bje@redhat.com>
* sim-fpu.h (SIM_FPU_IS_QNAN): Replace "Quite" with "Quiet" in
	the comment for this enumerator.
2002-01-20 04:09:23 +00:00
Ben Elliston
b59d44decf 2002-01-14 Ben Elliston <bje@redhat.com>
* sim-fpu.h: Fix comment about sim_fpu_* constants.
2002-01-14 02:47:59 +00:00
Matthew Green
43c4bab055 * Makefile.in (tmp-igen): Pass -I $(srcdir) to igen.
* igen.c (main): Change -I to add include paths for :include:
files.
Implement -G as per sim/igen, with just gen-icache=N support.
Call load_insn_table() with the built include path.

* ld-insn.c (parse_include_entry): New. Load an :include: file.
(load_insn_table): New `includes' argument.  Look for :include:
entries and call parse_include_entry() for them.
(main): Adjust load_insn_table() call.
* ld-insn.h (model_include_fields): New enum.
(load_insn_table): Update prototype.
* table.c (struct _open_table, struct _table): Rework
structures to handle included files.
(table_push): Move the guts of table_open() here.

* table.c (struct _open table, struct table): Make table object an
indirect ptr to the current table file.
(current_line, new_table_entry, next_line): Make file arg type
open_table.
(table_open): Use table_push.
(table_entry_read): Point variable file at current table, at eof, pop
last open table.

* misc.h (NZALLOC): New macro. From sim/igen.

* table.h, table.c (table_push): New function.
2002-01-12 10:21:12 +00:00
Nick Clifton
00125dd034 Add myself as ARM sim maintainer 2002-01-10 11:15:35 +00:00
Nick Clifton
57165fb4bb Fix parameters passed to CPRead[13] and CPRead[14]. 2002-01-10 11:14:57 +00:00
Nick Clifton
86c735a526 General format tidy ups 2002-01-09 15:08:21 +00:00
Nick Clifton
272fcdcd59 Fix bug detected by GDB testsuite - when fetching registers more than 4
bytes wide return 0 for the other bytes.
2002-01-09 14:59:22 +00:00
Matthew Green
5c8844646d * bits.c (LSMASKED64): New inline function.
(LSEXTRACTED64): Likewise.
* bits.h (_LSB_POS, _LSMASKn, LSMASK64): New macros from
sim/common/sim-bits.h
(LSMASKED64, LSEXTRACTED64): New functions definitions.
* Makefile.in (sim-bits.o): Remove target.

* main.c (zalloc): Fix typo in error message.
2002-01-04 00:00:54 +00:00
Kazu Hirata
280b26c033 * run.c (usage): Fix a typo. 2001-12-21 00:47:18 +00:00
Kazu Hirata
de9b1892f5 * compile.c: Fix formatting. 2001-12-20 17:36:23 +00:00
Kazu Hirata
2ea716f649 * compile.c: Fix comment typos. 2001-12-20 16:47:52 +00:00
Andrew Cagney
3a11ea24fc Don't try to link in sim-bits.o. 2001-12-16 21:00:08 +00:00
Matthew Green
de46f45f87 * main.c: Include "defs.h", "bfd.h", "callback.h" and "remote-sim.h".
(sim_io_error): New function.
	* sim_calls.c: (sim_io_error): New function.
2001-12-15 05:08:44 +00:00
Ben Elliston
c9b2b0e016 s/cygnus.com/redhat.com/ 2001-12-15 04:51:01 +00:00
Matthew Green
d29d5195ca * support sim-fpu.c for correct FP emulation.
* Makefile.in (LIB_OBJ): Add @sim_fpu@.
	(ICACHE_CFLAGS, SEMANTICS_CFLAGS): New variables.
	(icache.o, semantics.o): Add new ICACHE_FLAGS & SEMANTICS_FLAGS.
	(sim-fpu.o, sim-bits.o, tconfig.h): New targets.
	* configure.in: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS.  Add a
	check for sim/common/sim-fpu.c.  Output sim_fpu and sim_fpu_cflags.
	* configure: Regenerate.
	* device.h (device_find_integer_array_property): Match function definition.
	* gen-icache.c (print_icache_internal_function_declaration): Rename
	INLINE_ICACHE to PSIM_INLINE_ICACHE.
	* gen-idecode.c (print_idecode_run_function_header): Rename INLINE_IDECODE
	to PSIM_INLINE_IDECODE.
	* gen-semantics.c (print_semantic_function_header): Rename
	EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS.
	* gen-support.c (print_support_function_name): Rename INLINE_SUPPORT to
	PSIM_INLINE_SUPPORT.
	* igen.c (print_function_name): Also escape `(' and `)'.
	(gen_semantics_h): Rename EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS.
	(gen_semantics_c): Likewise.  Also output includes for "sim-fpu.h"
	* inline.h (INLINE_SIM_ENDIAN): Renamed INLINE_PSIM_ENDIAN.
	(EXTERN_SIM_ENDIAN): Renamed EXTERN_PSIM_ENDIAN.
	(STATIC_INLINE_SIM_ENDIAN): Renamed STATIC_INLINE_PSIM_ENDIAN.
	(INLINE_LOCALS): Renamed PSIM_INLINE_LOCALS.
	(EXTERN_SUPPORT): Renamed PSIM_EXTERN_SUPPORT.
	(INLINE_SUPPORT): Renamed PSIM_INLINE_SUPPORT.
	(EXTERN_SEMANTICS): Renamed PSIM_EXTERN_SEMANTICS.
	(INLINE_SEMANTICS): Renamed PSIM_INLINE_SEMANTICS.
	(EXTERN_IDECODE): Renamed PSIM_EXTERN_IDECODE.
	(INLINE_IDECODE): Renamed PSIM_INLINE_IDECODE.
	(EXTERN_ICACHE): Renamed PSIM_EXTERN_ICACHE.
	(INLINE_ICACHE): Renamed PSIM_INLINE_ICACHE.
	* options.c (options_inline): Fix names.
	* sim-endian-n.h: Change INLINE_SIM_ENDIAN to INLINE_PSIM_ENDIAN.
	* sim-endian.h: Likewise.
	* sim-main.h: New file.
	* std-config.h: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS.
2001-12-14 00:22:13 +00:00
Andrew Cagney
7ef2d4e783 * Makefile.in (simops.h, table.c): Delete targets.
(tmp-gencode, gencode.o, gencode): Delete targets.
(simops.h): New file.
($(BUILT_SRC_FROM_IGEN)): Do not depend on simops.h.
* gencode.c: Delete file.
2001-12-02 19:27:29 +00:00
Andrew Cagney
6654b4ae11 From Mark Peek.
* ppc-spr-table: Add SDA and PIR.
2001-12-01 18:56:36 +00:00
Fred Fish
9e52972e45 2001-11-17 Fred Fish <fnf@redhat.com>
* sim-main.h (float_operation): Move enum declaration outside
	of _sim_cpu struct declaration.
2001-11-18 06:00:29 +00:00
Ben Harris
6746a76a70 2001-11-16 Ben Harris <bjh21@netbsd.org>
* Makefile.in (armemu32.o): Replace $< with autoconf recommended
	$(srcdir)/....
	(armemu26.o): Ditto.
2001-11-16 18:56:01 +00:00
Andrew Cagney
bebd2b3536 when #size-cells is zero, don't expect a size. 2001-11-14 19:54:59 +00:00
Dave Brolley
378af1d671 2001-11-14 Dave Brolley <brolley@redhat.com>
* arch.c: Regenerate.
	* arch.h: Regenerate.
	* cpu.c: Regenerate.
	* cpu.h: Regenerate.
	* cpuall.h: Regenerate.
	* cpux.c: Regenerate.
	* cpux.h: Regenerate.
	* decode.c: Regenerate.
	* decode.h: Regenerate.
	* decodex.c: Regenerate.
	* decodex.h: Regenerate.
	* model.c: Regenerate.
	* modelx.c: Regenerate.
	* sem-switch.c: Regenerate.
	* sem.c: Regenerate.
	* semx-switch.c: Regenerate.
2001-11-14 19:51:40 +00:00
Dave Brolley
3e43c635d5 2001-11-14 Dave Brolley <brolley@redhat.com>
* arch.c: Regenerate.
	* arch.h: Regenerate.
	* cpu.c: Regenerate.
	* cpu.h: Regenerate.
	* cpuall.h: Regenerate.
	* decode.c: Regenerate.
	* decode.h: Regenerate.
	* model.c: Regenerate.
	* sem-switch.c: Regenerate.
	* sem.c: Regenerate.
2001-11-14 19:50:01 +00:00
Andrew Cagney
560ba567a0 Chirp fixes:
* hw_htab.c (htab_map_binary): Don't try to map the text section
when it is empty.
* emul_chirp.c (map_over_chirp_note): Default load-base to -1 not
CHIRP_LOAD_BASE.
(emul_chirp_create): Map in the interrupt table.
2001-10-26 04:37:54 +00:00
Andrew Cagney
457174f645 Enable PowerPC simulator on native linux and netbsd. 2001-10-20 00:16:44 +00:00
Nick Clifton
ff44f8e352 Add support for XScale's coprocessor access check register.
Fix formatting.
2001-10-18 12:20:49 +00:00
John R. Moore
962b3eada2 Removed a section of code that didn't do anything, but left values in
memory. This was labeled as a hack to set r0/r1 with argc/argv.
2001-08-02 00:50:38 +00:00
Ben Elliston
f18ee7ef71 2001-07-31 Ben Elliston <bje@redhat.com>
* lib/sim-defs.exp (run_sim_test): Include a description such as
	"assembling" or "linking" that identifies the phase a test fails
	in, for easier analysis of failures.
2001-07-31 04:59:59 +00:00
Stephane Carrez
eefde3513e * dv-m68hc11eepr.c (m68hc11eepr_info): Fix print of current write
address.
	(m68hc11eepr_port_event): Fix detach/attach logic.
2001-07-28 19:19:05 +00:00
Stephane Carrez
00d0c012ef * Makefile.in (SIM_OBJS): Remove sim-resume.o
* interp.c (sim_resume): New function from sim-resume.c, install
	the stepping event after having processed the pending ticks.
	(has_stepped): Likewise.
	(sim_info): Produce an output only if verbose or STATE_VERBOSE_P.
2001-07-22 12:33:58 +00:00
Andrew Cagney
bf1bef8f1c Regenerate using autoconf 2.13. 2001-07-18 06:20:29 +00:00
Daniel Jacobowitz
54cfd411af Makefile.in: Add dependencies on $(CPU_H). 2001-07-16 18:36:37 +00:00
Andrew Cagney
b51c76031a * Makefile.in (gencode): Provide explicit path to gencode.c. 2001-07-10 22:46:59 +00:00
Ben Elliston
e3e473dacc 2001-07-05 Ben Elliston <bje@redhat.com>
* Make-common.in (srccgen): Remove.
	(CGEN_CPU_DIR): Define.
	(CGEN_READ_SCM): Redefine without $(srccgen).
	(CGEN_ARCH_SCM): Ditto.
	(CGEN_CPU_SCM): Ditto.
	(CGEN_DECODE_SCM): Ditto.
	(CGEN_DESC_SCM): Ditto.

	* $arch/Makefile.in: Use $(CGEN_CPU_DIR) where applicable.
2001-07-05 13:51:26 +00:00
Stephane Carrez
81e09ed832 Improve HC11 simulator to support HC12 2001-05-20 15:40:27 +00:00
Stephane Carrez
11115521f6 * dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for
pending interrupts.
	* interrupts.c (interrupts_process): Keep track of the last number
	of masked insn cycles.
	(interrupts_initialize): Clear last number of masked insn cycles.
	(interrupts_info): Report them.
	(interrupts_update_pending): Compute clear and set masks of
	interrupts and clear the interrupt bits before setting them
	(due to SCI interrupt sharing).
	* interrupts.h (struct interrupts): New members last_mask_cycles
	and xirq_last_mask_cycles.
2001-05-20 15:36:29 +00:00
Nick Clifton
fb7a8ef0df Fix handling of XScale LDRD and STRD instructions with post indexed addressing modes. 2001-05-11 21:51:07 +00:00
Andrew Cagney
d448180670 Don't loose last block during a dma. 2001-05-10 17:48:10 +00:00
Nick Clifton
dac07255f9 Check Mode not Bank in order to determine rocesor mode. 2001-05-08 08:28:28 +00:00
Jim Blandy
ff88f59d5a *** empty log message *** 2001-05-07 06:10:25 +00:00
Jim Blandy
be5fcb106b * mn10300.igen: Doc fixes. 2001-05-07 04:52:00 +00:00
Alexandre Oliva
cc274e7c27 * Makefile.in (idecode.o, op_utils.o, semantics.o, simops.o):
Depend on targ-vals.h.
2001-04-26 19:23:16 +00:00
Frank Ch. Eigler
2836ee25d9 * thanks, nickc
2001-04-25  Frank Ch. Eigler  <fche@redhat.com>

	* sim-load.c (sim_load_file): Put it back [...]
2001-04-25 21:14:28 +00:00
Andrew Cagney
5b77812558 Revert call to bfd_cache_close(). 2001-04-21 22:50:55 +00:00
Frank Ch. Eigler
6ec9f4a9be * bug fix
2001-04-19  Frank Ch. Eigler  <fche@redhat.com>

	* sim-utils.c (sim_analyze_program): Call bfd_cache_close after
	we're finished with its immediate use.
	* sim-load.c (sim_load_file): Ditto.
2001-04-19 20:59:30 +00:00
Matthew Green
c3ae2f98d0 * XScale coprocessor support.
2001-04-18  matthew green  <mrg@redhat.com>

	* armcopro.c (write_cp15_reg): Set CHANGEMODE if endianness changes.
	(read_cp15_reg): Make non-static.
	(XScale_cp15_LDC): Update for write_cp15_reg() change.
	(XScale_cp15_MCR): Likewise.
	(XScale_cp15_write_reg): Likewise.
	(XScale_check_memacc): New function. Check for breakpoints being
	activated by memory accesses.  Does not support the Branch Target
	Buffer.
	(XScale_set_fsr_far): New function. Set FSR and FAR for XScale.
	(XScale_debug_moe): New function. Set the debug Method Of Entry,
	if configured.
	(write_cp14_reg): Reset count counter if requested.
	* armdefs.h (struct ARMul_State): New members `LastTime' and
	`CP14R0_CCD' used for the timer/counters.
	(ARMul_CP13_R0_FIQ, ARMul_CP13_R0_IRQ, ARMul_CP13_R8_PMUS,
	ARMul_CP14_R0_ENABLE, ARMul_CP14_R0_CLKRST, ARMul_CP14_R0_CCD,
	ARMul_CP14_R0_INTEN0, ARMul_CP14_R0_INTEN1, ARMul_CP14_R0_INTEN2,
	ARMul_CP14_R0_FLAG0, ARMul_CP14_R0_FLAG1, ARMul_CP14_R0_FLAG2,
	ARMul_CP14_R10_MOE_IB, ARMul_CP14_R10_MOE_DB, ARMul_CP14_R10_MOE_BT,
	ARMul_CP15_R1_ENDIAN, ARMul_CP15_R1_ALIGN, ARMul_CP15_R5_X,
	ARMul_CP15_R5_ST_ALIGN, ARMul_CP15_R5_IMPRE, ARMul_CP15_R5_MMU_EXCPT,
	ARMul_CP15_DBCON_M, ARMul_CP15_DBCON_E1, ARMul_CP15_DBCON_E0): New
	defines for XScale registers.
	(XScale_check_memacc, XScale_set_fsr_far, XScale_debug_moe): Prototype.
	(ARMul_Emulate32, ARMul_Emulate26): Clean up function definition.
	(ARMul_Emulate32): Handle the clock counter and hardware instruction
	breakpoints.  Call XScale_set_fsr_far() for software breakpoints and
	software interrupts.
	(LoadMult): Call XScale_set_fsr_far() for data aborts.
	(LoadSMult): Likewise.
	(StoreMult): Likewise.
	(StoreSMult): Likewise.
	* armemu.h (write_cp15_reg): Update prototype.
	* arminit.c (ARMul_NewState): Initialise CP14R0_CCD and LastTime.
	(ARMul_Abort): If XScale, check for FIQ and IRQ being enabled in CP13
	register 0.
	* armvirt.c (GetWord): Call XScale_check_memacc().
	(PutWord): Likewise.
2001-04-18 16:39:37 +00:00
J.T. Conklin
d4424adaef * Makefile.in (simops.o): Add simops.h to dependency list. 2001-04-15 19:57:10 +00:00
Jim Blandy
c0efbca4a3 * mips.igen (CFC1, CTC1): Pass the correct register numbers to
PENDING_FILL.  Use PENDING_SCHED directly to handle the pending
set of the FCSR.
* sim-main.h (COCIDX): Remove definition; this isn't supported by
PENDING_FILL, and you can get the intended effect gracefully by
calling PENDING_SCHED directly.
2001-04-12 14:53:20 +00:00
Nick Clifton
3cf84db9ef Do not enable alignment checking when loading unaligned thumb instructions. 2001-03-20 17:48:02 +00:00
Frank Ch. Eigler
764f1408a3 * mmap support for common simulators
2001-03-16  Frank Ch. Eigler  <fche@redhat.com>

	Add support for mmap-based memory regions.
	* sim-memopt.c (mmap_next_fd): New global.
	(sim_memory_init): Reinitialize it.
	(OPTION_MEMORY_MAPFILE, memory_option_handler): Support new
	"--memory-mapfile FILE" option.  Check for some errors.
	(do_memopt_add): Conditionally do mmap instead of malloc for
	backing store of simulated memory.  Check for more errors.
	(do_simopt_delete, sim_memory_uninstall): Corresponding cleanup.
	* sim-memopt.h (munmap_length): New member of _sim_memopt.
	* configure.in: Look for mmap/fstat related functions and headers.
	* config.in, configure: Regenerated.
2001-03-20 17:13:39 +00:00
Frank Ch. Eigler
35c209920b * tweak
2001-03-15  Frank Ch. Eigler  <fche@redhat.com>

	* sim-core.c (sim_core_map_attach): Correct overlap-related
	error messages.
2001-03-16 03:20:26 +00:00
Andrew Cagney
1e6cd1593b Link with libintl, needed by libopcodes. 2001-03-14 21:51:31 +00:00
Michael Meissner
f6bb7a3bb0 Remove reference to alloca-conf.h 2001-03-07 20:19:41 +00:00
Nick Clifton
4f3c3dbb37 Fix BLX(1) for Thumb 2001-03-06 22:33:47 +00:00
Andrew Cagney
c663138840 Fixes for NetBSD 1.5. NetBSD has been renumbering/renaming its
SYS_* interfaces.
2001-03-05 16:22:45 +00:00
Dave Brolley
55552082e8 2001-03-05 Dave Brolley <brolley
arch.c: Regenerate.
        arch.h: Regenerate.
        cpu.c: Regenerate.
        cpu.h: Regenerate.
        cpuall.h: Regenerate.
        cpux.c: Regenerate.
        cpux.h: Regenerate.
        decode.c: Regenerate.
        decode.h: Regenerate.
        decodex.c: Regenerate.
        decodex.h: Regenerate.
        model.c: Regenerate.
        modelx.c: Regenerate.
        sem-switch.c: Regenerate.
        sem.c: Regenerate.
        semx-switch.c: Regenerate.
2001-03-05 16:05:38 +00:00
Dave Brolley
52fa932eab 2001-03-05 Dave Brolley <brolley@
* arch.c: Regenerate.
        * arch.h: Regenerate.
        * cpu.c: Regenerate.
        * cpu.h: Regenerate.
        * cpuall.h: Regenerate.
        * decode.c: Regenerate.
        * decode.h: Regenerate.
        * model.c: Regenerate.
        * sem-switch.c: Regenerate.
        * sem.c: Regenerate.
2001-03-05 16:00:17 +00:00
Nick Clifton
917bca4f21 Add support for disabling alignment checks when performing GDB interface
calls or SWI emulaiton routines.  (Alignment checking code has not yet been
contributed).
2001-02-28 01:04:24 +00:00
Ben Elliston
fb891446b7 2001-02-23 Ben Elliston <bje@redhat.com>
* sim-main.h (ENGINE_ISSUE_PREFIX_HOOK): Only define if not
	already defined elsewhere.
2001-02-24 02:43:11 +00:00
Ben Elliston
01816cd804 2001-02-22 Ben Elliston <bje@redhat.com>
* sim-trace.h (TRACE_VPU_IDX): Add.
	(TRACE_vpu): Define.
	(WITH_TRACE_VPU_P): Likewise.
	(TRACE_VPU_P): Likewise.
	* sim-trace.c (OPTION_TRACE_VPU): Define.
	(trace_options): Add --trace-vpu.
	(trace_option_handler): Handle OPTION_TRACE_VPU.
	(trace_option_handler): Include VPU tracing in --trace-semantics.
	(trace_idx_to_str): Handle TRACE_VPU_IDX.
2001-02-22 20:47:49 +00:00
Ben Elliston
44a9331cdf 2001-02-21 Ben Elliston <bje@redhat.com>
* sim-trace.h (TRACE_BRANCH_INPUT1): New macro.
	(TRACE_BRANCH_INPUT2): Likewise.
2001-02-21 21:35:41 +00:00
Ben Elliston
8030f85769 2001-02-19 Ben Elliston <bje@redhat.com>
* sim-main.h (sim_monitor): Return an int.
	* interp.c (sim_monitor): Add return values.
	(signal_exception): Handle error conditions from sim_monitor.
2001-02-19 21:57:03 +00:00
Nick Clifton
2ef048fc9f Remove Prefetch abort for breakpoints. Instead set the state to RESUME. 2001-02-16 22:04:22 +00:00
Ben Elliston
9afc4bbfbb 2001-02-16 Ben Elliston <bje@redhat.com>
* MAINTAINERS: Add myself for common portions.
2001-02-15 23:03:41 +00:00
Ben Elliston
c43ad8eb1e * profiling bug fixes.
2001-02-09  Ben Elliston  <bje@redhat.com>

	* (profile_print_pc): Write header out in target byte order.

2001-02-09  Ben Elliston  <bje@redhat.com>

	* sim-profile.c (profile_pc_init): Correct bug in loop logic when
	adjusting the pc shift value.
2001-02-15 21:14:40 +00:00
Nick Clifton
44e23e575b Add code to preserve processor mode when a prefetch
abort is signalled after processing a breakpoint.
2001-02-15 02:38:15 +00:00
Nick Clifton
5f7d0a33db Reset processor into ARM mode for any machine type except the early ARMs. 2001-02-14 22:21:20 +00:00
Nick Clifton
94ab9d7b9e remove spurious whitespace 2001-02-14 03:55:57 +00:00
Nick Clifton
1e5d4e465c Prevent Aborts from happening whilst emulating a SWI 2001-02-14 03:50:46 +00:00
Nick Clifton
179ae6ea64 Fix definition of NEGBRANCH 2001-02-12 23:29:49 +00:00
Chris Demetriou
56b48a7a9b 2001-02-08 Ben Elliston <bje@redhat.com>
* sim-main.c (load_memory): Pass cia to sim_core_read* functions.
        (store_memory): Likewise, pass cia to sim_core_write*.
2001-02-08 05:22:04 +00:00
DJ Delorie
ddcd33c11d * i960-desc.c: Update all the A macro definitions to the new
stdc-sensitive versions that cgen would have used.
2001-02-07 01:16:05 +00:00
Nick Clifton
fae0bf59e6 Add parentheses ready for future conbtribution 2001-02-01 20:56:35 +00:00
Nick Clifton
dda308f5fd Update base address register after restoring register bank. 2001-02-01 20:39:51 +00:00
Jonathan Larmour
42acc51e30 * Makefile.in (gencode): Link with libopcodes in build tree rather
than building source files from there.
2001-02-01 06:56:29 +00:00
Nick Clifton
88694af3f9 Detect installation of SWI vector by running program as well as loading program. 2001-02-01 00:14:40 +00:00
Alexandre Oliva
de0492b6fb * interp.c (sim_create_inferior): Record program arguments for
later inspection by the trap handler.
(count_argc): New function.
(prog_argv): Declare static.
(sim_write): Declare.
(trap): Implement argc, argnlen and argn system calls. Do not
abort on unknown system calls--simply return -1.
* syscall.h (SYS_argc, SYS_argnlen, SYS_argn): Define.
2001-01-30 23:03:56 +00:00
Alexandre Oliva
554064594b * interp.c (trap): Implement time. 2001-01-24 13:17:01 +00:00
Geoffrey Keating
428e1889bc * emul_netbsd.c (do_open): Translate the flag parameter to the
open syscall to the numbers supported by the host.
2001-01-15 23:24:30 +00:00
Chris Demetriou
0b8c7076b5 * MAINTAINERS: Added self and Andrew for the mips sim. 2001-01-15 19:16:57 +00:00
Ben Elliston
badd2b1e70 * Tidy. 2001-01-15 00:23:00 +00:00
Frank Ch. Eigler
9397fcbf1c * configury fix
[common/ChangeLog]
2001-01-12  Chris Demetriou  <cgd@sibyte.com>

	* aclocal.m4 (SIM_AC_OPTION_SCACHE): Properly
	handle the case where a numeric value is supplied.

[eg. m32r/ChangeLog]
2001-01-12  Frank Ch. Eigler  <fche@redhat.com>

	* configure: Regenerated with sim_scache fix.
2001-01-12 18:51:28 +00:00
Ben Elliston
63fe103861 2001-01-06 Ben Elliston <bje@redhat.com>
* cgen.sh: Allow extrafiles to include the semantics files when
	generating an ISA-specific decoder.
2001-01-05 04:36:09 +00:00
Alexandre Oliva
b6f6b44d62 * Make-common.in (sim-io.o): Depend on targ-vals.h. 2000-12-27 17:47:20 +00:00
Ben Elliston
ad8707b58d 2000-12-23 Ben Elliston <bje@redhat.com>
* cgen-trace.c (trace_result): Handle 'f' type operands; output
	them to the trace stream using sim_fpu_printn_fpu. Include
	"sim-fpu.h".
2000-12-23 21:52:14 +00:00
Ben Elliston
b94c096644 2000-12-15 Ben Elliston <bje@redhat.com>
* sim-fpu.h (sim_fpu_printn_fpu): Declare.
	* sim-fpu.c (print_bits): Add digits parameter. Print only as many
	trailing digits as specified (-1 to print all digits).
	(sim_fpu_print_fpu): New wrapper around sim_fpu_printn_fpu.
	(sim_fpu_printn_fpu): Rename from sim_fpu_print_fpu; update calls
	to print_bits ().
2000-12-23 11:51:04 +00:00
Nick Clifton
ac1c9d3aad Fix test for StoreDouble Instruction. 2000-12-19 00:58:04 +00:00
Ben Elliston
fd5d712edf 2000-12-13 Ben Elliston <bje@redhat.com>
* cgen.sh: Set prefix/PREFIX (append ISA if applicable). Factor
	sed expressions into $sedscript, substituting @prefix@/@PREFIX@.
	(defs): New action.
2000-12-13 22:55:54 +00:00
Geoffrey Keating
4c15ccf7af In sim/common:
* sim-endian.h: Don't have parameters on macro definitions which
	are simply renaming functions, to permit use of XCONCAT2 in both
	the macro name and the arguments in a use of such a definition.
In sim/ppc:
	* sim-endian.h: Don't have parameters on macro definitions which
	are simply renaming functions, to permit use of XCONCAT2 in both
	the macro name and the arguments in a use of such a definition.
2000-12-12 20:54:13 +00:00
Ben Elliston
0d277f51d0 2000-12-11 Ben Elliston <bje@redhat.com>
* cgen-ops.h (SUBWORDDFDI): New function.
2000-12-11 07:14:34 +00:00
Nick Clifton
9a6b6a66b7 Add 0x91 as an FPE SWI. 2000-12-11 03:08:17 +00:00
Michael Chastain
7c721b2a2a 2000-11-15 Jim Blandy <jimb@redhat.com>
* sim_calls.c: Doc fix.
	(sim_fetch_register, sim_store_register): Call
	gdbarch_register_name directly, instead of going through
	REGISTER_NAME macro.
2000-12-08 01:52:41 +00:00
Nick Clifton
df38a86eec oops - remove redundant prototype introduced in previous delta 2000-12-08 01:39:48 +00:00
Nick Clifton
760a7bbec5 Add emulation of double word load and store instructions. 2000-12-08 01:38:47 +00:00
Ben Elliston
c79688eb6e 2000-12-05 Ben Elliston <bje@redhat.com>
* Make-common.in (cgen-defs): New target.
	(cgen-decode): Pass $(EXTRAFILES).
2000-12-05 00:56:44 +00:00
Ben Elliston
bb4e03e555 2000-12-05 Ben Elliston <bje@redhat.com>
* genmloop.sh: Use @prefix@, not @cpu@ throughout. Add -prefix and
	-outfile-suffix options.
2000-12-05 00:46:04 +00:00
Ben Elliston
6227bc851d 2000-12-04 Ben Elliston <bje@redhat.com>
* cgen-ops.h (SUBWORDSIQI): Mask off top bits.
	(SUBWORDSIUQI): Likewise.
	(SUBWORDDIHI): Likewise.
	(SUBWORDDIQI): New function.
2000-12-04 04:05:45 +00:00
Ben Elliston
76440e4ba0 2000-12-04 Ben Elliston <bje@redhat.com>
* cgen-trace.c (disassemble_insn): Remove unused declaration.
	* cgen-scache.c (scache_option_handler): Remove unused local var.
2000-12-04 00:57:57 +00:00
Nick Clifton
7f53bc3526 Suppress support of DEMON swi's in XScale mode. 2000-12-03 23:28:46 +00:00
Ben Elliston
cdc2a5c395 2000-12-03 Ben Elliston <bje@redhat.com>
* sim-profile.c (profile_option_handler): Remove unused prof_nr.
2000-12-03 04:23:54 +00:00
Nick Clifton
f1129fb8ff Add support for ARM's v5TE architecture and Intel's XScale extenstions 2000-11-30 01:55:12 +00:00
Nick Clifton
2a1aa0e97c Add GNU Free Documentation License 2000-11-30 01:54:16 +00:00
Stephane Carrez
4e73b9c108 Fix delete_hw_event_data() to free the scheduled events 2000-11-27 19:53:35 +00:00
Stephane Carrez
ce9bc8d1f1 Remove space == 0 restriction in the simulator (dv-core) 2000-11-27 19:49:46 +00:00
Stephane Carrez
b93775f586 Preliminary support for 68HC12 2000-11-26 21:41:31 +00:00
Stephane Carrez
639aa4f72f Register a delete handler for 68HC11 core device node 2000-11-26 20:53:11 +00:00
Stephane Carrez
ce13044d7a Fix for sim/common hw_delete()/hw_tree_delete() 2000-11-25 09:18:52 +00:00
Stephane Carrez
7c070881e4 Fix memory leak in sim_parse_args 2000-11-25 09:16:22 +00:00
Stephane Carrez
6e73e7ed64 Fix device memory allocation in 68hc11 simulator 2000-11-24 20:53:35 +00:00
Ben Elliston
4f49fa1bf0 2000-11-20 Ben Elliston <bje@redhat.com>
* cgen-ops.h (SUBBI): New macro.
	(SUBWORDSIQI, SUBWORDSIHI, SUBWORDSIUQI): New functions.
	(SUBWORDDIHI, SUBWORDDIUQI, SUBWORDDIDF): Likewise.
2000-11-19 22:27:14 +00:00
Greg McGary
fec7d8b0e7 * Makefile.in: remove `@true' commands for rules that have
$(CGEN_MAINT) as a prerequisite.
2000-11-18 09:08:59 +00:00
Ben Elliston
2d84da1b7c 2000-11-16 Ben Elliston <bje@redhat.com>
* cgen-types.h (VOID): New type.
2000-11-16 03:21:48 +00:00
Ben Elliston
dbc168afd2 2000-11-09 Ben Elliston <bje@redhat.com>
* sim-fpu.c (sim_fpu_one): Set exponent to 0.
	(sim_fpu_two): Set exponent to 1.
2000-11-08 23:19:45 +00:00
Ben Elliston
620abd4dfd * Spelling corrections. 2000-11-08 23:12:43 +00:00
Dave Brolley
0ab7df8a89 2000-11-01 Dave Brolley <brolley@cygnus.com>
* lib/sim-defs.exp (run_sm_test): Correct comment. "output" and
	"xerror" options do not use a list of machines. Clear options from
	previous test case. Use "$cpu_option"  to identify the machine to the
	assembler, if specified.
2000-11-01 15:40:35 +00:00
Elena Zannoni
e4f5c43e77 2000-10-26 Ben Elliston <bje@redhat.com>
* cgen.sh: Handle an isa argument between cpu and mach. Default to
        `all'. Pass `-i' options to cgen applications.
        * Make-common.in (cgen-arch, cgen-cpu, cgen-decode, cgen-cpu-decode,
        cgen-desc): Pass $(isa) to cgen.sh.
2000-10-26 16:21:34 +00:00
Geoffrey Keating
c56a7a95d1 * MAINTAINERS: Added self and Andrew for the ppc sim. 2000-10-25 18:18:41 +00:00
Geoffrey Keating
ae02957b46 * ppc-instructions (lfsux): Correct XO field of lfsux instruction. 2000-10-24 16:16:43 +00:00