Commit Graph

2382 Commits

Author SHA1 Message Date
Chris Demetriou d18ea9c2b8 2002-06-12 Chris Demetriou <cgd@broadcom.com>
* mips.igen: Fix formatting of function calls in
        many FP operations.
2002-06-12 23:32:05 +00:00
Chris Demetriou 95fd5cee7d 2002-06-12 Chris Demetriou <cgd@broadcom.com>
* mips.igen (MOVN, MOVZ): Trace result.
        (TNEI): Print "tnei" as the opcode name in traces.
        (CEIL.W): Add disassembly string for traces.
        (RSQRT.fmt): Make location of disassembly string consistent
        with other instructions.
2002-06-12 23:20:56 +00:00
Chris Demetriou 4f0d55aeaa 2002-06-12 Chris Demetriou <cgd@broadcom.com>
* mips.igen (X): Delete unused function.
2002-06-12 22:22:41 +00:00
Andrew Cagney 26216b9822 Add the file include/gdb/sim-arm.h defining an enum that specifies the
register numbering used by the GDB<->SIM interface.
2002-06-12 21:19:43 +00:00
Aldy Hernandez 307041b752 missed 2 in 2002. oops. 2002-06-12 00:46:41 +00:00
Aldy Hernandez 7d7d930f7a 002-06-09 Aldy Hernandez <aldyh@redhat.com>
* sim-fpu.c (unpack_fpu): Initialize exponent for
        sim_fpu_class_zero.
        (i2fpu): Same.
        (sim_fpu_sqrt): Same.
2002-06-12 00:46:11 +00:00
Andrew Cagney 3c25f8c7b0 Move include/callback.h and include/remote-sim.h to include/gdb/.
Update accordingly.
2002-06-09 15:45:54 +00:00
Andrew Cagney 983b727e70 Fix name of enum used in cast (sim_fetch_register, sim_store_register). 2002-06-08 22:19:56 +00:00
Chris Demetriou f3c08b7e16 2002-06-07 Chris Demetriou <cgd@broadcom.com>
Ed Satterthwaite  <ehs@broadcom.com>

	* cp1.c (inner_mac, fp_mac, inner_rsqrt, fp_inv_sqrt)
	(fp_rsqrt, fp_madd, fp_msub, fp_nmadd, fp_nmsub): New functions.
	* sim-main.h (fp_rsqrt, fp_madd, fp_msub, fp_nmadd)
	(fp_nmsub): New prototypes.
	(RSquareRoot, MultiplyAdd, MultiplySub, NegMultiplyAdd)
	(NegMultiplySub): New defines.
	* mips.igen (RSQRT.fmt): Use RSquareRoot().
	(MADD.D, MADD.S): Replace with...
	(MADD.fmt): New instruction.
	(MSUB.D, MSUB.S): Replace with...
	(MSUB.fmt): New instruction.
	(NMADD.D, NMADD.S): Replace with...
	(NMADD.fmt): New instruction.
	(NMSUB.D, MSUB.S): Replace with...
	(NMSUB.fmt): New instruction.
2002-06-08 03:05:23 +00:00
Chris Demetriou 52714ff9ee 2002-06-07 Chris Demetriou <cgd@broadcom.com>
Ed Satterthwaite  <ehs@broadcom.com>

        * cp1.c: Fix more comment spelling and formatting.
        (value_fcr, store_fcr): Use fenr_FS rather than hard-coding value.
        (denorm_mode): New function.
        (fpu_unary, fpu_binary): Round results after operation, collect
        status from rounding operations, and update the FCSR.
        (convert): Collect status from integer conversions and rounding
        operations, and update the FCSR.  Adjust NaN values that result
        from conversions.  Convert to use sim_io_eprintf rather than
        fprintf, and remove some debugging code.
        * cp1.h (fenr_FS): New define.
2002-06-07 22:55:49 +00:00
Chris Demetriou 577d8c4b5a 2002-06-07 Chris Demetriou <cgd@broadcom.com>
* cp1.c (convert): Remove unusable debugging code, and move MIPS
	rounding mode to sim FP rounding mode flag conversion code into...
	(rounding_mode): New function.
2002-06-07 16:50:42 +00:00
Chris Demetriou 196496eda0 2002-06-07 Chris Demetriou <cgd@broadcom.com>
* cp1.c: Clean up formatting of a few comments.
	(value_fpr): Reformat switch statement.
