Commit Graph

2359 Commits

Author SHA1 Message Date
Alexandre Oliva 66210567f0 * armemu.c (ARMul_Emulate, t_undefined): Proceed to next insn. 2000-07-04 06:54:48 +00:00
Alexandre Oliva e063aa3bd8 * armemu.h (INSN_SIZE): New macro.
(SET_ABORT): Save CPSR in SPSR and set LR.
* armemu.c (ARMul_Emulate, isize): Set to INSN_SIZE.
(WriteR15, WriteSR15): Do not discard bit 1 in Thumb mode.
* arminit.c (ARMul_Abort): Use new SETABORT and INSN_SIZE.
2000-07-04 06:52:30 +00:00
Alexandre Oliva 13b6dd6f68 * armemu.c (LoadSMult): Use WriteR15() to discard the least
significant bits of PC.
2000-07-04 06:39:39 +00:00
Alexandre Oliva 892c6b9d8f * armemu.h (WRITEDESTB): New macro.
* armemu.c (ARMul_Emulate26, bl): Use WriteR15Branch() to
modify PC.  Moved the existing logic...
(WriteR15Branch): ... here.  New function.
(WriteR15, WriteSR15): Drop the two least significant bits.
(LoadSMult): Use WriteR15Branch() to modify PC.
(LoadMult): Use WRITEDESTB() instead of WRITEDEST().
2000-07-04 06:35:36 +00:00
Alexandre Oliva cf52c765b0 * armemu.h (GETSPSR): Call ARMul_GetSPSR().
* armsupp.c (ARMul_CPSRAltered): Zero out bits as they're
extracted from state->Cpsr, but preserve the unused bits.
(ARMul_GetCPSR): Get bits preserved in state->Cpsr.
(ARMul_GetSPSR, ARMul_FixCPSR): Use ARMul_GetCPSR() to
get the full CPSR word.
2000-07-04 06:19:29 +00:00
Alexandre Oliva 4ef2594f4e * armemu.h (PSR_FBITS, PSR_SBITS, PSR_XBITS, PSR_CBITS): New.
(SETPSR_F, SETPSR_S, SETPSR_X, SETPSR_C): New macros.
(SETPSR, SET_INTMODE, SETCC): Removed.
* armsupp.c (ARMul_FixCPSR, ARMul_FixSPSR): Do not test bit
mask.  Use SETPSR_* to modify PSR.
(ARMul_SetCPSR): Load all bits from value.
* armemu.c (ARMul_Emulate, msr): Do not test bit mask.
2000-07-04 06:06:30 +00:00
Alexandre Oliva e62263b8ec * armemu.c (ARMul_Emulate): Compute writeback value before
loading, since the offset register may be the destination
register.
2000-07-04 05:30:43 +00:00
Alexandre Oliva b0eae074ca * armdefs.h (SYSTEMBANK): Define as USERBANK.
* armsupp.c (ARMul_SwitchMode): Remove SYSTEMBANK cases.
2000-07-04 05:16:20 +00:00
Andrew Cagney 6c29acca43 TIc80 simulator. 2000-07-04 05:00:54 +00:00
Andrew Cagney 80ee11fa0e Fix MOVN.fmt and MOVZ.fmt, need to test GPR[RT]. 2000-07-04 02:32:58 +00:00
Frank Ch. Eigler 7fb283bce2 * verbosity reduction
2000-06-23  Frank Ch. Eigler  <fche@redhat.com>

	* cgen-trace.h (TRACE_USEFUL_MASK): Remove TRACE_EVENTS_IDX.
2000-06-24 14:47:54 +00:00
Frank Ch. Eigler ab42ee127d * build cleanliness fix
2000-06-24  Frank Ch. Eigler  <fche@redhat.com>

	From Maciej W. Rozycki <macro@ds2.pg.gda.pl>:
	* Makefile.in (distclean): Clean cconfig.h also.
2000-06-24 14:37:57 +00:00
Andrew Cagney 673388c077 Fix printf arguments. 2000-06-23 12:39:41 +00:00
Alexandre Oliva f9c22bc3a4 * armemu.c (Multiply64): Fix computation of flag N. 2000-06-22 20:42:34 +00:00
Alexandre Oliva ee9a777240 * armemu.c (MultiplyAdd64): Fix computation of flag N. 2000-06-22 20:03:32 +00:00
Frank Ch. Eigler 97ee9e5aa9 * build fix
2000-06-20  Frank Ch. Eigler  <fche@redhat.com>

	* compile.c: Don't include "wait.h".
	(sim_resume): Use local SIM_WIFEXITED and SIM_WIFSIGNALED macros
	instead of WIF* from host.
2000-06-20 21:12:33 +00:00
Alexandre Oliva fe47e8dfd3 * armemu.h (NEGBRANCH): Do not overwrite the two most significant
bits of the offset.
2000-06-20 09:36:12 +00:00
Nick Clifton bcd6576654 Add strongarm tests 2000-06-19 00:56:04 +00:00
Frank Ch. Eigler 98ecb0a78b * "Dont" -> "Don't"
2000-06-13  Frank Ch. Eigler  <fche@redhat.com>

	* compile.c, writecode.c: Correct typo.