2002-06-07 16:43:19 +00:00
Chris Demetriou cfe9ea23c7 2002-06-06 Chris Demetriou <cgd@broadcom.com>
Ed Satterthwaite  <ehs@broadcom.com>

	* cp1.h: New file.
	* sim-main.h: Include cp1.h.
	(SETFCC, GETFCC, IR, UF, OF, DX, IO, UO, FP_FLAGS, FP_ENABLE)
	(FP_CAUSE, GETFS, FP_RM_NEAREST, FP_RM_TOZERO, FP_RM_TOPINF)
	(FP_RM_TOMINF, GETRM): Remove.  Moved to cp1.h.
	(FP_FS, FP_MASK_RM, FP_SH_RM, Nan, Less, Equal): Remove.
	(value_fcr, store_fcr, test_fcsr, fp_cmp): New prototypes.
	(ValueFCR, StoreFCR, TestFCSR, Compare): New macros.
	* cp1.c: Don't include sim-fpu.h; already included by
	sim-main.h.  Clean up formatting of some comments.
	(NaN, Equal, Less): Remove.
	(test_fcsr, value_fcr, store_fcr, update_fcsr, fp_test)
	(fp_cmp): New functions.
	* mips.igen (do_c_cond_fmt): Remove.
	(C.cond.fmta, C.cond.fmtb): Replace uses of do_c_cond_fmt_a with
	Compare.  Add result tracing.
	(CxC1): Remove, replace with...
	(CFC1a, CFC1b, CFC1c, CTC1a, CTC1b, CTC1c): New instructions.
	(DMxC1): Remove, replace with...
	(DMFC1a, DMFC1b, DMTC1a, DMTC1b): New instructions.
	(MxC1): Remove, replace with...
	(MFC1a, MFC1b, MTC1a, MTC1b): New instructions.
2002-06-07 00:13:24 +00:00
Andrew Cagney c93abbccf2 * Makefile.in (ChangeLog): New makefile variable.
* README-HACKING: Mention the ChangeLog makefile variable.
2002-06-06 16:33:45 +00:00
Andrew Cagney 73fa0d3fb2 * writecode.c (lookup_inst): Generate inverse table on-the-fly.
(z8k_inv_list): Delete global.
(DIRTY_HACK): Delete macro.
(makelist): Delete global.
(main): Delete code making a list.  Delete dirty hack code.  Use
lookup_inst instead of z8k_inv_list.
* list.c: Delete file.
* Makefile.in (writecode): Do not link in list.o.
(list.o): Delete target.
2002-06-06 15:50:50 +00:00
Chris Demetriou ee7254b0cc 2002-06-04 Chris Demetriou <cgd@broadcom.com>
* sim-main.h (FGRIDX): Remove, replace all uses with...
        (FGR_BASE): New macro.
        (FP0_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): New macros.
        (_sim_cpu): Move 'fgr' member to be right before 'fpr_state' member.
        (NR_FGR, FGR): Likewise.
        * interp.c: Replace all uses of FGRIDX with FGR_BASE.
        * mips.igen: Likewise.
2002-06-04 22:38:41 +00:00
Chris Demetriou d3eb724f81 2002-06-04 Chris Demetriou <cgd@broadcom.com>
* cp1.c: Add an FSF Copyright notice to this file.
2002-06-04 16:35:24 +00:00
Chris Demetriou ba46ddd0cf 2002-06-04 Chris Demetriou <cgd@broadcom.com>
Ed Satterthwaite  <ehs@broadcom.com>

        * cp1.c (Infinity): Remove.
        * sim-main.h (Infinity): Likewise.

        * cp1.c (fp_unary, fp_binary): New functions.
        (fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div, fp_recip)
        (fp_sqrt): New functions, implemented in terms of the above.
        (AbsoluteValue, Negate, Add, Sub, Multiply, Divide)
        (Recip, SquareRoot): Remove (replaced by functions above).
        * sim-main.h (fp_abs, fp_neg, fp_add, fp_sub, fp_mul, fp_div)
        (fp_recip, fp_sqrt): New prototypes.
        (AbsoluteValue, Negate, Add, Sub, Multiply, Divide)
        (Recip, SquareRoot): Replace prototypes with #defines which
        invoke the functions above.
2002-06-04 16:17:20 +00:00
Chris Demetriou 18d8a52d00 2002-06-03 Chris Demetriou <cgd@broadcom.com>
* sim-main.h (Nan, Infinity, Less, Equal, AbsoluteValue, Negate)
        (Add, Sub, Multiply, Divide, Recip, SquareRoot): Move lower in
        file, remove PARAMS from prototypes.
        (value_fpr, store_fpr, convert): Likewise.  Use SIM_STATE to provide
        simulator state arguments.
        (ValueFPR, StoreFPR, Convert): Move lower in file.  Use SIM_ARGS to
        pass simulator state arguments.
        * cp1.c (SD): Redefine as CPU_STATE(cpu).
        (store_fpr, convert): Remove 'sd' argument.
        (value_fpr): Likewise.  Convert to use 'SD' instead.
2002-06-04 01:35:23 +00:00
Chris Demetriou 0f154cbd1c 2002-06-03 Chris Demetriou <cgd@broadcom.com>
* cp1.c (Min, Max): Remove #if 0'd functions.
        * sim-main.h (Min, Max): Remove.
2002-06-04 00:18:46 +00:00
Chris Demetriou e80fc1523d 2002-06-03 Chris Demetriou <cgd@broadcom.com>
* cp1.c: fix formatting of switch case and default labels.
        * interp.c: Likewise.
        * sim-main.c: Likewise.
2002-06-03 22:30:52 +00:00
Chris Demetriou bad673a9cb 2002-06-03 Chris Demetriou <cgd@broadcom.com>
* cp1.c: Clean up comments which describe FP formats.
	 (FPQNaN_DOUBLE, FPQNaN_LONG): Generate using UNSIGNED64.
2002-06-03 22:05:15 +00:00
Chris Demetriou 7cbea0890e 2002-06-03 Chris Demetriou <cgd@broadcom.com>
Ed Satterthwaite  <ehs@broadcom.com>

	* configure.in (mipsisa64sb1*-*-*): New target for supporting
	Broadcom SiByte SB-1 processor configurations.
	* configure: Regenerate.
	* sb1.igen: New file.
	* mips.igen: Include sb1.igen.
	(sb1): New model.
	* Makefile.in (IGEN_INCLUDE): Add sb1.igen.
	* mdmx.igen: Add "sb1" model to all appropriate functions and
	instructions.
	* mdmx.c (AbsDiffOB, AvgOB, AccAbsDiffOB): New functions.
	(ob_func, ob_acc): Reference the above.
	(qh_acc): Adjust to keep the same size as ob_acc.
	* sim-main.h (status_SBX, MX_VECT_ABSD, MX_VECT_AVG, MX_AbsDiff)
	(MX_Avg, MX_VECT_ABSDA, MX_AbsDiffC): New macros.
2002-06-03 21:00:29 +00:00
Chris Demetriou 909daa8222 2002-06-03 Chris Demetriou <cgd@broadcom.com>
* Makefile.in (IGEN_INCLUDE): Add mdmx.igen.
2002-06-03 18:35:19 +00:00
Richard Henderson 4e62efb8f8 * gen-engine.c (print_run_body): Avoid multi-line strings.
* lf.c (lf_print__gnu_copyleft): Likewise.
2002-06-03 16:04:31 +00:00
Elena Zannoni 676ab6a01e Use current date in ChangeLog entry. 2002-06-03 00:47:14 +00:00
Elena Zannoni c7675842d8 2002-05-28 Elena Zannoni <ezannoni@redhat.com>
From Jason Eckhardt <jle@redhat.com>
        * d10v_sim.h (INC_ADDR): Correctly handle the case where MOD_E is
        less than MOD_S (post-decrement).