2000-06-13 20:32:01 +00:00
Jeff Law 0ef9643e5e 2000-06-13 Kazu Hirata <kazu@hxi.com>
* compile.c: Fix formatting.
2000-06-13 19:54:56 +00:00
Joern Rennecke 2532761bdf sh-dsp support, simulator speedup by using host byte order:
* Makefile.in (interp.o): Depends on ppi.c .
	(ppi.c): New rule.
	* gencode.c (printonmatch, think, genopc): Deleted.
	(MAX_NR_STUFF): Now 42.
	(tab): Add SH-DSP CPU instructions.
	Amalgamate ldc / stc / lds / sts instructions with similar
	bit patterns.  Fix opcodes of stc Rm_BANK,@-<REG_N>.
	Fix semantics of lds.l @<REG_N>+,MACH (no sign extend).
	(movsxy_tab): New array.
	For movs, change MMMM field to GGGG, and mmmm field to MMMM.
	Added entries for movx, movy and parallel processing insns.
	(ppi_tab): New array.
	(qfunc): Stabilize sort.
	(expand_opcode): Handle [01][01]NN, [01][01]xx and [01][01]yy.
	Handle 'M', 'G' 's' 'X', 'a', 'Y' and 'A'.
	(dumptable): Now takes three arguments.  Changed all callers.
	Emit just one contigous jump table.
	(filltable): Now takes an argument.  Changed all callers.
	Make index static.
	(ppi_moves, expand_ppi_code, ppi_filltable, ppi_gensim): New functions.
	(gensim_caselist): New function, broken out of gensim.
	Handle opcode fields 'x', 'y', 's', 'M', 'G', 'X', 'a', and 'Y'.
	Handle ref '9'.
	(gensim): Handle 'N' in code field and '8' in refs field.
	Call gensim_caselist - twice.
	(ppi_index): New static variable.
	(main): Unsupport default action.
	Add dsp support for -x / -s option.  Add -p option.
	* interp.c (sh_jump_table, sh_dsp_table, ppi_table): Declare.
	(saved_state_type): Rearrange to allow amalgamated ldc / stc /
	lds / sts to work efficiently.
	(target_dsp): New static variable.
	(GBR, VBR, SSR, SPC, MACH, MACL): Reflect saved_state_type change.
	(FPUL, Rn_BANK, SET_Rn_BANK, M, Q, S, T, SR_BL, SR_RB): Likewise.
	(SR_MD, SR_RC, SET_SR_BIT, GET_SR, SET_RC, GET_FPSCR): Likewise.
	(RS, RE, MOD, MOD_ME, DSP_R): Likewise.
	(set_fpscr1): Likewise.  Use target_dsp to check for dsp.
	(MOD_MSi, SIG_BUS_FETCH): Deleted.
	(CREG, SREG, PR, SR_MASK_DMY, SR_MASK_DMX, SR_DMY): New macros.
	(SR_DMX, DSR, MOD_DELTA, GET_DSP_GRD): Likewise.
	(SET_MOD): Reflect saved_state_type change.  Set MOD_DELTA instead
	of MOD_MS, and encode SR_DMY / SR_DMX into high word of MOD_ME.
	(set_sr): Reflect saved_state_type change.  Fix SR_RB handling.
	Use SET_MOD.
	(MA, L, TL, TB): Now controlled by ACE_FAST.
	(SEXT32): Just cast to int.
	(SIGN32): Fixed to only shift by 31.
	(CHECK_INSN_PTR): SIGBUS at insn fetch now represented by insn_end 0.
	(ppi_insn): Declare.
	(ppi.c): Include.
	(init_dsp): Set target_dsp.  When it changes, switch end of
	sh_jump_table with sh_dsp_table.
	(sim_resume) Don't declare sh_jump_table0.  Use sh_jump_table instead.
	Don't Declare PR if it's #defined.
	Fix single-stepping (Was broken in Mar  6 16:59:10 patch).
	(sim_store_register, sim_read_register): Translate accesses to
	reflect saved_state_type change.

	* interp.c (set_sr): Set sr.
	(SET_RC, MOD, MOD_MS, MOD_ME, SET_MOD, MOD_MS, MOD_ME): New macros.
	(set_fpscr1): Don't bank-switch fpu registers when simulating sh-dsp.
	(DSP_R): Fix definition.
	(sim_resume): Remove outdated SET_SR use.

	* interp.c (saved_state): New members for struct member asregs:
	rs, re, insn_end, xram_start, yram_start.
	(struct loop_bounds): New struct.
	(SKIP_INSN): New macro.
	(get_loop_bounds): New function.
	(endianw): Renamed to global_endianw.
	(maskw): negated bits.
	(PC): Now insn_ptr.
	(SR_MASK_RC, SR_RC_INCREMENT, SR_RC, RAISE_EXCEPTION): New macros.
	(RS, RE, DSP_R, DSP_GRD, A1, A0, X0, X1, Y0, Y1, M0, A1G): Likewise.
	(M1, A0G, RIAT, PT2H, PH2T, SET_NIP, CHECK_INSN_PTR): Likewise.
	(SIG_BUS_FETCH): Likewise
	(raise_exception, riat_fast): New functions.
	(raise_buserror, sim_stop): Use raise_exception.
	(PROCESS_SPECIAL_ADDRESS): Use xram_start / yram_start.
	(BUSERROR, WRITE_BUSERROR, READ_BUSERROR):
	Reverse sense of mask argument.
	(FP_OP, set_dr): Use RAISE_EXCEPTION.
	(wlat_fast, wwat_fast, wbat_fast, rlat_fast, rwat_fast, rbat_fast):
	Declare.  Remove redundant masking.
	(wwat_fast, rwat_fast): Add argument endianw.  Changed callers.
	(MA): Updated for change pc -> PC.
	(Delay_Slot): Use RIAT.
	(empty): Deleted.
	(trap): Remove argument little_endian.  Add argument endianw.
	Changed all callers.  Use raise_exception.
	(macw): Add argument endainw.  Changed all callers.
	(init_dsp): New function, extended after broken out of init_pointers.
	(sim_resume): Replace pc with insn_ptr.  Replace little_endian with
	endianw.  Replace nia with nip.  Reverse sense of maskb / maskw /
	maskl.  Implement logic for zero-overhead loops.  Don't try to
	interpret garbage when getting a SIGBUS at insn fetch.
	(sim_open): Call init_dsp.
	* gencode.c (tab): Use SET_NIP instead of nia = .  Use PH2T / PT2H /
	RAISE_EXCEPTION where appropriate.
	Add extra cycles for brai, braf , bsr, bsrf, jmp, jsr.

	* interp.c (sim_store_register, sim_fetch_register):
	Do proper endianness switch.

	* interp.c (saved_state_type): New members for struct member asregs:
	xymem_select, xmem, ymem, xmem_offset, ymem_offset.
	(special_address): Delete.
	(BUSERROR): Now a two-argument predicate.
	(PROCESS_SPECIAL_ADDRESS, WRITE_BUSERROR, READ_BUSERROR): New macros.
	(wlat_little, wwat_little, wbat_any, wlat_big, wwat_big): Delete.
	(process_wlat_addr, process_wwat_addr): New functions.
	(process_wbat_addr, process_rlat_addr, process_rwat_addr): Likewise.
	(process_rbat_addr): Likewise.
	(wlat_fast, wwat_fast, wbat_fast): Use WRITE_BUSERROR.
	(rlat_little, rwat_little, rbat_any, rlat_big, rwat_big): Delete.
	(rlat_fast, rwat_fast, rbat_fast): Use READ_BUSERROR.
	(RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Delete SLOW versions.
	(do_rdat, trap): Delete SLOW code.
	(SEXT32, SIGN32): New macros.
	(swap, swap16): Now integer in - integer out.  Changed all callers.
	(strswaplen, strnswap): Delete SLOW versions.
	(init_pointers): Initialize dsp memory selection (preliminary).
	(sim_store_register, sim_fetch_register): Use swap instead of
	big / little endian read / write functions.

	* interp.c (maskl): Deleted.
	(endianw, endianb): New variables.
	(special_address): Now inline.
	(bp_holder): Put raising of buserror there, rename to:
	(raise_buserror).
	(BUSERROR): Now yields a value.  Changed all users.
	(wbat_big): Delete.
	(wlat_fast, wwat_fast, wbat_fast): New functions.
	(rlat_fast, rwat_fast, rbat_fast): Likewise.
	(RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Use new functions.
	(do_rdat, do_wdat): Likewise.  Take maskl argument instead of
	little_endian one.  Changed caller macros.
	(swap, swap16): Use w[rw]lat_big / w[rw]lat_little directly.
	(strswaplen, strnswap): New functions.
	(trap): Use them to fix up endian mismatches;
	disable SYS_execve and SYS_execv; fix double address translation for
	SYS_pipe and SYS_stat.
	(sym_write, sym_read): Add endianness translation.
	(sym_store_register, sym_fetch_register): Add maskl local variable.
	(sim_open): Set endianw and endianb.
2000-06-07 14:59:16 +00:00
Nick Clifton 896ad91016 Remove illegal instruciton pattern, since it is the same as the breakpoint
pattern.
2000-05-30 18:36:57 +00:00
Nick Clifton c1a72ffdd6 Add support for v4 SystemMode. 2000-05-30 17:13:37 +00:00
Nick Clifton 4c0deff44c Define GPR_CLEAR 2000-05-29 19:38:39 +00:00
Nick Clifton 67f5c7ef0f fix spelling mistake in comment 2000-05-29 19:35:50 +00:00
Nick Clifton 33ae44dea2 Remove RCS tags to make synchronisation easier. 2000-05-29 19:34:13 +00:00
Nick Clifton 86e0da7a81 Use GPR_CLEAR instead of GPR_SET 2000-05-29 19:28:53 +00:00
Nick Clifton f23b768a5c replace GPR_SET with GPR_CLEAR 2000-05-29 19:26:48 +00:00
Nick Clifton ceec355905 minor formatting tweaks to aid syncronisation 2000-05-29 19:05:41 +00:00
Andrew Cagney eb2d80b469 Change profiling so that it is enabled by default. Re-generate everything. 2000-05-24 04:39:50 +00:00
Nick Clifton 3463c3fbbb Add special case handling when GDB set CPSR register 2000-05-23 23:52:46 +00:00
Andrew Cagney 781c552e2d sigrc wasn't initialized before being passed to sim_resume(). 2000-05-23 11:34:27 +00:00
Alexandre Oliva e33c036475 * am33.igen: Fix leading comments of SP-relative offset insns that
referred to other registers.  Make their offsets unsigned.
2000-05-22 20:34:09 +00:00
Alexandre Oliva 24a39d88a2 * mn10300_sim.h (genericAdd, genericSub, genericCmp, genericOr,
genericXor, genericBtst): Use `unsigned32'.
* op_utils.c: Likewise.
* mn10300.igen, am33.igen: Use `unsigned32', `signed32',
`unsigned64' or `signed64' where type width is relevant.
2000-05-18 22:56:28 +00:00
Joern Rennecke 63978407cb sh-dsp support, simulator speedup by using host byte order:
sim:
	* Makefile.in (interp.o): Depends on ppi.c .
	(ppi.c): New rule.
	* gencode.c (printonmatch, think, genopc): Deleted.
	(MAX_NR_STUFF): Now 42.
	(tab): Add SH-DSP CPU instructions.
	Amalgamate ldc / stc / lds / sts instructions with similar
	bit patterns.  Fix opcodes of stc Rm_BANK,@-<REG_N>.
	Fix semantics of lds.l @<REG_N>+,MACH (no sign extend).
	(movsxy_tab): New array.
	For movs, change MMMM field to GGGG, and mmmm field to MMMM.
	Added entries for movx, movy and parallel processing insns.
	(ppi_tab): New array.
	(qfunc): Stabilize sort.
	(expand_opcode): Handle [01][01]NN, [01][01]xx and [01][01]yy.
	Handle 'M', 'G' 's' 'X', 'a', 'Y' and 'A'.
	(dumptable): Now takes three arguments.  Changed all callers.
	Emit just one contigous jump table.
	(filltable): Now takes an argument.  Changed all callers.
	Make index static.
	(ppi_moves, expand_ppi_code, ppi_filltable, ppi_gensim): New functions.
	(gensim_caselist): New function, broken out of gensim.
	Handle opcode fields 'x', 'y', 's', 'M', 'G', 'X', 'a', and 'Y'.
	Handle ref '9'.
	(gensim): Handle 'N' in code field and '8' in refs field.
	Call gensim_caselist - twice.
	(ppi_index): New static variable.
	(main): Unsupport default action.
	Add dsp support for -x / -s option.  Add -p option.
	* interp.c (sh_jump_table, sh_dsp_table, ppi_table): Declare.
	(saved_state_type): Rearrange to allow amalgamated ldc / stc /
	lds / sts to work efficiently.
	(target_dsp): New static variable.
	(GBR, VBR, SSR, SPC, MACH, MACL): Reflect saved_state_type change.
	(FPUL, Rn_BANK, SET_Rn_BANK, M, Q, S, T, SR_BL, SR_RB): Likewise.
	(SR_MD, SR_RC, SET_SR_BIT, GET_SR, SET_RC, GET_FPSCR): Likewise.
	(RS, RE, MOD, MOD_ME, DSP_R): Likewise.
	(set_fpscr1): Likewise.  Use target_dsp to check for dsp.
	(MOD_MSi, SIG_BUS_FETCH): Deleted.
	(CREG, SREG, PR, SR_MASK_DMY, SR_MASK_DMX, SR_DMY): New macros.
	(SR_DMX, DSR, MOD_DELTA, GET_DSP_GRD): Likewise.
	(SET_MOD): Reflect saved_state_type change.  Set MOD_DELTA instead
	of MOD_MS, and encode SR_DMY / SR_DMX into high word of MOD_ME.
	(set_sr): Reflect saved_state_type change.  Fix SR_RB handling.
	Use SET_MOD.
	(MA, L, TL, TB): Now controlled by ACE_FAST.
	(SEXT32): Just cast to int.
	(SIGN32): Fixed to only shift by 31.
	(CHECK_INSN_PTR): SIGBUS at insn fetch now represented by insn_end 0.
	(ppi_insn): Declare.
	(ppi.c): Include.
	(init_dsp): Set target_dsp.  When it changes, switch end of
	sh_jump_table with sh_dsp_table.
	(sim_resume) Don't declare sh_jump_table0.  Use sh_jump_table instead.
	Don't Declare PR if it's #defined.
	Fix single-stepping (Was broken in Mar  6 16:59:10 patch).
	(sim_store_register, sim_read_register): Translate accesses to
	reflect saved_state_type change.

	* interp.c (set_sr): Set sr.
	(SET_RC, MOD, MOD_MS, MOD_ME, SET_MOD, MOD_MS, MOD_ME): New macros.
	(set_fpscr1): Don't bank-switch fpu registers when simulating sh-dsp.
	(DSP_R): Fix definition.
	(sim_resume): Remove outdated SET_SR use.

	* interp.c (saved_state): New members for struct member asregs:
	rs, re, insn_end, xram_start, yram_start.
	(struct loop_bounds): New struct.
	(SKIP_INSN): New macro.
	(get_loop_bounds): New function.
	(endianw): Renamed to global_endianw.
	(maskw): negated bits.
	(PC): Now insn_ptr.
	(SR_MASK_RC, SR_RC_INCREMENT, SR_RC, RAISE_EXCEPTION): New macros.
	(RS, RE, DSP_R, DSP_GRD, A1, A0, X0, X1, Y0, Y1, M0, A1G): Likewise.
	(M1, A0G, RIAT, PT2H, PH2T, SET_NIP, CHECK_INSN_PTR): Likewise.
	(SIG_BUS_FETCH): Likewise
	(raise_exception, riat_fast): New functions.
	(raise_buserror, sim_stop): Use raise_exception.
	(PROCESS_SPECIAL_ADDRESS): Use xram_start / yram_start.
	(BUSERROR, WRITE_BUSERROR, READ_BUSERROR):
	Reverse sense of mask argument.
	(FP_OP, set_dr): Use RAISE_EXCEPTION.
	(wlat_fast, wwat_fast, wbat_fast, rlat_fast, rwat_fast, rbat_fast):
	Declare.  Remove redundant masking.
	(wwat_fast, rwat_fast): Add argument endianw.  Changed callers.
	(MA): Updated for change pc -> PC.
	(Delay_Slot): Use RIAT.
	(empty): Deleted.
	(trap): Remove argument little_endian.  Add argument endianw.
	Changed all callers.  Use raise_exception.
	(macw): Add argument endainw.  Changed all callers.
	(init_dsp): New function, extended after broken out of init_pointers.
	(sim_resume): Replace pc with insn_ptr.  Replace little_endian with
	endianw.  Replace nia with nip.  Reverse sense of maskb / maskw /
	maskl.  Implement logic for zero-overhead loops.  Don't try to
	interpret garbage when getting a SIGBUS at insn fetch.
	(sim_open): Call init_dsp.
	* gencode.c (tab): Use SET_NIP instead of nia = .  Use PH2T / PT2H /
	RAISE_EXCEPTION where appropriate.
	Add extra cycles for brai, braf , bsr, bsrf, jmp, jsr.

	* interp.c (sim_store_register, sim_fetch_register):
	Do proper endianness switch.

	* interp.c (saved_state_type): New members for struct member asregs:
	xymem_select, xmem, ymem, xmem_offset, ymem_offset.
	(special_address): Delete.
	(BUSERROR): Now a two-argument predicate.
	(PROCESS_SPECIAL_ADDRESS, WRITE_BUSERROR, READ_BUSERROR): New macros.
	(wlat_little, wwat_little, wbat_any, wlat_big, wwat_big): Delete.
	(process_wlat_addr, process_wwat_addr): New functions.
	(process_wbat_addr, process_rlat_addr, process_rwat_addr): Likewise.
	(process_rbat_addr): Likewise.
	(wlat_fast, wwat_fast, wbat_fast): Use WRITE_BUSERROR.
	(rlat_little, rwat_little, rbat_any, rlat_big, rwat_big): Delete.
	(rlat_fast, rwat_fast, rbat_fast): Use READ_BUSERROR.
	(RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Delete SLOW versions.
	(do_rdat, trap): Delete SLOW code.
	(SEXT32, SIGN32): New macros.
	(swap, swap16): Now integer in - integer out.  Changed all callers.
	(strswaplen, strnswap): Delete SLOW versions.
	(init_pointers): Initialize dsp memory selection (preliminary).
	(sim_store_register, sim_fetch_register): Use swap instead of
	big / little endian read / write functions.

	* interp.c (maskl): Deleted.
	(endianw, endianb): New variables.
	(special_address): Now inline.
	(bp_holder): Put raising of buserror there, rename to:
	(raise_buserror).
	(BUSERROR): Now yields a value.  Changed all users.
	(wbat_big): Delete.
	(wlat_fast, wwat_fast, wbat_fast): New functions.
	(rlat_fast, rwat_fast, rbat_fast): Likewise.
	(RWAT, RLAT, RBAT, WWAT, WLAT, WBAT): Use new functions.
	(do_rdat, do_wdat): Likewise.  Take maskl argument instead of
	little_endian one.  Changed caller macros.
	(swap, swap16): Use w[rw]lat_big / w[rw]lat_little directly.
	(strswaplen, strnswap): New functions.
	(trap): Use them to fix up endian mismatches;
	disable SYS_execve and SYS_execv; fix double address translation for
	SYS_pipe and SYS_stat.
	(sym_write, sym_read): Add endianness translation.
	(sym_store_register, sym_fetch_register): Add maskl local variable.
	(sim_open): Set endianw and endianb.

gdb:

	* sh-tdep.c (sh_dsp_reg_names, sh3_dsp_reg_names): New arrays.
	(sh_processor_type_table): Add entries for bfd_mach_sh_dsp and
	 bfd_mach_sh3_dsp.
	(sh_show_regs): Floating point registers are called fr0-fr15.
	For sh4, display fpul, fpscr and fr0-fr15 / dr0-dr14 as appropriate.
	Handle sh-dsp and sh3-dsp.
	config/sh/tm-sh.h (REGISTER_VIRTUAL_TYPE): sh-dsp / sh3-dsp
	don't have floating point registers.
	(DSR_REGNUM, A0G_REGNUM, A0_REGNUM, A1G_REGNUM, A1_REGNUM): Define.
	(M0_REGNUM, M1_REGNUM, X0_REGNUM, X1_REGNUM, Y0_REGNUM): Likewise.
	(Y1_REGNUM, MOD_REGNUM, RS_REGNUM, RE_REGNUM, R0B_REGNUM): Likewise.
2000-05-15 21:12:42 +00:00
Frank Ch. Eigler b9791fcdd6 * merge from internal tree
2000-04-14  Gary Thomas  <gthomas@redhat.com>

	* v850.igen: Define 'br *' as illegal since this is the only
	way to provide a breakpoint on some v850 family processors.
2000-05-08 23:07:39 +00:00
Andrew Cagney ba744a4f56 Add missing ChangeLog.
Sync with mitsu's version.
2000-05-03 09:26:07 +00:00
Andrew Cagney dd37a34b6f * mips.igen (DMxC1): Fix format arguments for sim_io_eprintf call. 2000-05-01 07:06:10 +00:00
Andrew Cagney 5eb1a8fac3 Provide more detailed traces of the event queue. 2000-04-28 06:13:46 +00:00
Andrew Cagney 0c22be818b Fix event insertion when processing more than one event for the current time. 2000-04-28 06:02:51 +00:00
Andrew Cagney 25d704f304 Cleanup tracing. 2000-04-28 05:59:25 +00:00
Alexandre Oliva bfa8561f01 * am33.igen (inc4 Rn): Use genericAdd so as to modify flags. 2000-04-25 09:48:40 +00:00
Andrew Cagney 27842f65f2 Add support for SIGILL (reserved-instruction-exception). 2000-04-18 07:55:35 +00:00
Frank Ch. Eigler 5d0d395e94 * arm abort fix
2000-03-11  Philip Blundell  <philb@gnu.org>

	* armemu.c (LoadSMult, LoadMult): Correct handling of aborts.
	Patch from Allan Skillman <Allan.Skillman@arm.com>.
2000-04-10 15:35:56 +00:00
Andrew Cagney e30db7381c Fix printf botch. 2000-04-09 14:15:43 +00:00
Alexandre Oliva d8e7020fd6 * am33.igen: Make SP-relative offsets unsigned. Add `*am33' for
some instructions that were missing it.
2000-04-09 09:04:54 +00:00
Frank Ch. Eigler 01a991e1cd * updating copyright dates ("1999" -> "1999, 2000") 2000-04-05 22:31:29 +00:00
Dave Brolley afb2cbbd21 2000-03-30 Dave Brolley <brolley@redhat.com>
* configure: Regenerated.
2000-03-30 20:51:27 +00:00
Dave Brolley b2ac51e413 2000-03-30 Dave Brolley <brolley@redhat.com>
* aclocal.m4 (cgen): Use guile to run cgen.
2000-03-30 20:49:27 +00:00
Dave Brolley f8603f2f73 2000-03-23 Dave Brolley <brolley@redhat.com>
* cgen-fpu.h: Rename extsfdf to fextsfdf. Rename truncdfsf to
	ftruncdfsf.
	* cgen-accfp.c (fextsfdf): New function.
	(ftruncdfsf): New function.
	(cgen_init_accurate_fpu): Initialize fextsfdf and ftruncdfsf.
2000-03-30 20:21:37 +00:00
Geoffrey Keating 9ff590a53b * ppc-instructions (Disabled_Exponent_Underflow): Increment
the exponent when denormalizing.
2000-03-25 18:45:41 +00:00
Frank Ch. Eigler de616bc738 * more compatibility with v850 hardware
2000-03-24  Frank Ch. Eigler  <fche@redhat.com>

	* v850.igen (ilgop): New insn pattern for four-byte breakpoints.
2000-03-25 00:17:21 +00:00
Frank Ch. Eigler 6c9e0292a3 * memory corruption fix
Wed Mar 22 15:24:21 2000  glen mccready  <gkm@pobox.com>

	* wrapper.c (sim_open,sim_close): Copy into myname, free myname.
2000-03-23 23:28:43 +00:00
Frank Ch. Eigler cb7450ea08 * simplify eCos testing
2000-03-21  Frank Ch. Eigler  <fche@redhat.com>

	* interp.c (sim_open): Sort & extend dummy memory regions for
	--board=jmr3904 for eCos.
2000-03-21 20:45:43 +00:00
Jeff Johnston 0f831eb384 2000-03-13 Jeff Johnston <jjohnstn@cygnus.com>
* cgen-ops.h: Added TRUNCSISI.
2000-03-13 23:51:48 +00:00
Frank Ch. Eigler e88acae792 * extension
2000-03-08  Dave Brolley  <brolley@redhat.com>

	* cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_SF_WRITE.
	(CGEN_WRITE_QUEUE_ELEMENT): Add fn_sf_write.
	(sim_queue_fn_si_write): Last argument is has type USI.
	(sim_queue_fn_sf_write): New function.
	* cgen-par.c (sim_queue_fn_si_write): Declare 'value' as USI.
	(sim_queue_fn_sf_write): New function.
	(cgen_write_queue_element_execute): Handle CGEN_FN_SF_WRITE.
2000-03-08 21:09:41 +00:00
Frank Ch. Eigler a05391975e * build fix
2000-03-07  Frank Ch. Eigler  <fche@redhat.com>

	From John Dallaway  <jld@redhat.co.uk>:
	* Makefile.in (install-sis): Add $(EXEEXT) for Windows host.
2000-03-07 15:32:49 +00:00
Frank Ch. Eigler 8ae7f924f3 * moved misplaced ChangeLog entry 2000-03-04 12:46:44 +00:00
Andrew Cagney 7158fd7f9b Transfer SIM maintainership to Frank. 2000-03-04 06:27:00 +00:00
Frank Ch. Eigler a9e3a73989 * build fix
2000-03-03  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>

	* Makefile.in (IGEN_INSN): Added am33.igen.
2000-03-03 23:25:10 +00:00
Frank Ch. Eigler 0ef33cd05d * build patch
2000-03-03  Jonathan Larmour  <jlarmour@redhat.co.uk>

	* func.c (buffer_read_memory): Change type of size to unsigned to
	match prototype
2000-03-03 15:00:58 +00:00
Frank Ch. Eigler 4cd9361480 * comment tweaks 2000-03-02 22:42:51 +00:00
Frank Ch. Eigler d018757450 * adding forgotten entry 2000-03-02 21:53:51 +00:00
Frank Ch. Eigler a3027dd748 * autoconf correction
* merge from internal repo -> sourceware

2000-03-02  Frank Ch. Eigler  <fche@redhat.com>

	* configure: Regenerated.

Tue Feb  8 18:35:01 2000  Donald Lindsay  <dlindsay@hound.cygnus.com>

	* interp.c, mips.igen: all 5 DEADC0DE situations now have sim_io_eprintf
	calls, conditional on the simulator being in verbose mode.
2000-03-02 18:14:02 +00:00
Frank Ch. Eigler 58fddbac5a * whitespace correction 2000-03-02 18:12:44 +00:00
Andrew Cagney baa7ae6f10 When SIM_HAVE_ENVIRONMENT: use sim_set_trace() to enable tracing
instead of sim_trace() to run the program; include support for ``-o''
option (operating environment); when a signal occurs, only continue
execution when operating environment mode.
Update d10v.
2000-02-22 08:52:21 +00:00
Nick Clifton 3dfcd3c614 Fix fclose() emulation 2000-02-14 19:49:48 +00:00
Nick Clifton 63a027a3fb Add support for M340 processor 2000-02-10 21:59:03 +00:00
Andrew Cagney 7fc5b5adca Report SIGBUS and halt simulation when ld/st detect a misaligned address. 2000-02-09 05:08:42 +00:00
Jason Molenda 25c1c39719 2000-02-08 Jason Molenda (jsm@bugshack.cygnus.com)
* sim/ChangeLog:  Dummy whitespace change to kick off a test
	cvs commit message.
2000-02-09 00:07:53 +00:00
Nick Clifton 6d358e869b Fix compile time warning messages. 2000-02-08 20:54:27 +00:00
Jason Molenda a9e0ce2c0c 2000-02-06 Jason Molenda (jsm@bugshack.cygnus.com)
* gdb/ChangeLog:  Whitespace change to test cvs logging.
	* sim/ChangeLog:  Ditto, but in a separate dir.
2000-02-07 02:14:29 +00:00
Jason Molenda dfcd3bfb6f import gdb-2000-02-04 snapshot 2000-02-05 07:30:26 +00:00
Jason Molenda f743149ecb import gdb-2000-01-26 snapshot 2000-01-26 21:49:14 +00:00
Jason Molenda 0fda6bd286 import gdb-2000-01-24 snapshot 2000-01-25 02:40:50 +00:00
Jason Molenda c5394b80ae import gdb-2000-01-17 snapshot 2000-01-18 00:55:13 +00:00
Jason Molenda c3f6f71df3 import gdb-2000-01-05 snapshot 2000-01-06 03:07:20 +00:00
Jason Molenda ed9a39ebf9 import gdb-1999-12-21 snapshot 1999-12-22 21:45:38 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda de57eccd12 import gdb-1999-12-07 snapshot 1999-12-08 02:51:13 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 4ce44c668d import gdb-1999-11-16 snapshot 1999-11-17 02:31:06 +00:00
Jason Molenda 11cf874164 import gdb-1999-11-08 snapshot 1999-11-09 01:23:30 +00:00
Jason Molenda 5c44784c11 import gdb-1999-11-01 snapshot 1999-11-02 04:44:47 +00:00
Jason Molenda e514a9d642 import gdb-1999-10-25 snapshot 1999-10-26 03:43:48 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda 2df3850c7b import gdb-1999-10-11 snapshot 1999-10-12 04:37:53 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda 6426a772a2 import gdb-1999-09-28 snapshot 1999-09-28 21:55:21 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Jason Molenda cff3e48be7 import gdb-1999-09-13 snapshot 1999-09-13 21:40:00 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda 53a5351d90 import gdb-1999-08-23 snapshot 1999-08-23 22:40:00 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda a0b3c4fd32 import gdb-1999-08-02 snapshot 1999-08-02 23:48:37 +00:00
Jason Molenda adf40b2e16 import gdb-1999-07-19 snapshot 1999-07-19 23:30:11 +00:00
Jason Molenda 43e526b9b4 import gdb-1999-07-12 snapshot 1999-07-12 11:15:22 +00:00
Jason Molenda 9846de1bb5 import gdb-1999-07-07 pre reformat 1999-07-07 17:31:57 +00:00
Jason Molenda 3535ad499b import gdb-1999-07-05 snapshot 1999-07-06 00:58:41 +00:00
Jason Molenda 43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +00:00
Jason Molenda 085dd6e638 import gdb-1999-06-28 snapshot 1999-06-28 16:06:02 +00:00
Jason Molenda ac9a91a77c import gdb-1999-06-01 snapshot 1999-06-01 15:44:41 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Jason Molenda 9e086581c7 import gdb-1999-0519 1999-05-19 19:58:41 +00:00
Stan Shebs cd0fc7c3eb import gdb-1999-05-10 1999-05-11 13:35:55 +00:00
Stan Shebs b83266a0e1 import gdb-19990504 snapshot 1999-05-05 14:45:51 +00:00
Stan Shebs 2d514e6f36 import gdb-19990422 snapshot 1999-04-27 01:33:01 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Doug Evans 8d3b723419 * sparc-desc.c: New file.
* sparc-desc.h: New file.
	* sparc-opc.h: New file.
	* decode64.c: New file.
	* decode64.h: New file.
	* sem64.c: New file.
	* cpu64.c: New file.
	* cpu64.h: New file.
	* model64.h: New file.
	* mloop64.in: New file.
	* regs64.h: New file.
	* trap64.c: New file.
	* cpu32.h,decode32.c,decode32.h,model32.c,sem32.c: Rebuild.
1999-02-10 23:39:09 +00:00
Doug Evans c14d22a7a7 * Makefile.in (SPARC64_OBJS): Add dev64.o.
(CPU_OBJS): New variable.
	(SIM_OBJS): Add sparc-desc.o.
	(SIM_EXTRA_DEPS): Replace cpu-opc.h with sparc-desc.h.
	(sim-core.o): Add dev64.h dependency.
	(dev64.o): Add rule.
	(stamp-arch,stamp-cpu32): Update FLAGS variable, option syntax changed.
	(stamp-cpu64): Ditto.
	(stamp-desc): New rule.
	* configure.in (sim_link_files,sim_link_links): Delete.
	Set cpu_objs to one of SPARC32_OBJS,SPARC64_OBJS.
	* configure: Rebuild.
	* acconfig.h: Rebuild.
	* config.in: Rebuild.
	* dev64.c: New file.
	* dev64.h: New file.
	* sparc64.c: New file.
	* trap64.h: New file.
	* arch.c,arch.h,cpuall.h: Rebuild.
	* cpu32.c,decode32.c,decode32.h,model32.c,sem32.c: Rebuild.
	* sim-if.c (sparc_disassemble_insn): New function.
	(sim_open): sparc_cgen_cpu_open renamed from sparc_cgen_opcode_open.
	Set disassembler.
	(sim_close): sparc_cgen_cpu_open renamed from sparc_cgen_opcode_open.
	* sim-main.h: Don't include cpu-opc.h,cpu-sim.h. Include
	sparc-desc.h,sparc-opc.h,sparc-sim.h.
1999-02-10 09:42:33 +00:00
Doug Evans 9aa2d8ddaf * Makefile.in (SIM_EXTRA_DEPS): Add m32r-desc.h, delete cpu-opc.h.
(stamp-arch,stamp-cpu): Update FLAGS variable, option syntax changed.
	(stamp-xmloop): s/-parallel/-parallel-write/.
	(stamp-xcpu): Update FLAGS variable, option syntax changed.
	* configure.in (sim_link_files,sim_link_links): Delete.
	* configure: Rebuild.
	* decode.c,decode.h,model.c,sem-switch.c,sem.c: Rebuild.
	* decodex.c,decodex.h,modelx.c,semx-switch.c: Rebuild.
	* mloop.in (execute): CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE.
	* sim-if.c (sim_open): m32r_cgen_cpu_open renamed from
	m32r_cgen_opcode_open.  Set disassembler.
	(sim_close): m32r_cgen_cpu_open renamed from m32r_cgen_opcode_open.
	* sim-main.h: Don't include cpu-opc.h,cpu-sim.h. Include
	m32r-desc.h,m32r-opc.h,m32r-sim.h.
1999-02-10 09:23:35 +00:00
Doug Evans 2d84b54332 * configure.in (sparc*): Configure sparc subdir if --with-cgen or
--with-cgen-sim.
	* configure: Rebuild.
1999-02-10 08:56:15 +00:00
Nick Clifton 4145dbc306 Add support for StrongARM target 1999-02-08 12:44:13 +00:00
DJ Delorie 944014510b oops, wrong branch - cvs mistake 1999-02-06 01:14:52 +00:00
DJ Delorie a76051d231 merge from main branch for danlite/sparc86x merge 1999-02-06 01:08:02 +00:00
Jeff Law 579d9a9749 m32rx -> cygnus sanitization change. 1999-02-05 17:39:42 +00:00
Frank Ch. Eigler e346625314 * Fix for PR 17794, brought over from ecc-98r1-branch.
1999-02-05  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-tx3904sio.c (tx3904sio_tickle): After a polled I/O from the
 	CPU, start periodic background I/O polls.
	(tx3904sio_poll): New function: periodic I/O poller.
1999-02-05 13:55:16 +00:00
Doug Evans c2ebe6b880 * cpux.h,decodex.c,modelx.c,semx-switch.c: Regenerate.
Plus s/sanitize-m32rx/sanitize-cygnus/
1999-02-05 00:15:14 +00:00
Gavin Romig-Koch d0d495f601 improve sanitation 1999-02-04 21:23:37 +00:00
Doug Evans 8ad50a7304 cgen generated files for sparc simulator 1999-02-02 21:50:12 +00:00
Doug Evans cac2f51851 configure sparc subdir if --with-cgen 1999-02-02 20:40:33 +00:00
Doug Evans cd6245ce70 sparc cgen port 1999-02-02 19:38:43 +00:00
Doug Evans 27a9a44af7 lose sparc for now 1999-02-02 19:17:42 +00:00
Nick Clifton a21a12e39e Remove v850e sanitization 1999-02-01 11:21:32 +00:00
Doug Evans eb2346970a * cpu.h,decode.c,model.c,sem-switch.c,sem.c: Rebuild.
* cpux.h,decodex.c,modelx.c,semx-switch.c: Rebuild.
1999-01-28 06:51:00 +00:00
Doug Evans 988e60c43b * cgen-engine.h (EXTRACT_LSB0_{INT,UINT}): Fix. 1999-01-28 01:37:10 +00:00
Doug Evans 89b1cfbbd5 * sim-profile.h: Make like sim-trace.h.
(PROFILE_USEFUL_MASK): New macro.
	* sim-profile.c (profile_options): Make like trace_options, allow
	optional on|off arg where applicable.
	(set_profile_option_mask): New function.
	(sim_profile_set_option): New function.
	(profile_option_handler): Simplify.
	Have -p only enable selected things, not everything.
	Add missing break to OPTION_PROFILE_PC_RANGE.
	* cgen-scache.c (scache_options): Allow optional on|off arg to
	--profile-scache.
	(scache_option_handler): Use sim_profile_set_option.
1999-01-28 01:28:03 +00:00
Jason Molenda df59058c91 1999-01-26 Jason Molenda (jsm@bugshack.cygnus.com)
* simops.c (OP_5605): Sign extend MIN32 and MAX32 before saturation
        comparison.
        (OP_5607): Ditto.
        (OP_2A00): Ditto.
        (OP_2800): Ditto.

PRs 18435 18436 18437 18439.
1999-01-27 01:51:26 +00:00
Jeff Law 1ec21625d0 am33 is now kept with --keep-cygnus. 1999-01-26 14:02:27 +00:00
Frank Ch. Eigler a07304dfa3 * Update copyright year. 1999-01-26 11:34:10 +00:00
Frank Ch. Eigler 37bb465135 * Implement --memory-fill and fix --memory-clear options,
for internal PR 18869 and 18870.
1999-01-26  Frank Ch. Eigler  <fche@cygnus.com>
	* sim-memopt.c (memory_options): Add MEMORY_FILL option.
	(memory_option_handler): Implement MEMORY_FILL option.  Make
 	MEMORY_CLEAR an alias for MEMORY_FILL=0.
	(parse_ulong_value): New function.
	(do_memopt_add): Allocate all buffers.  Optionally fill them.
1999-01-26 11:29:17 +00:00
James Lemke b5a10831c4 Initial implementation of fixes for MPC860 version C0 & earlier. 1999-01-22 21:53:57 +00:00
Doug Evans 363e6264be sanitize last entry 1999-01-15 08:29:15 +00:00
Doug Evans ddfae34d82 * Makefile.in (stamp-arch): Pass FLAGS to cgen.
* arch.c,arch.h,cpuall.h: Regenerate.
	* cpu.c,cpu.h,decode.c,decode.h,model.c,sem-switch.c,sem.c: Regenerate.
	* traps.c (sim_engine_invalid_insn): PCADDR->IADDR.
	* cpux.c,cpux.h,decodex.c,decodex.h,modelx.c,semx-switch.c: Regenerate.
1999-01-15 07:27:00 +00:00
Doug Evans 976a48e6c3 * cgen-defs.h (PCADDR,CIA): Define in terms of IADDR.
(sim_disassemble_insn): Update prototype.
	(sim_engine_invalid_insn): Ditto.
	* cgen-engine.h (SEMANTIC_FN): Add !WITH_SCACHE version.
	(SEM_BRANCH_INIT): PCADDR->IADDR.
	(SEM_NBRANCH_FINI): New macro for !WITH_SCACHE case.
	* cgen-scache.c (scache_lookup,scache_lookup_or_alloc): PCADDR->IADDR.
	* cgen-scache.h (*): Ditto.
	* cgen-trace.c (*): Ditto.
	* cgen-trace.h (*): Ditto.
	* cgen-utils.c (*): Ditto.
	* cgen-types.h (integer modes): Use signedNN/unsignedNN types.
	(insn_t): Delete.
	* genmloop.sh (@cpu@_fill_argbuf): Add !WITH_SCACHE support.
	(simple engine framework): Rewrite.
	* sim-module.c (modules): Install model module sooner (and in
	particular before the profile module).
1999-01-15 07:02:30 +00:00
Jason Molenda 984b70f0c8 1999-01-13 Jason Molenda (jsm@bugshack.cygnus.com)
* t-sadd.s: New file.
	* Makefile.in (TESTS): Add t-sadd.

PR 18438.
1999-01-14 00:46:01 +00:00
Doug Evans 9e507b690e * cgen-trace.c (trace_insn): Pass pc to trace_prefix for virtual insns. 1999-01-12 21:46:47 +00:00
Doug Evans cee25b7cb8 * sim-model.h (sim_mach_lookup_bfd_name): Add prototype.
* sim-model.c (sim_mach_lookup_bfd_name): New function.
	(sim_model_init): Call it.
1999-01-12 21:25:21 +00:00
Dave Brolley e1ef54a703 Add new test cases to the list of files to be kept. 1999-01-12 16:27:49 +00:00
Doug Evans 533a502faf * Makefile.in (m32r-clean): rm eng.h. 1999-01-12 00:37:47 +00:00
Doug Evans e64b6cd434 * sim-main.h: Delete inclusion of ansidecl.h.
* cpu.h: Regenerate.
	* cpux.h: Regenerate.
1999-01-12 00:25:41 +00:00
Doug Evans e5e95c7d80 keep fr30 1999-01-11 23:16:57 +00:00
Doug Evans b83dc7fc11 keep fr30-elf 1999-01-11 23:15:16 +00:00
Doug Evans 5759b13198 fix typo in comment 1999-01-11 23:14:23 +00:00
Frank Ch. Eigler 6402c01cc2 * gx sim prototype tweaks
start-sanitize-gxsim
1999-01-11  Frank Ch. Eigler  <fche@cygnus.com>
	* sim-gx-run.c (sim_engine_run): Allay warnings.  Write out updated
	gx block list after each successful compilation job.
	* sim-gx.c (sim_gx_compiled_block_f): dlopen the main executable
	image, to allow gx block DLLs to resolve symbols there.
	(sim_gx_{read,write}_block_list): Allay warnings.
	(sim_gx_block_translate): Allay warnings.  Add $GX_FLAGS to
	gx compilation/link jobs.
	* sim-gx.h: Allay warnings.
end-sanitize-gxsim
1999-01-11 15:06:11 +00:00
Frank Ch. Eigler 11f9c65f91 * build tweak for gx prototype 1999-01-11 15:04:33 +00:00
Frank Ch. Eigler 3372836e0d * Test for PR 18288 and its predecessors.
1999-01-11  Frank Ch. Eigler  <fche@cygnus.com>
	* do-flags.S: New test for parallel PSW update conflicts.
	* Makefile.in (TESTS): Run it.
1999-01-11 14:48:48 +00:00
Frank Ch. Eigler 0e854a2019 * Removing last known memories of tx3904 and am30 sanitization. 1999-01-07 13:06:14 +00:00
Frank Ch. Eigler 0d320ebfc9 * Test for PR 18679.
1999-01-07  Frank Ch. Eigler  <fche@cygnus.com>
	* do-2wordops.S: New test for sign-extension by ld2h.
1999-01-07 08:55:49 +00:00
Doug Evans e0eaa63837 * cpu.h: Regenerate.
* cpux.h: Regenerate.
1999-01-07 00:08:46 +00:00
Doug Evans 368fc7dba8 * Makefile.in (MAIN_INCLUDE_DEPS): Delete.
(INCLUDE_DEPS,OPS_INCLUDE_DEPS): Delete.
	(sim-if.o): Use SIM_MAIN_DEPS.
	(arch.o,traps.o,devices.o): Ditto.
	(M32RBF_INCLUDE_DEPS): Use CGEN_MAIN_CPU_DEPS.
	(m32r.o,mloop.o,cpu.o,decode.o,sem.o,model.o): Simplify dependencies.
	(m32rx.o,mloopx.o,cpux.o,decodex.o,semx.o,modelx.o): Ditto.
	(stamp-arch): Pass mach=all to cgen-arch.
	* cpu.c,cpu.h,decode.c,model.c,sem-switch.c,sem.c: Regenerate.
	* m32r-sim.h (fr30bf_h_cr_[gs]et_handler): Declare.
	([GS]ET_H_CR): Define.
	(fr30bf_h_psw_[gs]et_handler): Declare.
	([GS]ET_H_PSW): Define.
	(fr30bf_h_accum_[gs]et_handler): Declare.
	([GS]ET_H_ACCUM): Define.
	(fr30xf_h_{cr,psw,accum}_[gs]et_handler): Declare.
	(fr30bf_h_accums_[gs]et_handler): Declare.
	([GS]ET_H_ACCUMS): Define.
	* sim-if.c (sim_open): Model probing code moved to sim-model.c.
	* m32r.c (WANT_CPU): Define as m32rbf.
	(all register access fns): Rename to ..._handler.
	* cpux.c,cpux.h,decodex.c,modelx.c,semx.c: Regenerate.
	* m32rx.c (WANT_CPU): Define as m32rxf.
	(all register access fns): Rename to ..._handler.
1999-01-06 03:04:25 +00:00
Doug Evans f5cd4d758c * Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.
(CGEN_MAIN_SCM): Add rtx-funcs.scm.
	(cgen-arch): Pass $(mach) to cgen.sh.
	* cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated.
	(SEM_BRANCH_INIT_EXTRACT): New macro.
	(SEM_BRANCH_INIT): Add taken_p.
	(TARGET_SEM_BRANCH_FINI): Provide default definition.
	(SEM_BRANCH_FINI): Use it.
	(SEM_INSN): Update.
	* cgen-run.c (sim_resume): Handle tracing of last insn.
	* cgen-scache.h (WITH_SCACHE): Define as 0 if not defined.
	* cgen-trace.c (current_abuf): New static global.
	(trace_insn_init): Initialize it.
	(trace_insn_fini): Use it.
	(trace_insn): Set it.
	* cgen.sh (arch case): Pass -m ${mach} to cgen.
	* genmloop.sh (@cpu@_emit_before): Only define if WITH_SCACHE_PBB.
	(@cpu@_emit_after): Ditto.
	(simple @cpu@_engine_run_full): New local `pc'.  Initialize semantic
	labels if WITH_SEM_SWITCH_FULL.
	* sim-model.c: Include bfd.h.
	(sim_model_init): New function.
	(sim_model_install): Record init fn.
	* sim-model.h (MACH): New member bfd_name.
	* sim-module.c (modules): Initialize model before scache.
1999-01-06 00:42:34 +00:00
Jason Molenda d5159c2520 1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
* configure.in: Require autoconf 2.12.1 or higher.
1999-01-05 00:27:19 +00:00
Frank Ch. Eigler ba50f16ab7 * sky test case updates for MTIR insn PR
1998-12-31  Frank Ch. Eigler  <fche@cygnus.com>
	* sim/sky/t-cop2.s: Adjust vmtir instruction tests for new syntax.
	* sim/sky/t-cop2.vuexpect: Matching changes.
1998-12-31 06:00:29 +00:00
Felix Lee d98ee4f5af * sim/sky/sky-defs.tcl: various changes for remote host testing.
* sim/sky/mload.exp: ditto.
        * sim/sky/sky_sce.exp: ditto.
        * sim/sky/sky_sce_accurate.exp: ditto.
        * sim/sky/sky_sce_fast.exp: ditto.
        * sim/sky/mload.exp: mark as unresolved on error.
1998-12-31 01:07:51 +00:00
Frank Ch. Eigler 08f758df94 * resolution of eCos-vs.-sky merge conflict!
[ChangeLog]
1998-12-30  Frank Ch. Eigler  <fche@cygnus.com>
	* mips.igen (BREAK): Call signal_exception instead of sim_engine_halt.
start-sanitize-sky
	* interp.c (signal_exception): Call SIM_CPU_EXCEPTION_TRIGGER hook.
 	Call sim_engine_halt on BreakPoint.
end-sanitize-sky
[ChangeLog.sky]
1998-12-30  Frank Ch. Eigler  <fche@cygnus.com>
	* sky-gdb.c (sky_sim_engine_halt): Do not set CIA here.
1998-12-30 21:16:14 +00:00
Stan Shebs bd164e2835 Tue Dec 29 16:03:53 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in, configure (mips64vr5*-*-*): Added missing ;; in
 	case statement.
(actually a sanitize-cygnus mistake, but Rainer doesn't know that)
1998-12-30 21:16:13 +00:00
Frank Ch. Eigler 86df8e79fc * build / debug improvements for gx JIT sim prototype 1998-12-30 18:30:48 +00:00
Frank Ch. Eigler 14bbac6609 * eCos->devo merge; tx3904 sanitize tags removed
1998-12-29  Frank Ch. Eigler  <fche@cygnus.com>
	* interp.c (sim_open): Allocate jm3904 memory in smaller chunks.
	(load_word): Call SIM_CORE_SIGNAL hook on error.
	(signal_exception): Call SIM_CPU_EXCEPTION_TRIGGER hook before
	starting.  For exception dispatching, pass PC instead of NULL_CIA.
	(decode_coproc): Use COP0_BADVADDR to store faulting address.
	* sim-main.h (COP0_BADVADDR): Define.
	(SIM_CORE_SIGNAL): Define hook to call mips_core_signal.
	(SIM_CPU_EXCEPTION*): Define hooks to call mips_cpu_exception*().
	(_sim_cpu): Add exc_* fields to store register value snapshots.
	* mips.igen (*): Replace memory-related SignalException* calls
	with references to SIM_CORE_SIGNAL hook.
	* dv-tx3904irc.c (tx3904irc_port_event): printf format warning
	fix.
	* sim-main.c (*): Minor warning cleanups.
1998-12-30 12:21:43 +00:00
Frank Ch. Eigler a714374d5e * ChangeLog tweak 1998-12-30 12:17:11 +00:00
Frank Ch. Eigler 9b27cf7bbb * eCos->devo merge; am30 sanitization tags removed
1998-12-29  Frank Ch. Eigler  <fche@cygnus.com>
	* Makefile.in (WITH_COMMON_OBJS): Build also dv-sockser.o.
	* interp.c (sim_open): Add stub mn103002 cache control memory regions.
	Set OPERATING_ENVIRONMENT on "stdeval1" board.
	(mn10300_core_signal): New function to intercept memory errors.
	(program_interrupt): New function to dispatch to exception vector
	(mn10300_exception_*): New functions to snapshot pre/post exception
	state.
	* sim-main.h (SIM_CORE_SIGNAL): Define hook - call mn10300_core_signal.
	(SIM_ENGINE_HALT_HOOK): Do nothing.
	(SIM_CPU_EXCEPTION*): Define hooks to call mn10300_cpu_exception*().
	(_sim_cpu): Add exc_* fields to store register value snapshots.
	* dv-mn103ser.c (*): Support dv-sockser backend for UART I/O.
	Various endianness and warning fixes.
	* mn10300.igen (illegal): Call program_interrupt on error.
	(break): Call program_interrupt on breakpoint
	Several changes from <janczyn@cygnus.com> and <cagney@cygnus.com>
	merged in:
	* dv-mn103int.c (mn103int_ioctl): New function for NMI
	generation. (mn103int_finish): Install it as ioctl handler.
	* dv-mn103tim.c: Support timer 6 specially.  Endianness fixes.
1998-12-30 12:17:10 +00:00
Frank Ch. Eigler 617ca17ed2 * eCos->devo merge
1998-12-24  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-sockser.c (DEFAULT_TIMEOUT): Increase to 1 ms.
	* nrun.c (main): Remain in simulation loop for traps and
 	exceptions when in operating environment mode.
	(ui_loop_hook): New stub hook for standalone use.
	* sim-events.c (sim_events_process): Call ui_loop_hook
	periodically on CYGWIN host.
	* sim-reason.c (sim_stop_reason): Return host signal numbers
	to gdb on sim_stopped and sim_signalled cases.
	* sim-engine.c (sim_engine_halt): Call SIM_CPU_EXCEPTION_SUSPEND
 	hook just before longjmp.
	* sim-resume.c (sim_resume): Call SIM_CPU_EXCEPTION_RESUME
 	hook just before sim_engine_run.
	* sim-n-core.h (sim_core_trace_M): Allay const warning.
	* sim-trace.h (trace_generic): Ditto.
	* sim-trace.c (trace_generic): Ditto.
1998-12-30 12:09:13 +00:00
Gavin Romig-Koch 35d6075ac2 m16.igen (DADDIU5): Correct type-o. 1998-12-24 05:55:42 +00:00
Dave Brolley 27f6ea6995 New testcase. 1998-12-18 22:22:55 +00:00
Dave Brolley f45ee50714 Fri Dec 18 17:09:34 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30/ldres.cgs: New testcase.
	* sim/fr30/stres.cgs: New testcase.
	* sim/fr30/copop.cgs: New testcase.
	* sim/fr30/copld.cgs: New testcase.
	* sim/fr30/copst.cgs: New testcase.
	* sim/fr30/copsv.cgs: New testcase.
	* sim/fr30/nop.cgs: New testcase.
	* sim/fr30/andccr.cgs: New testcase.
	* sim/fr30/orccr.cgs: New testcase.
	* sim/fr30/addsp.cgs: New testcase.
	* sim/fr30/stilm.cgs: New testcase.
	* sim/fr30/extsb.cgs: New testcase.
	* sim/fr30/extub.cgs: New testcase.
	* sim/fr30/extsh.cgs: New testcase.
	* sim/fr30/extuh.cgs: New testcase.
	* sim/fr30/enter.cgs: New testcase.
	* sim/fr30/leave.cgs: New testcase.
	* sim/fr30/xchb.cgs: New testcase.
	* sim/fr30/dmovb.cgs: New testcase.
	* sim/fr30/dmov.cgs: New testcase.
	* sim/fr30/dmovh.cgs: New testcase.
1998-12-18 22:15:44 +00:00
Dave Brolley de6fb7e775 Thu Dec 17 17:18:43 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30/testutils.inc (take_branch{_d},no_branch{_d}): New macros.
	* sim/fr30/ret.cgs: Add tests fir ret:d.
	* sim/fr30/inte.cgs: New testcase.
	* sim/fr30/reti.cgs: New testcase.
	* sim/fr30/bra.cgs: New testcase.
	* sim/fr30/bno.cgs: New testcase.
	* sim/fr30/beq.cgs: New testcase.
	* sim/fr30/bne.cgs: New testcase.
	* sim/fr30/bc.cgs: New testcase.
	* sim/fr30/bnc.cgs: New testcase.
	* sim/fr30/bn.cgs: New testcase.
	* sim/fr30/bp.cgs: New testcase.
	* sim/fr30/bv.cgs: New testcase.
	* sim/fr30/bnv.cgs: New testcase.
	* sim/fr30/blt.cgs: New testcase.
	* sim/fr30/bge.cgs: New testcase.
	* sim/fr30/ble.cgs: New testcase.
	* sim/fr30/bgt.cgs: New testcase.
	* sim/fr30/bls.cgs: New testcase.
	* sim/fr30/bhi.cgs: New testcase.
1998-12-17 22:25:05 +00:00
Doug Evans f7fb02ba10 More sce_testNN cases updated, pr 18402. 1998-12-17 22:21:31 +00:00
Doug Evans 331a809018 * sim/sky/sce_test58.vuasm: Update syntax of MTIR insn.
PR 18402
1998-12-17 21:29:06 +00:00
Frank Ch. Eigler 0615cacf10 * Sanitization fixes to retain new files. 1998-12-16 16:10:16 +00:00
Gavin Romig-Koch f87366ec28 New 'hack' generator 1998-12-16 05:07:34 +00:00
Felix Lee db48d8218f vr4run.c, keep-if vr4xxx 1998-12-16 02:12:41 +00:00
Gavin Romig-Koch 7d2ec607de missing *vr4320: 1998-12-15 03:31:39 +00:00
Doug Evans 985fe43632 * configure.in: --enable-cgen-maint support moved to common/aclocal.m4.
(SIM_AC_OPTION_ALIGNMENT): Make strict.
	* configure: Regenerate.

	* sem-switch.c,sem.c,semx-switch.c: Regenerate.
	* sim-main.h (SIM_ENGINE_HALT_HOOK,SIM_ENGINE_RESTART_HOOK): Define.
	* traps.c (m32r_core_signal): Handle --environment=operating.
1998-12-15 01:06:46 +00:00
Doug Evans b58ffc7b4e * sim/m32r/uread16.ms: New testcase.
* sim/m32r/uread32.ms: New testcase.
	* sim/m32r/uwrite16.ms: New testcase.
	* sim/m32r/uwrite32.ms: New testcase.
1998-12-14 23:31:28 +00:00
Doug Evans 71d0d0a788 * sim/fr30/hello.ms: Add trailing \n to expected output.
* sim/m32r/hello.ms: Ditto.
	* sim/m32r/hw-trap.ms: Ditto.
1998-12-14 23:28:41 +00:00
Doug Evans ebc5ff70a2 lib/sim-defs.exp (sim_run): Look for board_info sim,options. 1998-12-14 23:22:25 +00:00
Doug Evans d4dd077a94 * lib/sim-defs.exp (run_sim_test): New option xerror, for expected
errors.  Translate \n sequences in expected output to newline char.
	(slurp_options): Make parentheses optional.
1998-12-14 23:17:02 +00:00
Dave Brolley ecbc0c5533 1998-12-14 Dave Brolley <brolley@cygnus.com>
* sim/fr30/call.cgs: Test ret here as well.
	* sim/fr30/ld.cgs: Remove bogus comment.
	* sim/fr30/testutils.inc (save_rp,restore_rp): New macros.
	* sim/fr30/div.ms: New testcase.
	* sim/fr30/st.cgs: New testcase.
	* sim/fr30/sth.cgs: New testcase.
	* sim/fr30/stb.cgs: New testcase.
	* sim/fr30/mov.cgs: New testcase.
	* sim/fr30/jmp.cgs: New testcase.
	* sim/fr30/ret.cgs: New testcase.
	* sim/fr30/int.cgs: New testcase.
1998-12-14 20:06:17 +00:00
Gavin Romig-Koch bff2d36890 5xxx and el 1998-12-14 15:14:24 +00:00
Gavin Romig-Koch f14397f057 for bfd:
* archures.c,bfd-in2.h (bfd_mach_mips4121): New.
	* cpu-mips.c: Added vr4121.
	* elf32-mips.c (elf_mips_mach): Same.
	(_bfd_mips_elf_final_write_processing): Same.

for gas:
	* config/tc-mips.c (mips_4121): New.
	(md_begin,mips_ip,md_longopts,md_parse_option): Add vr4121.

for gcc:
	* config/mips/mips.c (override_options): Add vr4121.
	* config/mips/t-vr4xxx (MULTILIB_MATCHES): Same.

for include/elf:
	* mips.h (E_MIPS_MACH_4121): New.

for include/opcode:
	* mips.h (INSN_4121): New.

for opcodes:
	* mips-dis.c (set_mips_isa_type): Add bfd_mach_mips4121.
	(_print_insn_mips): Same.
	* mips-opc.c: Add vr4121.

for sim/mips:
	* configure.in,mips.igen,vr.igen: Add vr4121.
	* configure: Rebuilt.
1998-12-13 16:14:24 +00:00
Gavin Romig-Koch 82aeada70c * configure.in (mips64vr4xxx): Enable TARGET_ENABLE_FR.
Set mips_fpu, and mips_fpu_bitsize.
	Set sim_gen, and sim_igen_machine.
	* configure: Rebuild.
	* mips.igen (BC1): Renamed to BC1a and BC1b to avoid conflicts.
	* sim-main.h (SizeFGR): Handle TARGET_ENABLE_FR.
1998-12-12 22:43:54 +00:00
Gavin Romig-Koch eac6dec56e Cleanups. 1998-12-11 15:18:54 +00:00
Andrew Cagney 94a4ff1901 Compare with ZERO not NULL. 1998-12-11 06:00:55 +00:00
Dave Brolley d8d144a0ab Thu Dec 10 18:46:25 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30/div0s.cgs: New testcase.
	* sim/fr30/div0u.cgs: New testcase.
	* sim/fr30/div1.cgs: New testcase.
	* sim/fr30/div2.cgs: New testcase.
	* sim/fr30/div3.cgs: New testcase.
	* sim/fr30/div4s.cgs: New testcase.
	* sim/fr30/testutils.inc (mvi_h_dr,set_dbits,test_dbits): New Macros.
1998-12-10 23:48:37 +00:00
Jeff Law 312de19bdd Fixes. 1998-12-10 23:36:40 +00:00
Frank Ch. Eigler c426ee5dd0 * Fix for endianness bugs in tx39 sio sim.
1998-12-10  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-tx3904sio.c (tx3904sio_io_read_buffer): Endianness fixes.
	(tx3904sio_tickle): fflush after a stdout character output.
1998-12-10 23:20:48 +00:00
Jeff Law 3314a50ac8 Add missing sanitize markers. 1998-12-10 23:20:47 +00:00
Andrew Cagney 51ecd1580c Include "sim-assert.h". 1998-12-10 06:54:36 +00:00
Doug Evans cca1ad81d6 * cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
* cpux.h,decodex.c,semx-switch.c: Regenerate.
1998-12-09 20:44:30 +00:00
Doug Evans 4883439b08 * sim-if.c: Include string.h or strings.h if present. 1998-12-09 18:18:15 +00:00
Doug Evans 8784e470ad * cgen-scache.c (scache_flush): Delete unused locals i,sc. 1998-12-09 18:09:55 +00:00
Doug Evans fdaac1332c * sim-trace.c: Include stdlib.h if present. 1998-12-09 18:07:26 +00:00
Doug Evans 590d592f87 * sim-arange.c: Include libiberty.h, and stdlib.h if present. 1998-12-09 18:03:24 +00:00
Doug Evans 2a939996f6 * dv-sockser.c: Include unistd.h if present.
(dv_sockser_init): Add missing arg to call to sim_io_eprintf.
1998-12-09 17:56:41 +00:00
Jim Wilson b2248e122a i960 simulator.
* configure.in (i960-*-*): Add.
	* configure: Rebuild.
1998-12-09 06:52:14 +00:00
Jim Wilson f956caa7e7 Add i960 support to sim/common.
* gennltvals.sh: Add i960.
	* nltvals.def: Rebuild.
1998-12-09 06:41:29 +00:00
Jeff Law e49538049b Fixes. 1998-12-09 01:02:26 +00:00
Dave Brolley 18e45ca1b3 Tue Dec 8 13:16:53 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30/testutils.inc (set_s_user): Correct Mask.
	(set_s_system): Correct Mask.
	* sim/fr30/ld.cgs (ld): Move previously failing test back
	into place.
	* sim/fr30/ldm0.cgs: New testcase.
	* sim/fr30/ldm1.cgs: New testcase.
	* sim/fr30/stm0.cgs: New testcase.
	* sim/fr30/stm1.cgs: New testcase.
1998-12-08 18:22:44 +00:00
Dave Brolley 11a2d92065 Tue Dec 8 13:16:53 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30/ldm0.cgs: New testcase.
	* sim/fr30/ldm1.cgs: New testcase.
	* sim/fr30/stm0.cgs: New testcase.
	* sim/fr30/stm1.cgs: New testcase.
1998-12-08 18:22:25 +00:00
Dave Brolley f628df5785 Tue Dec 8 13:16:53 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30/testutils.inc (set_s_user): Correct Mask.
	(set_s_system): Correct Mask.
	* sim/fr30/ld.cgs (ld): Move previously failing test back
	into place.
1998-12-08 18:19:13 +00:00
Frank Ch. Eigler 1ee7d2b1c8 * sky->devo merge, final part of sim merge
[ChangeLog.sky]
1998-12-08  Frank Ch. Eigler  <fche@cygnus.com>
	* sim-main.h (sim_state): Add multi-phase load tracking fields.
	* sky-gdb.c (sky_option_handler): Add --load-next option handling.
	* mips.igen (BREAK): Add multi-phase load and printf code handling.
1998-12-08 12:23:26 +00:00
Frank Ch. Eigler eeba69f17f * Test case for PR 18452.
1998-12-08  Frank Ch. Eigler  <fche@cygnus.com>
	* do-2wordops.S: New test for double-word load-like operations.
1998-12-08 08:53:58 +00:00
Frank Ch. Eigler 8127139143 * gxtool silence tweak 1998-12-05 11:46:32 +00:00
Frank Ch. Eigler 3e99af1bae * gx prototype: simulator I/O bug fix
1998-12-05  Frank Ch. Eigler  <fche@elastic.org>
	* gx-translate.c (m32r_emit_short_insn): Correct ABI result
	handling for TRAP insn.
1998-12-05 10:32:12 +00:00
Doug Evans 1932239a58 (profile_print_addr_range): Pretty up output a little. 1998-12-05 08:47:32 +00:00
Doug Evans 0a18a6b8ad * configure.in: Call SIM_AC_OPTION_INLINE.
* configure: Regenerate.
	* sim-main.h: Protect against multiple inclusion.
	Don't include cgen-scache.h,cgen-cpu.h,cgen-trace.h,cpuall.h.
	Done by cgen-sim.h now.
	* tconfig.in (SIM_HAVE_MODEL): Delete, moved to cgen-types.h.
	* cpuall.h: Regenerate.
	* cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
	* mloop.in (extract16): Make static inline again.
	Simplify with call to @cpu@_fill_argbuf,@cpu@_fill_argbuf_tp.
	(extract32): Ditto.
	Simplify with call to @cpu@_fill_argbuf,@cpu@_fill_argbuf_tp.
	(execute): Test ARGBUF_PROFILE_P before profiling.
	Update calls to TRACE_INSN_INIT,TRACE_INSN_FINI.
	* cpux.h,decodex.c,modelx.c,semx-switch.c: Regenerate.
	* mloopx.in: Rewrite.
1998-12-05 08:09:18 +00:00
Doug Evans b61e2e146a * cgen-defs.h: New file, old cgen-sim.h.
* cgen-sim.h: Simple header that includes others.
	* sim-arange.c: New file.
	* sim-arange.h: New file.
	* sim-basics.h: Include it.
	* Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-arange.o.
	(sim-arange.o): Add rule for.
	* sim-cpu.h (sim_cpu_msg_prefix): Add prototype.
	(sim_io_eprintf_cpu): Add prototype.
	* sim-inline.h (HAVE_INLINE): Define if GNUC.
	(INLINE2): New macro.
	(EXTERN_INLINE): New macro.
	* sim-module.c (sim_post_argv_init): Initialize cpu backlink
	before calling module init fns.
	* sim-profile.h (OPTION_PROFILE_*): Move into enum.
	(profile_init): New function.
	(profile_options): New option --profile-range.
	(profile_option_handler): Handle --profile-range.
	(profile_print_insn): Qualify address range specific section titles.
	(profile_print_addr_ranges): New function.
	(profile_info): Print address ranges if specified.
	(profile_install): Set profile_init init fn.
	* sim-profile.h (PROFILE_DATA): New member `range'.
	* sim-trace.c (trace_init): New function.
	(trace_options): New option --trace-range.
	(trace_option_handler): Handle --trace-range.
	(trace_install): Set trace_init init fn.
	* sim-trace.h (TRACE_DATA): New member `range'.
	* sim-utils.c (sim_cpu_msg_prefix): New function.
	(sim_io_eprintf_cpu): New function.
	* cgen-engine.h (PC_IN_TRACE_RANGE_P): New macro.
	(PC_IN_PROFILE_RANGE_P): New macro.
	* cgen-trace.c (trace_insn_init): Set current_insn to NULL.
	(trace_insn_fini): New arg abuf.  All callers updated.
	Exit early if trace_insn not called.  Check ARGBUF_PROFILE_P before
	printing cycle counts.
	* cgen-trace.h (trace_insn_fini): Update prototype.
	(TRACE_RESULT_P): New macro.
	(TRACE_INSN_INIT,TRACE_INSN_FINI): New arg abuf.  All callers updated.
	(TRACE_INSN): Check ARGBUF_TRACE_P.
	(TRACE_EXTRACT,TRACE_RESULT): New arg abuf.  All callers updated.
	* cgen-types.h (SIM_INLINE): Delete.
	(SIM_HAVE_MODEL,SIM_HAVE_ADDR_RANGE): Define.
	* cgen-utils.c: Don't include cgen-engine.h
	* genmloop.sh (@cpu@_fill_argbuf): New function.
	(@cpu@_fill_argbuf_tp): New function.
	(@cpu@_emit_before,@cpu@_emit_after): New functions.
	(@cpu@_pbb_begin): Prefix cti_sc,insn_count with '_'.
	(SET_CTI_VPC,SET_INSN_COUNT): Update.
	(@cpu@_pbb_before): Check ARGBUF_PROFILE_P before calling
	doing profiling.  Update call to TRACE_INSN_INIT,TRACE_INSN_FINI.
	(@cpu@_pbb_after): Check ARGBUF_PROFILE_P before calling
	doing profiling. Update call to TRACE_INSN_FINI.
1998-12-05 07:56:13 +00:00
Doug Evans e8116eca81 * sim-memopt.c (sim_memory_uninstall): Result type is `void'. 1998-12-05 02:33:31 +00:00
Doug Evans 17f07639b4 address range support 1998-12-05 02:19:39 +00:00
Doug Evans 99c53aa9f6 * cpu.h,decode.c,sem-switch.c,sem.c: Regenerate.
* cpux.h,decodex.c,modelx.c,semx-switch.c: Regenerate.
1998-12-04 08:22:27 +00:00
Andrew Cagney 33ccdb1b97 * gen-engine.c (print_run_body): Prefix instruction_address. 1998-12-04 04:45:05 +00:00
Frank Ch. Eigler beef5e777c * Test case for PR 18364, over from d30v branch.
1998-12-04  Frank Ch. Eigler  <fche@cygnus.com>
	* do-shifts.S: Update an older test case.
1998-12-04 04:17:08 +00:00
Dave Brolley 2cf8f53cc9 Thu Dec 3 14:20:03 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30/ld.cgs: Implement more loads.
	* sim/fr30/call.cgs: New testcase.
	* sim/fr30/testutils.inc (testr_h_dr): New macro.
	(set_s_user,set_s_system): New macros.
1998-12-03 22:38:13 +00:00
Dave Brolley 3bf9790595 Thu Dec 3 14:20:03 1998 Dave Brolley <brolley@cygnus.com>
* sim/fr30: New Directory.
1998-12-03 19:22:56 +00:00
Frank Ch. Eigler 3d7075f5f5 * A few more improvements to gx jit prototype.
[common/ChangeLog]
1998-12-01  Frank Ch. Eigler  <fche@elastic.org>
	* sim-gx-run.c (sim_engine_run): Use new tgx_info struct to
	collect run-time arguments to gx block.
	* sim-gx.h (sim_gx_function): Corresponding signature change.
	* sim-gx.c (sim_gx_compiled_block_f): Remove nonfunctional code to
	again compile a gx block source file.
	(sim_gx_compiled_block_dispose): Uninstall obsoleted gx block
	shared libraries.
	(sim_gx_block_translate): Always emit new "gx_label_NNNN" labels,
	for basic block entry points, even if !__GNUC__.
[m32r-gx/ChangeLog]
1998-12-01  Frank Ch. Eigler  <fche@elastic.org>
	* Makefile.in (SIM_OBJS): Don't build sim-core.o.
	* configure.in:	Added --enable-sim-inline support.
	Look for "getenv()" function.
	* configure: Rebuilt.
	* config.in: Rebuilt.
	* gx-translate.c: Include "sim-inline.c" for sim-core inlining.
	(m32r_gx_{load,store}*): Update signature.
	(tgx_emit_pre_function): Emit new "tgx_info" struct, update
	callback function signatures.
	(m32r_emit_*_insn): Use new callback signatures.  For all short
	branches in optimized mode, emit direct "goto gx_label_NNNN".
	(tgx_optimize_test): If the GX_OPTIMIZE environment variable is
	set, allow its integer value to override the optimization heuristic.
	* m32r-sim.h: New empty placeholder file.
	* sim-main.c: New empty placeholder file.
	* sim-if.c (sim_create_inferior): Use NULL instead of &abort
	for unimplemented register fondling functions.
	* sim-main.h: Add multiple inclusion guard.  Update callback
	function signatures.
	(tgx_info): New struct for collecting gx block invocation
	arguments.
1998-12-01 13:28:53 +00:00
Doug Evans 3c034beb5b * cgen-utils.c (cgen_virtual_opcode_table): Update. 1998-11-30 23:43:58 +00:00
Andrew Cagney a6a5d34927 Fix --enable-build-warnings=-Werror failures.
v850/simops.c, d10v/simops.c, v850/Makefile.in, d10v/Makefile.in:
Include targ-vals.h instead of syscall.h. Replace SYS_* with
TARGET_SYS_*.  Add dependency.
z8k/support.c: Include <errno.h>
v850/simops.c: Replace long with portable signed32.
mips/interp.c: Make sim_monitor global - needed by sky.
1998-11-25 09:58:04 +00:00
Andrew Cagney baa1a48801 Explicitly tag vr41/mips16 instructions.
Update configure.in/configure.
1998-11-25 06:50:48 +00:00
Andrew Cagney fbf1f3f1f6 Add d10v and v850 to gennltvals.sh and regenerate.
Add a howto.
1998-11-24 07:59:01 +00:00
Dave Brolley 7259fc9491 Mon Nov 23 17:02:47 1998 Dave Brolley <brolley@cygnus.com>
* Directory created.
1998-11-23 23:25:28 +00:00
Andrew Cagney 554eb429e4 gencode.c: Kill, Kill, Kill....
Remove last remenats of old gencode simulator.
1998-11-23 11:37:56 +00:00
Andrew Cagney 57791952b6 Configure mips64vr4100-elf nee mips64vr41* as a 64 bit mips16 igen simulator.
Fix problems: All vr.igen instructions are 64 bit.
1998-11-23 07:16:03 +00:00
Andrew Cagney 67f7d50d5e Pacify GCC. 1998-11-23 06:18:32 +00:00
Andrew Cagney 5a581ea612 Pacify GCC. 1998-11-23 06:10:01 +00:00
Andrew Cagney ee562da4c4 Reconize target mips-tx19-elf 1998-11-23 06:06:12 +00:00
Andrew Cagney a83d7d870f Switch mips-lsi-elf mips16 simulator to igen (from gencode). 1998-11-23 05:50:21 +00:00
Doug Evans 9935b2e7f3 * genmloop.sh (${cpu}_pbb_chain): Watch for Ctrl-C's.
(${cpu}_pbb_cti_chain): Ditto.
1998-11-22 19:21:51 +00:00
Frank Ch. Eigler 74cc43debc * fix for minor sanitization lossage 1998-11-22 11:50:48 +00:00
Frank Ch. Eigler 42647d5b8c * mild gx prototype tweak
start-sanitize-gxsim
1998-11-21  Frank Ch. Eigler  <fche@elastic.org>
	* sim-gx.c (sim_gx_block_translate): Generate computed
	goto for __GNUC__ instead of plain switch() for gx block
	entry.  Lose "-g" compile option for gx block.
end-sanitize-gxsim
1998-11-21 19:05:09 +00:00
Andrew Cagney 821b702f92 * r5900.igen (CVT.W.S): Always round towards zero.
Update testsuite.
1998-11-21 03:31:30 +00:00
Michael Meissner 86908c4014 Fix problem where qnan was treated like an infinity 1998-11-20 00:44:03 +00:00
Doug Evans 8406c876c5 * Makefile.in (M32R_OBJS): Delete extract.o.
(extract.o): Delete.
	(stamp-arch): Depend on $(CGEN_ARCH_SCM).
	(stamp-cpu): Don't build extract.c.
	* cpu.c,cpu.h,decode.c,decode.h,sem-switch.c,sem.c: Rebuild.
	* mloop.in (extract16): Update type of `insn' arg.
	Delete call to d->extract.
	(extract32): Ditto.

	* Makefile.in (M32RX_OBJS): Delete extractx.o.
	(extractx.o): Delete.
	(stamp-xcpu): Don't build extractx.c.
	* cpux.c,cpux.h,decodex.c,decodex.h,semx-switch.c: Rebuild.
	* mloopx.in (extractx16): Update type of `insn' arg.
	Delete call to d->extract.  Delete arg pbb_p.  All callers updated.
	(extract-simple,full-exec-simple,fast-exec-simple): Delete.
	(extractx32): Ditto.
1998-11-19 00:12:00 +00:00
Doug Evans 916b11527e * Make-common.in (cgen-utils.o): Depend on cgen-engine.h.
(CGEN_ARCH_SCM): New variable.
	* cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros.
	(EXTRACT_INT,EXTRACT_UINT): New macros.
	(SEM_SEM_ARG): New macro.
	(SEM_NEXT_VPC): New arg `pc'.
	* cgen-sim.h (EXTRACT_SIGNED,EXTRACT_UNSIGNED): Delete.
	(sim_disassemble_insn): Update prototype.
	* cgen-trace.c (current_insn,insn_fields): New static locals.
	(trace_insn): Set them.
	* cgen-utils.scm: #include cgen-engine.h.
	(sim_disassemble_insn): New arg insn_fields.
	Handle variable length insns.
	* genmloop.sh: Only emit pbb decls if -pbb.
	(${cpu}_scache_lookup): New arg `vpc'.
	(scache support): Fetch pc before entering loop.
1998-11-18 23:45:32 +00:00
Doug Evans 2c05443851 * gennltvals.sh: Add fr30 support.
* nltvals.def: Rebuild.
1998-11-18 22:41:50 +00:00
Andrew Cagney 78dee4ee05 Re-do type system so that GCC's explicit attribute/mode types are used
(when available).
Update sim-bits and sim-alu tests in sim/testsuite/common.
1998-11-17 23:59:30 +00:00
Frank Ch. Eigler ca0669a326 * sun build fix for thinko (?) 1998-11-16 08:52:06 +00:00
Frank Ch. Eigler 92fa45795d * Personal prototype "gx" translation-based JIT engine for M32R.
[ChangeLog]
start-sanitize-gxsim
1998-11-13  Frank Ch. Eigler  <fche@elastic.org>
	* configure.in: Added "--enable-sim-gx" option.
	* configure: Regenerated.
end-sanitize-gxsim
[common/ChangeLog]
1998-11-13  Frank Ch. Eigler  <fche@elastic.org>
start-sanitize-gxsim
	* Make-common.im: Build sim-gx.o and sim-gx-run.o.
	* sim-gx.c: New file: target-independent gx routines.
	* sim-gx.h: Declarations for gx structs and routines.
	* sim-gx-run.c: New file: target-independent gx driver.
	* sim-base.h: Add gx block vector to state struct.
end-sanitize-gxsim
	* aclocal.m4: Add tests for dlopen family.
1998-11-14 04:35:47 +00:00
Frank Ch. Eigler fca5abc13a * sanitize fix for do-shifts.S 1998-11-14 04:32:00 +00:00
Frank Ch. Eigler 78cec885d7 * test case for PR 18230, over from d30v branch
1998-11-12  Frank Ch. Eigler  <fche@cygnus.com>
        * br-djsr.S: New test for new R62-update timing.
1998-11-12 11:39:05 +00:00
Andrew Cagney d1cbd70abb Add configury for mips-lsi-elf target (32 bit MIPS16).
Fix numerous problems with PENDING_* code.
In old gencode simulator, don't double tick each cycle.
Add BREAK instruction to MIPS16 gencode simulator.
1998-11-12 06:42:34 +00:00
Doug Evans 847b31bdab * sim-hload.c (sim_load): Pass `prog_name' to sim_load_file, not NULL. 1998-11-11 22:02:57 +00:00
Andrew Cagney 7d88afe63e div(-0) sets both I/SI and D/SD (PR16522) 1998-11-11 08:18:55 +00:00
Doug Evans ca40ecdcec remove cgen support from Makefile.in, moved to cgen dir 1998-11-07 02:47:22 +00:00
Frank Ch. Eigler edba5926c8 * Patch for PR 18196, brought over from d30v branch.
[d30v/ChangeLog]
1998-11-06  Frank Ch. Eigler  <fche@cygnus.com>
	* d30v-insns (do_mvfacc): Use loop to limit shift count to 63 .. 0.
[testsuite/d30v-elf/ChangeLog]
1998-11-06  Frank Ch. Eigler  <fche@cygnus.com>
	* do-shifts.S: Add test for large mvfacc shifts.
1998-11-06 08:45:57 +00:00
Doug Evans 47a2144503 lose fr30 for now 1998-11-06 00:17:34 +00:00
Dave Brolley 168c5ef4ef Wed Nov 4 19:11:43 1998 Dave Brolley <brolley@cygnus.com>
* configure.in: Added case for fr30-*-*.
	* configure: Regenerated.
1998-11-05 20:25:22 +00:00
Frank Ch. Eigler 1995094e7f * r5900 sim test case fix
Thu Nov  5 10:37:40 EST 1998  Frank Ch. Eigler <fche@cygnus.com>

	* t-prot3w.s: Correct test of prot3w insn.
1998-11-05 15:42:02 +00:00
Frank Ch. Eigler 210a903baf * build fix
Thu Nov  5 10:29:42 EST 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* r5900.igen (r59fp_opdiv): Correct erroneous FGR[FD] reference.
1998-11-05 09:42:06 +00:00
Andrew Cagney dd0f610960 PR 16522
Fix RSQRT.S instruction, add test case.
1998-11-05 09:42:05 +00:00
Doug Evans 8de434bf89 * sim-main.h: Delete inclusion of config.h, include sim-basics.h
before cgen-types.h.
	* tconfig.in: Guard against multiple inclusion.
	* cpu.h: Delete decls moved to genmloop.sh.
	* cpux.h: Ditto.
1998-11-05 07:56:02 +00:00
Doug Evans 8c7dc9ffc8 * genmloop.sh (eng.hin): Rename HAVE_PARALLEL_EXEC to
HAVE_PARALLEL_INSNS, define as 0 or 1.  Emit decls of fns in mloop.cin.
	* cgen-engine.h: Typedefs of IADDR,CIA,SEM_ARG,SEM_PC moved ...
	* cgen-sim.h: ... to here.
1998-11-05 07:53:37 +00:00
Doug Evans d4df1e3023 add some comments 1998-11-04 19:27:20 +00:00
Frank Ch. Eigler fd0e83b604 * adding missing ChangeLog header line 1998-11-02 11:51:27 +00:00
Frank Ch. Eigler 0ec51df9ef * build fix for tx39 sim; caused by sky->devo merge
* dv-tx3904cpu.c (deliver_tx3904cpu_interrupt): Add dummy
	interrupt level number to match changed SignalExceptionInterrupt
	macro.
1998-10-30 09:49:18 +00:00
Frank Ch. Eigler 2fee67aeb8 * Updated sanitization
- remove memories of old sim/testsuite/sky directory
- add new dir sim/testsuite/mips64el-elf to "always-keep" list
1998-10-30 07:03:14 +00:00
Felix Lee baa791ae9b * lib/sim-defs.exp (sim_run): download target program to remote
host, if necessary.  for unix-driven win32 testing.
1998-10-30 00:39:44 +00:00
Michael Snyder eeb89805cb fix minor typo. 1998-10-29 18:24:04 +00:00
Frank Ch. Eigler 271f091db7 * Test cases for PR 18015.
Thu Oct 29 12:07:06 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* t-psrlvw.s (test_psrlvw): Add test for sign-extension in insn.
	* t-padsbh.s: New test.
	* t-mult1.s: New test.
	* Makefile.in: Run them.
1998-10-29 17:28:18 +00:00
Frank Ch. Eigler fd6e6422c8 * sky->devo merge, continued -- left out the r5900 TLB last time!
* includes a small PR 17224 tweak
1998-10-29 13:44:37 +00:00
Frank Ch. Eigler 0d51822e3b * monster sky->devo merge -- sky sim test suites 1998-10-29 12:59:50 +00:00
Frank Ch. Eigler afacff5074 * sky->devo merge; dummy test suite directory for mips64el-skyb-elf target. 1998-10-29 12:07:51 +00:00
Frank Ch. Eigler 3ac7980b23 * Fixes for PR 18015, from customer.
Thu Oct 29 11:06:30 EST 1998  Frank Ch. Eigler <fche@cygnus.com>
	* r5900.igen: Fix PSRLVW, MULTU1, PADSBH instructions,
	as per customer patch.
1998-10-29 09:30:11 +00:00
Doug Evans 3afece8646 * sim-if.c (sim_do_command): Handle "sim info reg {bbpsw,bbpc}".
Bring over from branch.
1998-10-28 22:45:11 +00:00
Drew Moseley 84e42e1daf For cygwin hosts, we need to use the return value from the read
routine as the number of bytes to process.  This apparently is due to
text-mode vs binary-mode.  If the mounts are done text-mode, then the
size returnedby fstat() may be different than the number of bytes
"read" in text mode.
1998-10-28 21:16:44 +00:00
Andrew Cagney b9a9cde40b Unify (well almost) --enable-build-warnings configuration option
across GDB and SIM directories.
1998-10-28 02:01:32 +00:00
Frank Ch. Eigler fe146542dd * Fix for testcase for checking PR 17362.
Tue Oct 27 15:20:16 EST 1998  Frank Ch. Eigler <fche@cygnus.com>

	* t-prot3w.s: Test changed spec of prot3w insn.
1998-10-27 21:49:15 +00:00
Frank Ch. Eigler fda83b6795 * MONSTER sky -> devo merge
* ChangeLog / ChangeLog.sky entries were merged with original time stamps;
  a few were moved between the files
1998-10-27 12:48:08 +00:00
Doug Evans 9c5da58d59 * sim-main.h: #include cpu-opc.h.
* arch.c,arch.h,decode.c,extract.c,model.c,sem.c: Regenerate
	to get #include cleanup.
	* decodex.c,extractx.c,modelx.c: Ditto.
1998-10-19 23:33:40 +00:00
Doug Evans 48ffd442f6 * Makefile.in (SIM_EXTRA_DEPS): Replace cgen headers with
CGEN_INCLUDE_DEPS.
	(M32RBF_INCLUDE_DEPS): Define.
	(m32r .o's): Depend on it.
	(mloop.c): Update call to genmloop.sh.
	* cpu.h,cpuall.h: Regenerate.
	* sim-main.h: Delete inclusion of cpu.h,decode.h, moved to cpuall.h.
	#include cgen-scache.h,cgen-cpu.h.
	* tconfig.in (WITH_FOO semantic macros): Delete.
	* Makefile.in (M32RXF_INCLUDE_DEPS): Define.
	(m32rx .o's): Depend on it.
	(mloopx.c): Update call to genmloop.sh.
	* cpux.h: Regenerate.
1998-10-19 21:14:14 +00:00
Doug Evans b35179cb0b * Make-common.in (CGEN_INCLUDE_DEPS): Define.
(sim-core.o): Delete duplicate dependence on $(SIM_EXTRA_DEPS).
	(sim-cpu.o,sim-endian.o,sim-hw.o): Ditto.
	(cgen-run.o,cgen-scache.o,cgen-trace.o,cgen-utils.o): Delete
	explicit cgen header dependencies, require SIM_EXTRA_DEPS to include
	CGEN_INCLUDE_DEPS.
	* cgen-cpu.h: New file.
	* cgen-engine.h: New file.
	* cgen-scache.h: New file.
	* cgen-sim.h: Delete portions moved to new files.
	* genmloop.sh: Generate two files eng.hin,mloop.cin explicitly,
	rather than sending result to stdout.
1998-10-19 21:00:59 +00:00
Doug Evans 3b5f425750 * interp.c: #include "itable.h" if WITH_IGEN.
(get_insn_name): New function.
	(sim_open): Initialize CPU_INSN_NAME,CPU_MAX_INSNS.
	* sim-main.h (MAX_INSNS,INSN_NAME): Delete.
1998-10-10 01:07:15 +00:00
Doug Evans bb51b65d68 Add pseudo-basic-block execution support.
* Makefile.in (SIM_OBJS): Add sim-reg.o, cgen-run.o, sim-stop.o.
	(SIM_EXTRA_DEPS): Add include/opcode/cgen.h.
	(INCLUDE_DEPS): Delete cpu-sim.h, include/opcode/cgen.h.
	(mloop.c): Build pseudo-basic-block version.  Depend on stamp-cpu.
	(stamp-decode): Delete, build decode files with other cpu files.
	* arch.c,arch.h,cpuall.h: Regenerate.
	* cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
	* sem-switch.c,sem.c: Regenerate.
	* m32r-sim.h (M32R_MISC_PROFILE): New members load_regs,
	load_regs_pending.
	* m32r.c (m32rbf_fetch_register): Renamed from m32rb_fetch_register.
	(m32rbf_store_register,m32rbf_h_cr_get,m32rbf_h_cr_set,
	m32rbf_h_psw_get,m32rbf_h_psw_set,m32rbf_h_accum_get,
	m32rbf_h_accum_set): Likewise.
	(m32r_model_{init,update}_insn_cycles): Delete.
	(m32rbf_model_insn_{before,after}): New fns.
	(m32r_model_record_cti,m32r_model_record_cycles): Delete.
	(m32rb_model_mark_get_h_gr,m32rb_model_mark_set_h_gr): Delete.
	(m32rb_model_mark_busy_reg,m32rb_model_mark_unbusy_reg): Delete.
	(check_load_stall): New fn.
	(m32rbf_model_m32r_d_u_{exec,cmp,mac,cti,load,store}): New fns.
	(m32rbf_model_test_u_exec): New fn.
	* mloop.in: Rewrite, use pbb support.
	* sim-if.c (sim_stop,sim_sync_stop,sim_resume): Delete.
	(sim_fetch_register,sim_store_register): Delete.
	* sim-main.h (CIA_GET,CIA_SET): Fix.
	(SIM_ENGINE_HALT_HOOK,SIM_ENGINE_RESTART_HOOK): Delete.
	* tconfig.in (WITH_SCACHE_PBB): Define.
	(WITH_SCACHE_PBB_M32RBF): Define.
	* traps.c (sim_engine_invalid_insn): Renamed from ..._illegal_....
	(m32r_trap): Pass pc to sim_engine_halt.
	* configure.in (SIM_AC_OPTION_SCACHE): Change 1024 to 16384.
	* configure: Regenerate.
start-sanitize-m32rx
	* Makefile.in (M32RX_OBJS): Delete semx.o, add extract.o.
	(mloopx.c): Build pseudo-basic-block version.  Depend on stamp-xcpu.
	(semx.o): Delete.
	(extractx.o): Add.
	(stamp-xdecode): Delete, build decode files with other cpu files.
	* cpux.c,cpux.h,decodex.c,decodex.h,modelx.c: Regenerate.
	* readx.c: Delete.
	* semx.c: Delete.
	* extractx.c: New file.
	* semx-switch.c: New file.
	* m32r-sim.h (BRANCH_NEW_PC): Delete.
	(SEM_SKIP_INSN): New macro.
	* m32rx.c (m32rxf_fetch_register): Renamed from m32rx_fetch_register.
	(m32rxf_store_register,m32rxf_h_cr_get,m32rxf_h_cr_set,
	m32rxf_h_psw_get,m32rxf_h_psw_set,m32rxf_h_accum_get,
	m32rxf_h_accum_set,m32rxf_h_accums_get,m32rxf_h_accums_set): Likewise.
	(m32rxf_model_insn_{before,after}): New fns.
	(m32rx_model_mark_get_h_gr,m32rx_model_mark_set_h_gr): Delete.
	(m32rx_model_mark_busy_reg,m32rx_model_mark_unbusy_reg): Delete.
	(check_load_stall): New fn.
	(m32rxf_model_m32rx_u_{exec,cmp,mac,cti,load,store}): New fns.
	* mloopx.in: Rewrite, use pbb support.
	* tconfig.in (WITH_SCACHE_PBB_M32RXF): Define.
	(WITH_SEM_SWITCH_FULL): Change from 0 to 1.
end-sanitize-m32rx
1998-10-09 23:43:28 +00:00
Doug Evans 0b517b9cf2 * Make-common.in (sim-reg.o): New rule.
(cgen-run.o): New rule.
	* cgen-ops.h: Delete many BI macros.  Change all UBI -> BI.
	* cgen-run.c (prime_cpu): New function.
	* cgen-scache.c: Add pseudo-basic-block (pbb) scaching support.
	(scache_option_handler, case OPTION_PROFILE_SCACHE): Handle explicitly
	mentioned cpu.
	(scache_flush_cpu,scache_lookup,scache_lookup_or_alloc): New fns.
	* cgen-sim.h (CGEN_INSN_VIRTUAL_TYPE): New enum.
	(CGEN_INSN_VIRTUAL_P): New macro.
	(SEM_PC): New typedef.
	(SEMANTIC_FN): Change type of result to SEM_PC.
	(SEM_SET_FULL_CODE,SEM_SET_FAST_CODE,SEM_SET_CODE): New macros.
	(IDESC_CTI_P,IDESC_SKIP_P): New macros.
	(SCACHE_MAP): New typedef.
	(CPU_SCACHE): Add pbb support.
	(scace_lookup,scache_lookup_or_alloc,scache_flush_cpu): Declare.
	(SEM_BRANCH_INIT_EXTRACT,SEM_BRANCH_INIT,SEM_BRANCH_FINI): New macros.
	(CGEN_CPU): New members running_p,insn_count,{fast,full}_engine_fn,
	max_slice_insns.
	(INSN_NAME): Delete.
	(cgen_insn_name): Declare.
	(sim_engine_invalid_insn): Renamed from sim_engine_illegal_insn.
	* cgen-trace.c (trace_buf): Shrink from 1024 to 256 bytes.
	(first_insn_p): Make static.
	(trace_insn): Handle virtual insns specially.
	(cgen_trace_printf): Ensure we haven't overflowed the buffer.
	* cgen-types.h (UBI): Delete.
	(MODE_TYPE): New enum.
	(HOSTINT,HOSTUINT,HOSTPTR): Delete.
	* cgen-utils.c (mode_names): Delete UBI.  Add INT,UINT,PTR.
	(cgen_virtual_opcode_table): New global.
	(cgen_insn_name): New function.
	(sim_disassemble_insn): Ignore virtual insns.
	* genmloop.sh: Delete top level loop generation.  Add pbb support.
	* sim-cpu.h (CPU_INSN_NAME_FN): New typedef.
	(sim_cpu_base): New members max_insns,insn_name,model_data.
	(CPU_PC_GET,CPU_PC_SET): New macros.
	(sim_pc_get,sim_pc_set): Declare.
	* sim-model.c (model_set): Call model init fn.
	* sim-model.h (MODEL_FN): New typedef.
	(INSN_TIMING): New member model_fn.
	(MODEL): New members num,init.
	* sim-profile.c (sim_profile_print_bar): Renamed from print_bar.
	All callers updated.
	(profile_insn_init): New fn.
	(profile_print_insn): Update, INSN_NAME -> CPU_INSN_NAME.
	Exit early if insn profiling not supported.
	(profile_print_memory): Update, MAX_MODES -> MODE_TARGET_MAX.
	(profile_install): Record profile_insn_init as init fn.
	(profile_uninstall): Free PROFILE_INSN_COUNT if non-null.
	* sim-profile.h: Update, MAX_MODES -> MODE_TARGET_MAX.
	(PROFILE_DATA): Delete member exec_time.
	Change insn_count to pointer to array, rather than the array.
	(sim_profile_print_bar): Declare.
1998-10-09 22:43:05 +00:00
Doug Evans 99bc9a6984 cgen-run.c: new mainloop for cgen
sim-reg.c: generic sim_fetch/store_register interface fns
1998-10-07 23:55:42 +00:00
Nick Clifton 1ee490ca0b Fix PR 17387: ignore auto increment for loads where the destination register
and the address register are the same.
1998-09-30 17:15:14 +00:00
Doug Evans ff8c385ab3 * m32r-sim.h (GET_H_SM): New macro.
(UART params): Update to msa2000.
	* devices.c (device_io_read_buffer): Update to msa2000.
	* m32r.c (m32rb_h_cr_get,m32rb_h_cr_set): Handle bbpc,bbpsw.
	(m32rb_h_psw_get,m32rb_h_psw_set): New functions.
	* arch.c,arch.h,cpu.c,cpu.h,sem-switch.c,sem.c: Regenerate.
	* m32rx.c (m32rx_h_cr_get,m32rx_h_cr_set): Handle bbpc,bbpsw.
	(m32rx_h_psw_get,m32rx_h_psw_set): New functions.
	* cpux.c,cpux.h,readx.c,semx.c: Regenerate.
PR 15938.
1998-09-15 22:16:08 +00:00
Nick Clifton 043333a61a define SIM_HAVE_BIENDIAN 1998-09-14 16:58:00 +00:00
Doug Evans 4d87923eb3 * r5900.igen (plzcw): Make `i' signed.
PR 17191.
1998-09-10 19:00:46 +00:00
Doug Evans 190659a22d * m32r-sim.h (m32r_trap): Update prototype.
* traps.c (m32r_trap): New arg `pc'.
	* sem.c,sem-switch.c: Regenerated.
	* cpux.h,readx.c,semx.c: Regenerated.
1998-09-09 22:34:09 +00:00
Doug Evans 3efbfbebdc * sim/sky/pr17191.s: New file.
* sim/sky/pr17191.brn: New file.
	* sim/sky/t-macros.inc: New file.
1998-09-09 21:50:10 +00:00
Ron Unrau 323f833daf Branch merge for GDB:
* sim-main.h: track COP0 registers
        * interp.c (sim_{fetch,store}_register): read/write COP0 registers
        * sky-gdb.[ch]: add sim pipeorder command
1998-09-09 17:30:31 +00:00
Frank Ch. Eigler 9ade226a42 * Patch for PR 17142, brought over from sky branch.
Fri Sep  4 10:37:57 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* r5900.igen (mtsab): Correct typo in input register.
	* sim-main.h (TMP_*): New macros for accessing local 128-bit
	temporary for multimedia instructions.
	* r5900.igen (*): Convert most instructions to use new TMP
	macros to store output result during computation.
1998-09-08 11:09:45 +00:00
Frank Ch. Eigler 78b871ec81 * Build fixes for tx39 sim hosted on strange Linux boxen.
[common/ChangeLog]
Tue Sep  1 15:36:52 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* sim-config.h: Remove reference to linux kernel header.
[mips/ChangeLog]
Tue Sep  1 15:39:18 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-tx3904sio.c: Include sim-assert.h.
1998-09-01 13:19:57 +00:00
Ken Raeburn 83e29d5263 Change sanitization of vrXXXX to cygnus, so redact might work on it.
This means using keep-vr4320 without keep-cygnus probably won't work.
1998-08-26 17:29:06 +00:00
Joyce Janczyn cf83964e6f Regress yesterday's change to jmp instn implementation in mn10300.igen. 1998-08-26 13:37:56 +00:00
Joyce Janczyn ef4d20e915 Regress yesterday's change to jmp instruction -- it has deceiving syntax.
Also tidy up some code to match documentation and fix div, divu by 0.
1998-08-26 13:31:38 +00:00
Joyce Janczyn 59587664ab * mn10300.igen (OP_F0F4): Need to load contents of register AN0
for jmp.
1998-08-25 20:49:35 +00:00
Frank Ch. Eigler 36e838d13b * eCos tx3904sio sim - devo part 2/2
Tue Aug 25 12:49:46 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-tx3904sio.c: New file: tx3904 serial I/O module.
	* configure.in: Add dv-tx3904sio, dv-sockser for tx39 target.
	Reorganize target-specific sim-hardware checks.
	* configure: rebuilt.
	* interp.c (sim_open): For tx39 target boards, set
	OPERATING_ENVIRONMENT, add tx3904sio devices.
	* tconfig.in: For tx39 target, set SIM_HANDLES_LMA for loading
	ROM executables.  Install dv-sockser into sim-modules list.
	* dv-tx3904irc.c: Compiler warning clean-up.
	* dv-tx3904tmr.c: Compiler warning clean-up.  Remove particularly
	frequent hw-trace messages.
1998-08-25 14:16:58 +00:00
Frank Ch. Eigler 8d6ed1b768 * eCos tx3904sio sim - devo part 1/2
Tue Aug 25 12:45:27 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-sockser.c (sockser_addr): Make variable non-static.
1998-08-25 13:58:35 +00:00
Joyce Janczyn c1802bfd60 * sim-main.h (SIM_HANDLES_LMA): Define SIM_HANDLES_LMA. 1998-08-24 15:52:43 +00:00
Joyce Janczyn fb37fdcb89 * sim-hw.{c,h} (sim_hw_parse): Return struct hw pointer. 1998-08-24 15:48:45 +00:00
Ken Raeburn aeeb756dee fix broken sanitization 1998-08-18 18:58:10 +00:00
Ken Raeburn 3d759c53c9 sanitize-vr5400 -> sanitize-cygnus, for 98r2 1998-08-12 10:50:35 +00:00
Ron Unrau d333eeedde * sim-main.h: track COP2 register definitions, define VIO_BASE
* interp.c (sim_{fetch,store}_register): read/write VU0/1 control regs
        * sky-gdb.c: use VIO_BASE
        * sky-pke.h: move GDB_COMM area
1998-08-06 20:02:47 +00:00
Doug Evans d68bc3cb16 Rename cpu m32r to m32rb to distinguish from architecture name.
* Makefile.in (mloop.c): cpu m32r renamed to m32rb.
	(stamp-cpu): Ditto.
	* sim-main.h (WANT_CPU_M32RB): Renamed from WANT_CPU_M32R.
	* tconfig.in (WANT_CPU_M32RB): Ditto.
	* m32r.c (WANT_CPU_M32RB): Ditto.
	(*): m32r_ cpu fns renamed to m32rb_.
	* sim-if.c (sim_stop,sim_sync_stop,sim_resume): Update.
	* arch.h,arch.c: Regenerate.
	* cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
	* sem-switch.c,sem.c: Regenerate.

	* sim-if.c (sim_open): Don't allocate memory on top of any user
	specified memory.
	(h_gr_get,h_gr_set): Delete.
	* sim-main.h (h_gr_get,h_gr_set): Delete.
	* traps.c (m32r_trap): Replace calls to h_gr_[gs]et with
	a_m32r_h_gr_[gs]et.
1998-08-04 02:52:16 +00:00
Doug Evans 13ccace0ca * Makefile.in (INCLUDE_DEPS): Add include/opcode/cgen.h.
* sim-if.c (sim_open): Open opcode table.
	(sim_close): Close it.
1998-08-03 19:58:36 +00:00
Doug Evans 39813256da * cgen-sim.h (cgen_state): New member opcode_table.
* cgen-utils.c (sim_disassemble_insn): Use it.
1998-08-03 18:45:06 +00:00
Ron Unrau b8140a08bf * sim-main.h: shadow NUM_CORE_REGS from tm-txvu.h
* interp.c: use NUM_CORE_REGS
        * sky-gdb.c (set_fifo_breakpoints): use VIF interrupt bit for break
        * sky-pke.c (pke_issue): use interrupt bit for break points
1998-07-31 22:02:12 +00:00
Jeff Holcomb acf38b4e4a fix sanitization 1998-07-31 05:23:28 +00:00
Jeff Law e1160daac2 Fix sanitize misspellings. 1998-07-29 18:28:29 +00:00
Andrew Cagney 8d3580d090 Fix incorrect calculation of conditional field when being extracted
from a previous decode.
1998-07-29 00:14:29 +00:00
Doug Evans d846a17c70 Add support for new versions of mulwhi,mulwlo,macwhi,macwlo that
accept an accumulator choice.
	* cpux.c,decodex.c,decodex.h,modelx.c,readx.c,semx.c: Regenerate.
1998-07-28 20:09:10 +00:00
Doug Evans fe63ffef0a New testcases for PR 16547 (new instructions added). 1998-07-28 18:43:52 +00:00
Andrew Cagney f6b7bfcfa0 Add note about limitations of insn_field_cmp(). 1998-07-28 08:58:23 +00:00
Andrew Cagney 07c2bd1455 Problems with conditional instruction-table fields (N!M, N=M, ...).
Was restricting `M' to opcode fields in the current word.
1998-07-28 08:08:54 +00:00
Jeff Law 3e20223154 * am33.igen: Detect cases where two operands must not match in
non-DSP instructions.
1998-07-27 18:05:43 +00:00
Andrew Cagney 60f9cd07d0 For vr* processors start using vr.igen.
Sanitize out README.Cygnus.
1998-07-25 07:49:29 +00:00
Andrew Cagney e1b20d3048 Add new file vr.igen which is a merge of vr5400.igen and vr4320.igen.
Hack sanitize so that it doesn't sanitize vrXXX when either of
keep-vr5400 or keep-vr4320 are specified.
Move two basic vr4100 instructions from mips.igen to vr.igen.
1998-07-25 06:45:18 +00:00
Joyce Janczyn a2f93b6758 Fri Jul 24 18:15:21 1998 Joyce Janczyn <janczyn@cygnus.com>
* op_utils.c (do_syscall): Rewrite to use common/syscall.c.
	(syscall_read_mem, syscall_write_mem): New functions for syscall
	callbacks.
	* mn10300_sim.h: Add prototypes for syscall_read_mem and
	syscall_write_mem.
	* mn10300.igen: Change C++ style comments to C style comments.
	Check for divide by zero in div and divu ops.
1998-07-24 22:22:35 +00:00
Doug Evans 431e4f86ad * m32r.c: Include cgen-mem.h.
* traps.c (m32r_trap): Tweak for -Wall.
	* m32rx.c: Include cgen-mem.h.
	* semx.c: Regenerate, get -Wall cleanups.
1998-07-24 20:03:56 +00:00
Doug Evans 63542cbcc0 * cgen-mem.h (DECLARE_SETT): Fix return type. 1998-07-24 19:44:04 +00:00
Jeff Law 6d254a2d5f * am33.igen (translate_xreg): New function. Use it as needed. 1998-07-24 18:50:12 +00:00
Doug Evans f3ccb5a785 * sim-model.c (model_option_handler): Remove unused variable `n'. 1998-07-24 17:16:02 +00:00
Doug Evans fa653bc01e * Makefile.in (clean,mostlyclean): Change leading spaces to a tab. 1998-07-24 16:44:43 +00:00
Ian Lance Taylor 965f532708 remove d30v sanitization 1998-07-24 04:38:45 +00:00
Jeff Law 4b6651c925 * am33.igen: Add some missing instructions.
Missed a few last week... Grrr.
1998-07-23 16:31:41 +00:00
Jeff Law 6ae1456eb5 * am33.igen: Autoincrement loads/store fixes. 1998-07-23 16:06:50 +00:00
Doug Evans 7422fa0cc8 * cpu.h,extract.c: Regenerate. pc-rel calcs done on f_dispNN now.
* cpux.h,readx.c,semx.c: Ditto.
1998-07-21 23:54:10 +00:00
Doug Evans cac4e5a481 * cgen-utils.c: Include bfd.h.
(sim_disassemble_insn): Update call to CGEN_EXTRACT_FN.
1998-07-21 23:26:53 +00:00
Jeff Law 0a78550778 * am33.igen: Add most am33 DSP instructions. 1998-07-21 15:50:14 +00:00
Jillian Ye 27de7e18c4 Forward fit sky-branch updates to devo. 1998-07-17 18:43:30 +00:00
Jeff Holcomb 7034215bc6 fix sanitization; add trap.S 1998-07-14 23:00:31 +00:00
Jeff Law 4b987239ea Fix goof. 1998-07-14 03:59:11 +00:00
Jeff Law 080ee2ba75 * am33.igen: Fix Z bit for remaining addc/subc instructions.
Do not sign extend immediate for mov imm,XRn.
        More random mul, mac & div fixes.
        Remove some unused variables.
        Sign extend 24bit displacement in memory addresses.
Whee, more fixes.
1998-07-09 19:41:47 +00:00
Jeff Law 4e86afb85f * mn10300.igen: Fix Z bit for addc and subc instructions.
Minor fixes in multiply/divide patterns.

start-sanitize-am33
        * am33.igen: Fix Z bit for addc Rm,Rn and subc Rm,Rn.  Various
        fixes to 2 register multiply, divide and mac instructions.  Set
        Z,N correctly for sat16.  Sign extend 24 bit immediate for add,
        and sub instructions.

        * am33.igen: Add remaining non-DSP instructions.
end-sanitize-am33
1998-07-09 19:04:22 +00:00
Jeff Law 1f0ba346eb * am33.igen: Add remaining non-DSP instructions.
Lots of work still remains.  PSW handing is probably broken badly and the
mul/mac classes of instructions are probably not handled correctly.
1998-07-09 16:09:24 +00:00
Jeff Law 9c55817e66 * am33.igen (translate_rreg): New function. Use it as appropriate. 1998-07-09 00:24:57 +00:00
Jeff Law 377e53bb6b * am33.igen: More am33 instructions. Fix "div". 1998-07-08 22:33:35 +00:00
Andrew Cagney 9483af2c61 Add a printf fmt style version of sim_events_schedule.
This allows the caller to specify extra trace information that is
only evaluated when tracing is enabled.
1998-07-08 08:00:36 +00:00
Jeff Law d2b02ab22d * mn10300.igen: Add am33 support. 1998-07-06 22:02:02 +00:00
Jeff Law 135431cd7e * Makefile.in: Use multi-sim to support both a mn10300 and am33
simulator.
1998-07-06 21:57:22 +00:00
Jeff Law 658fb0c743 * sim-bits.h (EXTEND24): Define. 1998-07-06 21:55:37 +00:00
Jeff Law 3e75ff7efd * am33.igen: Add many more am33 instructions. 1998-07-06 21:41:06 +00:00
Doug Evans 039fa2c847 * cgen-sim.h (CPU_SCACHE): Make size unsigned.
(CPU_SCACHE_HASH_MASK): New macro.
	(SCACHE_HASH_PC): Rewrite.
	* genmloop.sh (engine_resume_{full,fast}): Move some of hash
	computation out of main loop.
1998-07-03 00:14:49 +00:00
James Lemke 0a3ec14442 Add a test case for PR16213. 1998-07-02 20:20:32 +00:00
Doug Evans 1148b104ae * Makefile.in: cgen_maint -> CGEN_MAINT.
* configure.in: AC_SUBST cgen,cgendir.  No longer look for guile.
	* configure: Regenerate.
	* arch.c,arch.h,cpuall.h: Regenerate.
	* cpu.c,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
	* sem-switch.c,sem.c: Regenerate.
	* cpux.c,cpux.h,decodex.c,decodex.h,modelx.c,readx.c: Regenerate.
	* semx.c: Regenerate.
	* mloopx.in (icount): Moved here from genmloop.sh.
1998-07-02 01:42:38 +00:00
Doug Evans 6de2add29f * Make-common.in (SCHEME,SCHEMEFLAGS): Delete.
(CGENDIR,CGEN): New variables.
	(CGEN_VERBOSE): Renamed to CGENFLAGS.
	(cgen-arch,cgen-cpu,cgen-decode): Update.
	(CGEN_CPU_WRITE): New variable.
	(CGEN_CPU_SEMSW): -W -> -X.
	(CGEN_FLAGS_TO_PASS): Delete SCHEME.  Add CGEN,CGENFLAGS.
	* cgen.sh: Delete args scheme,schemeflags.  New arg cgen.

	* cgen-sim.h (RECORD_IADDR): Delete.
	* cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types.
	* genmloop.sh (engine_resume_{full,fast}): Delete icount.
1998-07-01 23:47:50 +00:00
Jeff Law ee61616c43 Tweak. 1998-07-01 23:15:55 +00:00
Jeff Law 0f7d73858c * am33.igen: New file with some am33 support.
Checking in work-to-date.
1998-07-01 23:13:14 +00:00
Jeff Law de2adf7070 * mn10300_sim.h (FETCH24): Define.
* mn10300_sim.h: Add defines for some registers found on the AM33.
1998-07-01 23:11:59 +00:00
Doug Evans 8686807e30 * sim/m32r/hw-trap.ms: New testcase. 1998-07-01 22:57:07 +00:00
Doug Evans 9ae0ae657f * sim/sky/vureloc{.brn,-main.c,.dvpasm}: New files. 1998-07-01 21:37:10 +00:00
Jeff Law a6cbaa652a * mn10300_sim.h: Include bfd.h
(struct state): Add more room for processor specific registers.
start-sanitize-am33
        (REG_E0): Define.
end-sanitize-am33
1998-06-30 17:28:54 +00:00
Gavin Romig-Koch 46eb9e5a57 * interp.c (OPTION_BRANCH_BUG_4011): Add.
(mips_option_handler): Handle OPTION_BRANCH_BUG_4011.
	(mips_options): Define the option.
	* mips.igen (check_4011_branch_bug): New.
	(mark_4011_branch_bug): New.
	(all branch insn): Call mark_branch_bug, and check_branch_bug.
	* sim-main.h (branchbug4011_option, branchbug4011_last_target,
	branchbug4011_last_cia, BRANCHBUG4011_OPTION,
	BRANCHBUG4011_LAST_TARGET, BRANCHBUG4011_LAST_CIA,
	check_branch_bug, mark_branch_bug): Define.
1998-06-29 13:30:01 +00:00
Gavin Romig-Koch aaa2c9082c * mips.igen (check_mf_hilo): Correct check. 1998-06-29 13:22:31 +00:00
Michael Meissner 16a88df71e Do not try to include sys/mount.h anymore 1998-06-26 18:22:48 +00:00
Patrick Macdonald 80b86d36b3 * sky-pke.c (pke_issue): use default trace file name if the
--log-file option not used
1998-06-25 18:58:10 +00:00