2002-06-03 00:36:02 +00:00
Chris Demetriou f4f1b9f102 2002-06-02 Chris Demetriou <cgd@broadcom.com>
Ed Satterthwaite  <ehs@broadcom.com>

	* mips.igen (mdmx): New (pseudo-)model.
	* mdmx.c, mdmx.igen: New files.
	* Makefile.in (SIM_OBJS): Add mdmx.o.
	* sim-main.h (MDMX_accumulator, MX_fmtsel, signed24, signed48):
	New typedefs.
	(ACC, MX_Add, MX_AddA, MX_AddL, MX_And, MX_C_EQ, MX_C_LT, MX_Comp)
	(MX_FMT_OB, MX_FMT_QH, MX_Max, MX_Min, MX_Msgn, MX_Mul, MX_MulA)
	(MX_MulL, MX_MulS, MX_MulSL, MX_Nor, MX_Or, MX_Pick, MX_RAC)
	(MX_RAC_H, MX_RAC_L, MX_RAC_M, MX_RNAS, MX_RNAU, MX_RND_AS)
	(MX_RND_AU, MX_RND_ES, MX_RND_EU, MX_RND_ZS, MX_RND_ZU, MX_RNES)
	(MX_RNEU, MX_RZS, MX_RZU, MX_SHFL, MX_ShiftLeftLogical)
	(MX_ShiftRightArith, MX_ShiftRightLogical, MX_Sub, MX_SubA, MX_SubL)
	(MX_VECT_ADD, MX_VECT_ADDA, MX_VECT_ADDL, MX_VECT_AND)
	(MX_VECT_MAX, MX_VECT_MIN, MX_VECT_MSGN, MX_VECT_MUL, MX_VECT_MULA)
	(MX_VECT_MULL, MX_VECT_MULS, MX_VECT_MULSL, MX_VECT_NOR)
	(MX_VECT_OR, MX_VECT_SLL, MX_VECT_SRA, MX_VECT_SRL, MX_VECT_SUB)
	(MX_VECT_SUBA, MX_VECT_SUBL, MX_VECT_XOR, MX_WACH, MX_WACL, MX_Xor)
	(SIM_ARGS, SIM_STATE, UnpredictableResult, fmt_mdmx, ob_fmtsel)
	(qh_fmtsel): New macros.
	(_sim_cpu): New member "acc".
	(mdmx_acc_op, mdmx_cc_op, mdmx_cpr_op, mdmx_pick_op, mdmx_rac_op)
	(mdmx_round_op, mdmx_shuffle, mdmx_wach, mdmx_wacl): New functions.
2002-06-02 07:39:26 +00:00
Andrew Cagney e4045cdb95 Delete TiC80, no longer supported by GDB. 2002-06-01 23:23:28 +00:00
Andrew Cagney 18c0df9e1b Fill-out d10v enum so that there are no ``=''. 2002-06-01 18:15:43 +00:00
Kazu Hirata dbec3bef45 * run.c: Fix formatting. 2002-05-31 02:17:26 +00:00
DJ Delorie d7a97a9b1c * lf.c (lf_print__gnu_copyleft): Convert multiline strings to
compatible format.
* gen-idecode.c (print_run_until_stop_body): Likewise.
* gen-model.c (gen_model_c): Likewise.
2002-05-30 15:07:06 +00:00
Nick Clifton 5aa682b2e0 Set the FSR and FAR registers if a Data Abort is detected. 2002-05-29 19:01:36 +00:00
Elena Zannoni 1aa5e64f43 2002-05-28 Elena Zannoni <ezannoni@redhat.com>
* interp.c (sim_create_inferior): Add comment.

	From Alan Matsuoka <alanm@redhat.com>:
	From 2001-04-27 Jason Eckhardt <jle@cygnus.com>:
	* simops.c (OP_4400): Output "mvf0f" instead of "mf0f".
	(OP_4401): Output "mvf0t" instead of "mf0t".
	(OP_460B): Do not output a flag register.
	(OP_4609): Do not output a flag register.
2002-05-28 15:49:52 +00:00
Nick Clifton 10b57fcbd7 Only perform access checks if 'check' is set.
Report unknown machine numbers.
Formatting tidy ups.
2002-05-27 14:12:00 +00:00
Nick Clifton 7378e198a5 Thumb BL instruction: Do not set LR to pc + 2, it has already been advanced. 2002-05-27 13:30:36 +00:00
Andrew Cagney b91b96f4f6 * sim-d10v.h: Delete file. Moved to include/gdb/.
* sim-d10v.h: New file.  Moved from include/sim-d10v.h.

* Makefile.in (INCLUDE): Add "gdb/sim-d10v.h".
* interp.c: Include "gdb/sim-d10v.h" instead of "sim-d10v.h".

* d10v-tdep.c: Include "gdb/sim-d10v.h" instead of "sim-d10v.h".
* Makefile.in (sim_d10v_h): Update definition.
2002-05-24 00:12:18 +00:00
Nick Clifton 2984e11475 When decoding a BLX(1) instruction do not add in the second bit of the base
address - this has already been accounted for.
2002-05-23 12:38:31 +00:00
Nick Clifton 8b2440b731 Simulate XScale BCUMOD register 2002-05-21 20:28:26 +00:00
Nick Clifton de4112fa38 Add support for target specific command line switches to old-style simualtors.
Make use of this support in the ARM simulator to add a --swi-support= switch
to select whcih SWI protocols to emulate.
2002-05-20 14:32:50 +00:00
Kazu Hirata d13351445b * compile.c: Fix formatting. 2002-05-19 12:52:54 +00:00
Kazu Hirata c3f4437ee1 * compile.c: Fix formatting. 2002-05-18 11:40:19 +00:00
Andrey Volkov 6147b1f62b * compile.c: Add absented opcodes: LDC, STC, EEPMOV, TAS. 2002-05-17 19:22:14 +00:00
Andrey Volkov fc97460264 h8300: Add support of EXR register 2002-05-17 19:19:24 +00:00
Andrey Volkov a8cdafbd4e * h8300s now new target, not alias of h8300h 2002-05-17 19:09:13 +00:00
Andrey Volkov f6225c9615 *compile.c: Add additional CCR flags (I,UI,H,U) 2002-05-17 18:55:13 +00:00
Andrey Volkov 3b02cf9281 * compile.c: Change literal regnumbers to REGNUMS. 2002-05-17 18:47:14 +00:00
Joern Rennecke 1c509ca821 print_insn_sh cleanup:
include:
	* dis-asm.h (print_insn_shl, print_insn_sh64l): Remove prototype.
gdb:
	* sh-tdep.c (gdb_print_insn_sh64): Delete.
	(gdb_print_insn_sh): Just set info->endian and use print_insn_sh.
	(sh_gdbarch_init): Always use gdb_print_insn_sh.
opcodes:
	* disassemble.c (disassembler): Just use print_insn_sh for bfd_arch_sh.
	* sh-dis.c (LITTLE_BIT): Delete.
	(print_insn_sh, print_insn_shl): Deleted.
	(print_insn_shx): Renamed to
	(print_insn_sh).  No longer static.  Handle SHmedia instructions.
	Use info->endian to determine endianness.
	* sh64-dis.c (print_insn_sh64, print_insn_sh64l): Delete.
	(print_insn_sh64x): No longer static.  Renamed to
	(print_insn_sh64).  Removed pfun_compact and endian arguments.
	If we got an uneven address to indicate SHmedia, adjust it.
	Return -2 for SHcompact instructions.
sim/sh64:
	* sim-if.c (sh64_disassemble_insn): Use  print_insn_sh instead of
	print_insn_shl.
2002-05-17 14:36:46 +00:00
Stephane Carrez 2be99286c5 * MAINTAINERS: Update my email address. 2002-05-16 13:38:55 +00:00
Nick Clifton ace4f296f5 Uses sim callback interface for system calls in RedBoot SWI support. 2002-05-09 10:29:08 +00:00
Nick Clifton d8512e6afd Support the RedBoot SWI in ARM mode and some of its system calls. 2002-05-09 10:14:12 +00:00
Chris Demetriou 5accf1ff56 [ common/ChangeLog ]
2002-05-01  Chris Demetriou  <cgd@broadcom.com>

        * callback.c: Use 'deprecated' rather than 'depreciated.'

[ igen/ChangeLog ]
2002-05-01  Chris Demetriou  <cgd@broadcom.com>

        * igen.c: Use 'deprecated' rather than 'depreciated.'

[ mips/ChangeLog ]
2002-05-01  Chris Demetriou  <cgd@broadcom.com>

        * interp.c: Use 'deprecated' rather than 'depreciated.'
        * sim-main.h: Likewise.
2002-05-01 23:26:32 +00:00
Chris Demetriou 402586aa26 2002-05-01 Chris Demetriou <cgd@broadcom.com>
* cp1.c (store_fpr): Remove #ifdef'd out call to UndefinedResult
        which wouldn't compile anyway.
        * sim-main.h (unpredictable_action): New function prototype.
        (Unpredictable): Define to call igen function unpredictable().
        (NotWordValue): New macro to call igen function not_word_value().
        (UndefinedResult): Remove.
        * interp.c (undefined_result): Remove.
        (unpredictable_action): New function.
        * mips.igen (not_word_value, unpredictable): New functions.
        (ADD, ADDI, do_addiu, do_addu, BGEZAL, BGEZALL, BLTZAL, BLTZALL)
        (CLO, CLZ, MADD, MADDU, MSUB, MSUBU, MUL, do_mult, do_multu)
        (do_sra, do_srav, do_srl, do_srlv, SUB, do_subu): Invoke
        NotWordValue() to check for unpredictable inputs, then
        Unpredictable() to handle them.
2002-05-01 17:26:14 +00:00
Nick Clifton d1b0a5b4a9 Handle CLASS_IGNORE and ARG_NIM4. 2002-04-29 16:50:29 +00:00
Chris Demetriou c9b9995a38 2002-02-24 Chris Demetriou <cgd@broadcom.com>
* mips.igen: Fix formatting of calls to Unpredictable().
2002-04-25 05:37:03 +00:00
Andrew Cagney e101598283 Revert previous change. 2002-04-20 16:39:46 +00:00
Alexandre Oliva b882a66bfc * interp.c (sim_open): Disable chunk of code that wrote code in
vector table entries.
2002-04-18 19:47:14 +00:00
Elena Zannoni d395ade3db 2002-04-15 Elena Zannoni <ezannoni@redhat.com>
* sim_calls.c (sim_fetch_register, sim_store_register): Return -1 for
        AltiVec registers as a temporary stopgap.
2002-04-15 16:32:55 +00:00
David O'Brien 23c7880c01 2002-03-24 David O'Brien <obrien@FreeBSD.org>
* ppc/hw_disk.c: Export a disk device property.

This is needed by the FreeBSD/powerpc porting effort.
2002-03-25 04:39:20 +00:00
Andrew Cagney e7b564aa85 * gen.c (format_name_cmp): New function.
(insn_list_insert): Use the instruction field name as an
additional key.  Different field names indicate different
semantics.
2002-03-24 00:43:28 +00:00
Andrew Cagney ec80ed8088 From 2001-12-09 Julien Ducourthial <jducourt@noos.fr>:
* ppc-instructions (lswx): Do the register control with the
register count.  Initialize the right register in the loop.
(mtfsfi) : Correct prefix for the instruction.
2002-03-23 21:18:31 +00:00
Chris Demetriou c429b7ddd8 2002-03-19 Chris Demetriou <cgd@broadcom.com>
* cp1.c (FP_S_s, FP_D_s, FP_S_be, FP_D_be, FP_S_e, FP_D_e, FP_S_f)
        (FP_D_f, FP_S_fb, FP_D_fb, FPINF_SINGLE, FPINF_DOUBLE): Remove
        unused definitions.
2002-03-20 07:24:20 +00:00
Chris Demetriou 37d146fa1d 2002-03-19 Chris Demetriou <cgd@broadcom.com>
* cp1.c: Fix many formatting issues.
2002-03-20 07:10:37 +00:00
Chris Demetriou 07892c0b5a 2002-03-19 Chris G. Demetriou <cgd@broadcom.com>
* cp1.c (fpu_format_name): New function to replace...
        (DOFMT): This.  Delete, and update all callers.
        (fpu_rounding_mode_name): New function to replace...
        (RMMODE): This.  Delete, and update all callers.
2002-03-20 06:42:05 +00:00
Chris Demetriou 487f79b73c 2002-03-19 Chris G. Demetriou <cgd@broadcom.com>
* interp.c: Move FPU support routines from here to...
        * cp1.c: Here.  New file.
        * Makefile.in (SIM_OBJS): Add cp1.o to object list.
        (cp1.o): New target.
2002-03-20 01:35:13 +00:00
Anthony Green ae60d3ddec Increase default memory size to 8MB. 2002-03-18 21:43:15 +00:00
Chris Demetriou 1e799e28c1 2002-03-12 Chris Demetriou <cgd@broadcom.com>
* configure.in (mipsisa32*-*-*, mipsisa64*-*-*): New targets.
        * mips.igen (mips32, mips64): New models, add to all instructions
        and functions as appropriate.
        (loadstore_ea, check_u64): New variant for model mips64.
        (check_fmt_p): New variant for models mipsV and mips64, remove
        mipsV model marking fro other variant.
        (SLL) Rename to...
        (SLLa) this.
        (CLO, CLZ, MADD, MADDU, MSUB, MSUBU, MUL, SLLb): New instructions
        for mips32 and mips64.
        (DCLO, DCLZ): New instructions for mips64.
2002-03-12 22:53:01 +00:00
Chris Demetriou 82f728dbb8 2002-03-07 Chris Demetriou <cgd@broadcom.com>
* mips.igen (BREAK, LUI, ORI, SYSCALL, XORI): Print
        immediate or code as a hex value with the "%#lx" format.
        (ANDI): Likewise, and fix printed instruction name.
2002-03-08 00:37:14 +00:00
Chris Demetriou 6225b4b7fc 2002-03-07 Chris Demetriou <cgd@broadcom.com>
* igen.c (print_itrace_format): Add support for a new "%#lx" format.
2002-03-08 00:36:32 +00:00
Stephane Carrez 86596dc8e0 * m68hc11_sim.c (cpu_move8): Call sim_engine_abort in default case.
(cpu_move16): Likewise.
	(sim_memory_error): Use sim_io_printf.
	(cpu_option_handler): Fix compilation warning.
	* interp.c (sim_hw_configure): Fix compilation warning;
	remove m68hc12sio@2 device.
	(sim_open): Likewise.
	* dv-m68hc11tim.c (m68hc11tim_port_event): Fix clear of TFLG2
	flags when reset.
	(cycle_to_string): Improve convertion of cpu cycle number.
	(m68hc11tim_info): Print info about PACNT.
	(m68hc11tim_io_write_buffer): Fix clearing of TFLG2; handle
	TCTL1 and TCTL2 registers.
	* dv-m68hc11.c (m68hc11_info): Print 6811 current running mode.
2002-03-07 19:17:04 +00:00
Stephane Carrez 827ec39a5a * interp.c (sim_hw_configure): Save the HW cpu pointer in the
cpu struct.
	(sim_hw_configure): Connect the capture input/output events.
	* sim-main.h (_sim_cpu): New member hw_cpu.
	(m68hc11cpu_set_oscillator): Declare.
	(m68hc11cpu_clear_oscillator): Declare.
	(m68hc11cpu_set_port): Declare.
	* dv-m68hc11.c (m68hc11_options): New for oscillator commands.
	(m68hc11cpu_ports): New input ports and output ports to reflect
	the HC11 IOs.
	(m68hc11_delete): Cleanup any running oscillator.
	(attach_m68hc11_regs): Create the input oscillators.
	(make_oscillator): New function.
	(find_oscillator): New function.
	(oscillator_handler): New function.
	(reset_oscillators): New function.
	(m68hc11cpu_port_event): Handle the new input ports.
	(m68hc11cpu_set_oscillator): New function.
	(m68hc11cpu_clear_oscillator): New function.
	(get_frequency): New function.
	(m68hc11_option_handler): New function.
	(m68hc11cpu_set_port): New function.
	(m68hc11cpu_io_write): Post the port output events.
	* dv-m68hc11spi.c (set_bit_port): Use m68hc11cpu_set_port to set
	the output port value.
	* dv-m68hc11tim.c (m68hc11tim_port_event): Handle CAPTURE event
	by latching the TCNT value in the register.
2002-03-07 19:12:44 +00:00
Stephane Carrez 5abb9efa08 * sim-main.h (cpu_frame, cpu_frame_list): Remove.
(cpu_frame_reg, cpu_print_frame): Remove.
	(cpu_m68hc11_push_uint8, cpu_m68hc11_pop_uint8): Cleanup.
	(cpu_m68hc11_push_uint16, cpu_m68hc11_pop_uint16): Likewise.
	(cpu_m68hc12_push_uint8, cpu_m68hc12_push_uint16): Likewise.
	(cpu_m68hc12_pop_uint8, cpu_m68hc12_pop_uint16): Likewise.
	* m68hc11_sim.c (cpu_find_frame): Remove.
	(cpu_create_frame_list): Remove.
	(cpu_remove_frame_list, cpu_create_frame, cpu_free_frame): Remove.
	(cpu_frame_reg, cpu_print_frame, cpu_update_frame): Remove.
	(cpu_call): Cleanup to remove #if HAVE_FRAME and calls to the above.
	(cpu_update_frame): Likewise.
	(cpu_return): Likewise.
	(cpu_reset): Likewise.
	(cpu_initialize): Likewise.
	* interp.c (sim_do_command): Remove call to cpu_print_frame.
2002-03-07 19:06:34 +00:00
Stephane Carrez 261289656f * interrupts.c (interrupts_reset): New function, setup interrupt
vector address according to cpu mode.
	(interrupts_initialize): Move reset portion to the above.
	(interrupt_names): New table to give a name to interrupts.
	(idefs): Handle pulse accumulator interrupts.
	(interrupts_info): Print the interrupt history.
	(interrupt_option_handler): New function.
	(interrupt_options): New table of options.
	(interrupts_update_pending): Keep track of when interrupts are
	raised and implement breakpoint-on-raise-interrupt.
	(interrupts_process): Keep track of when interrupts are taken
	and implement breakpoint-on-interrupt.
	* interrupts.h (struct interrupt_history): Define.
	(struct interrupt): Keep track of the interrupt history.
	(interrupts_reset): Declare.
	(interrupts_initialize): Update prototype.
	* m68hc11_sim.c (cpu_reset): Reset interrupts.
	(cpu_initialize): Cleanup.
2002-03-07 18:59:38 +00:00
Stephane Carrez 44befb9ff7 * MAINTAINERS: Record self as maintainer of m68hc11 simulator. 2002-03-06 20:15:53 +00:00
Chris Demetriou b96e7ef1a0 2002-03-05 Chris Demetriou <cgd@broadcom.com>
* sim-main.h (UndefinedResult, Unpredictable): New macros
        which currently do nothing.
2002-03-06 06:46:29 +00:00
Chris Demetriou d35d4f709f 2002-03-05 Chris Demetriou <cgd@broadcom.com>
* sim-main.h (status_UX, status_SX, status_KX, status_TS)
        (status_PX, status_MX, status_CU0, status_CU1, status_CU2)
        (status_CU3): New definitions.

        * sim-main.h (ExceptionCause): Add new values for MIPS32
        and MIPS64: MDMX, MCheck, CacheErr.  Update comments
        for DebugBreakPoint and NMIReset to note their status in
        MIPS32 and MIPS64.
        (SignalExceptionMDMX, SignalExceptionWatch, SignalExceptionMCheck)
        (SignalExceptionCacheErr): New exception macros.
2002-03-06 06:21:17 +00:00
Chris Demetriou 3ad6f714f2 2002-03-05 Chris Demetriou <cgd@broadcom.com>
* mips.igen (check_fpu): Enable check for coprocessor 1 usability.
        * sim-main.h (COP_Usable): Define, but for now coprocessor 1
        is always enabled.
        (SignalExceptionCoProcessorUnusable): Take as argument the
        unusable coprocessor number.
2002-03-06 05:41:40 +00:00
Chris Demetriou 97a88e93be fix month on 4 of my recent entries (*sigh*) 2002-03-05 22:25:06 +00:00
Chris Demetriou 86b77b471b 2002-03-05 Chris Demetriou <cgd@broadcom.com>
* mips.igen: Fix formatting of all SignalException calls.
2002-03-05 22:24:24 +00:00
Chris Demetriou 3dea6720b3 2002-02-05 Chris Demetriou <cgd@broadcom.com>
* sim-main.h (SIGNEXTEND): Remove.
2002-03-05 19:22:13 +00:00
Chris Demetriou b5040d49af 2002-02-04 Chris Demetriou <cgd@broadcom.com>
* mips.igen: Remove gencode comment from top of file, fix
        spelling in another comment.
2002-03-05 07:34:01 +00:00
Chris Demetriou 8612006bd7 2002-02-04 Chris Demetriou <cgd@broadcom.com>
* mips.igen (check_fmt, check_fmt_p): New functions to check
        whether specific floating point formats are usable.
        (ABS.fmt, ADD.fmt, CEIL.L.fmt, CEIL.W, DIV.fmt, FLOOR.L.fmt)
        (FLOOR.W.fmt, MOV.fmt, MUL.fmt, NEG.fmt, RECIP.fmt, ROUND.L.fmt)
        (ROUND.W.fmt, RSQRT.fmt, SQRT.fmt, SUB.fmt, TRUNC.L.fmt, TRUNC.W):
        Use the new functions.
        (do_c_cond_fmt): Remove format checks...
        (C.cond.fmta, C.cond.fmtb): And move them into all callers.
2002-03-05 03:14:56 +00:00
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