Commit Graph

83 Commits

Author SHA1 Message Date
Andrew Cagney 778eb05eac LITTLE_ENDIAN -> BFD_ENDIAN_LITTLE 2001-12-15 16:53:24 +00:00
Elena Zannoni 2bf0cb6592 2001-09-05 Elena Zannoni <ezannoni@redhat.com>
* gdbarch.sh: Move include of dis-asm.h so it is generated earlier
        in gdbarch.h.
        (TARGET_PRINT_INSN): Multiarch.
        * gdbarch.h: Regenerate.
        * gdbarch.c: Regenerate.

        * arch-utils.c (legacy_print_insn): New function.
        * arch-utils.h (legacy_print_insn): Export.

        * cris-tdep.c (cris_delayed_get_disassembler): Use
        TARGET_PRINT_INSN, instead of tm_print_insn.
        * d10v-tdep.c (print_insn): Ditto.
        * d30v-tdep.c (print_insn): Ditto.
        * m32r-tdep.c (dump_insn): Ditto.
        * v850-tdep.c (v850_scan_prologue): Ditto.
        * mcore-tdep.c (mcore_dump_insn): Ditto.
        * sh-tdep.c (sh_gdbarch_init): Set print_insn gdbarch field.
2001-09-05 23:44:44 +00:00
Andrew Cagney d16aafd8c8 * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(HOST_LONG_DOUBLE_FORMAT, DOUBLEST)
(floatformat_to_doublest, floatformat_from_doublest)
(floatformat_is_negative, floatformat_is_nan)
(floatformat_mantissa, store_floating)
(extract_floating): Move declaration from here.
* doublest.h: To here.  New file.
* utils.c (get_field, floatformat_to_doublest, put_field)
(ldfrexp, floatformat_from_doublest, floatformat_is_negative)
(floatformat_is_nan, floatformat_mantissa)
(FLOATFORMAT_CHAR_BIT): Move from here.
* doublest.c: To here.  New file.
* findvar.c (store_floating, extract_floating): Move from here.
* doublest.c: To here.
* Makefile.in (SFILES): Add doublest.c.
(COMMON_OBS): Add doublest.o.
(doublest.o): Specify dependencies.
(doublest_h): Define.

* config/m88k/tm-m88k.h: Include "doublest.h".
* config/i960/tm-i960.h: Ditto.
* config/i386/tm-symmetry.h: Ditto.
* rs6000-tdep.c, valarith.c: Ditto.
* valprint.c, stabsread.c, sh-tdep.c: Ditto.
* ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto.
* values.c, arm-tdep.c, arm-linux-tdep.c: Ditto.
* alpha-tdep.c, ax.h, expression.h: Ditto.
* sh-tdep.c, parse.c, top.c, value.h: Ditto.

* Makefile.in (arm-tdep.o): Add $(doublest_h).
(i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto.
(rs6000-tdep.o, stabsread.o, valarith.o): Ditto.
(values.o, valprint.o, arm-linux-tdep.o): Ditto.
(alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto.
(parser_defs_h): Ditto.
(expression_h): Add $(doublest_h) and $(symtab_h).
2001-08-01 18:39:27 +00:00
Elena Zannoni 88e04cc199 2001-07-26 Elena Zannoni <ezannoni@redhat.com>
* sh-tdep.c (sh_gdbarch_init): Use SH_DEFAULT_NUM_REGS instead of
	NUM_REGS.
	(SH_DEFAULT_NUM_REGS): Define.
2001-07-27 03:29:08 +00:00
Andrew Cagney ea7c478fe2 s/value_ptr/struct value */ 2001-07-15 20:10:02 +00:00
Elena Zannoni 3bbfbb92b3 2001-07-11 Elena Zannoni <ezannoni@redhat.com>
* config/sh/tm-sh.h (struct gdbarch_tdep): Add
	FLOAT_ARGLAST_REGNUM, RETURN_REGNUM, ARG0_REGNUM, ARGLAST_REGNUM,
	PR_REGNUM fields.

	* sh-tdep.c (sh_skip_prologue_hard_way): Rename from
	skip_prologue_hard_way().
	(skip_prologue_hard_way): Make it a function pointer.
        (sh_print_register): Use function pointer do_pseudo_register,
	instead of sh_do_pseudo_register.
        (sh_do_registers_info): Ditto.
        (sh_gdbarch_init): Initialize do_pseudo_register.
	(IS_MOV_TO_R14): Rename from IS_MOV_R14.
	(skip_prologue_hard_way): Update.
	(sh_gdbarch_init): Move setting of frame_chain,
	get_saved_register, init_extra_frame_info, push_arguments,
	extract_return_value, pop_frame, store_struct_return,
	extract_struct_value_address, use_struct_convention,
	init_extra_frame_info to before target specific settings.
	(sh_gdbarch_init): Initialize new tdep fields
	FLOAT_ARGLAST_REGNUM, RETURN_REGNUM, ARG0_REGNUM, ARGLAST_REGNUM,
	PR_REGNUM.
	(sh_push_arguments): Use new gdbarch_tdep fields
	{ARG0,ARGLAST}_REGNUM.
	(sh_saved_pc_after_call, sh_nofp_frame_init_saved_regs,
	sh_init_extra_frame_info, sh_push_return_address,
	sh_generic_show_regs, sh3_show_regs, sh3e_show_regs,
	sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs): Update to use
	gdbarch_tdep->PR_REGNUM.
	(dr_reg_base_num, fv_reg_base_num): Move to earlier in the file.
2001-07-12 02:29:33 +00:00
Elena Zannoni 74a151fa4a 2001-05-09 Elena Zannoni <ezannoni@redhat.com>
* sh3-rom.c (_initialize_sh3_rom): Get rid of specific _WINDOWS
 	conditional for help with connections through parallel ports,
 	given that the actual code for downloading through a parallel port
 	is not conditionalized.

	* sh-tdep.c: Remove WIN32_WCE conditional. The wince sh target is
 	unmaintaned, and probably on its way to obsolescence.
2001-05-09 17:51:01 +00:00
Elena Zannoni 7f4dbe9449 2001-04-30 Elena Zannoni <ezannoni@redhat.com>
* sh-tdep.c: Get rid of the function prototypes.
      (sh_sh4_build_float_register_type): Move earlier in file.
      (fv_reg_base_num): Ditto.
      (dr_reg_base_num): Ditto.
2001-04-30 20:57:31 +00:00
Andrew Cagney 93d56215df Gag -Wuninitialized warnings.
Add -Wuninitialized to default warning list.
2001-03-28 21:42:32 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 4e052eda91 Create new file regcache.h. Update all uses. 2001-03-01 01:39:22 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Elena Zannoni 3116c80aec 2001-02-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c: Update copyright.
      (sh_extract_return_value): Rewrite.
      (sh3e_sh4_extract_return_value): New function.
      (sh_gdbarch_init): Initialize gdbarch_extract-return_value to new
      version of the function for sh3e and sh4 CPUs.
2001-02-06 02:00:44 +00:00
Michael Snyder d19b71becf 2001-01-02 Michael Snyder <msnyder@cleaver.cygnus.com>
* sh-tdep.c (sh_extract_return_value):  Allow for small return type.
        (sh_sh4_extract_return_value): Call sh_extract_return_value for
2001-01-02 23:51:35 +00:00
Michael Snyder 3cac1297fb Remove prototypes for obsolete static functions. 2001-01-02 20:49:18 +00:00
Michael Snyder c347ee3e51 2000-12-20 Michael Snyder <msnyder@mvstp600e.cygnus.com>
* arch-utils.c (default_frame_address): New function.  Default
        implementation of frame_args_address and frame_locals_address.
        * arch-utils.h (default_frame_address): Export.
        * d10v-tdep.c (d10v_gdbarch_init): Use default_frame_address.
        (d10v_frame_args_address, d10v_frame_locals_address): Delete.
        * sh-tdep.c (sh_gdbarch_init): Use default_frame_address.
        (sh_frame_args_address, sh_frame_locals_address): Delete.
        * sparc-tdep.c (sparc_gdbarch_init): Use default_frame_address.
        (sparc_frame_address): Delete.
2001-01-02 20:21:53 +00:00
Elena Zannoni e30839fee3 2000-12-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_print_register): Don't leave regnum 0 out of the
       non-pseudo-regs group.
2000-12-19 23:20:45 +00:00
Elena Zannoni eaf90c5d1f 2000-12-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_gdbarch_init): Move setting of breakpoint_from_pc
	to before switch statement.
2000-12-19 15:41:07 +00:00
Elena Zannoni c5f7d19c5a 2000-12-17 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_gdbarch_init): Initialize do_registers_info.

        * config/sh/tm-sh.h (DO_REGISTERS_INFO): Remove macro. Use
        multiarch version instead.
2000-12-18 04:36:35 +00:00
Elena Zannoni c62a7c7ba7 2000-12-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh3e_show_regs,
 	sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs): SR_REGNUM is
 	now part of gdbarch_tdep structure.
	(sh_gdbarch_init): Initialize SR_REGNUM.

	* config/sh/tm-sh.h (struct gdbarch_tdep): Add field SR_REGNUM.
2000-12-15 21:44:35 +00:00
Elena Zannoni a38d2a54be 2000-12-15 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_do_pseudo_register): Indent properly. Call
 	do_dr_register_info() only for DR registers.
	(sh_sh4_register_name): Add comments with numbers.
	(_initialize_sh_tdep): Move assignment to disassemble printing
 	function from here...
	(sh_gdbarch_init):...to here. Move some more general settings to
 	before the architecture is recognized.
2000-12-15 20:54:24 +00:00
Michael Snyder 0c8053b6bb 2000-12-11 Michael Snyder <msnyder@cleaver.cygnus.com>
* sh-tdep.c (sh_extract_struct_value_address): Protoize.

2000-12-11  Michael Snyder  <msnyder@mvstp600e.cygnus.com>

	* blockframe.c (get_prev_frame): Add missing paren omitted in
	last check-in.
2000-12-11 21:34:27 +00:00
Michael Snyder b3df3fffb8 2000-12-11 Michael Snyder <msnyder@cleaver.cygnus.com>
* sh-tdep.c (sh_extract_struct_value_address): For consistancy,
        change decl from "CORE_ADDR static" to "static CORE_ADDR".
2000-12-11 21:04:04 +00:00
Elena Zannoni e6c42fda06 2000-12-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* config/sh/tm-sh.h (struct gdbarch_tdep): Rename fields
        {FP15,DR14,FV12}_REGNUM to {FP,DR,FV}_LAST_REGNUM.
	* sh-tdep.c (sh_sh3e_register_virtual_type,
 	sh_sh4_register_virtual_type, sh_do_registers_info,
 	sh_gdbarch_init, sh_sh4_register_byte, sh_sh4_register_raw_size,
 	sh_sh4_register_convertible, sh_sh4_register_convert_to_virtual,
 	sh_sh4_register_convert_to_raw, sh_fetch_pseudo_register,
 	sh_store_pseudo_register, sh_do_pseudo_register): Ditto.

	* sh-tdep.c (sh_gdbarch_init): Use a function pointer to set the
        disassembly print function.
	(_initialize_sh_tdep): Initialize tm_print_insn using the function
 	pointer.
2000-12-07 16:40:44 +00:00
Elena Zannoni c2ab3f09a1 2000-12-05 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* config/sh/tm-sh.h (struct gdbarch_tdep): Get rid of
        DR{2,4,6,8,10,12}_REGNUM, FV{4,8}_REGNUM, they are not used
        anywhere.
        * sh-tdep.c (sh_gdbarch_init): Don't initialize
        DR{2,4,6,8,10,12}_REGNUM, FV{4,8}_REGNUM.
2000-12-05 17:50:28 +00:00
Michael Snyder 1a8629c735 2000-10-30 Michael Snyder <msnyder@cleaver.cygnus.com>
* config/sh/tm-linux.h: New file.  Include generic tm-linux.h,
	plus tm-sh.h, then define SVR4_FETCH_LINK_MAP_OFFSETS to use
	the sh target function instead of the default link map offsets.
	* config/sh/sh.mt: Add solib.o and solib-svr4.o to TDEPFILES.
	Use sh/tm-linux.h instead of sh/tm-sh.h.
	* sh-tdep.c (sh_linux_svr4_fetch_link_map_offsets):
	New function.  Construct target-specific link map offsets.
	* i386-linux-tdep.c (i386_linux_svr4_fetch_link_map_offsets:
	New function.  Construct target-specific link map offsets.
	* config/i386/tm-linux.h: Use above function instead of default.

2000-10-30  Michael Snyder  <msnyder@cleaver.cygnus.com>

	* config/i386/tm-linux.h: Remove definition of SVR4_SHARED_LIBS,
	and inclusion of solib.h.  Move up into ../tm-linux.h.
	config/tm-linux.h: Define SVR4_SHARED_LIBS, include solib.h.
2000-10-31 19:35:04 +00:00
J.T. Conklin 8e1a459b89 * gdbarch.sh, hp-psymtab-read.c, hpread.c, m3-nat.c, mcore-tdep.c,
mips-tdep.c, monitor.c, regcache.c, remote-es.c, ser-unix.c,
somread.c, tracepoint.c: Fix spelling errors in comments.
* gdbarch.c: Regenerate.

* gnu-nat.c (S_exception_raise_request): Fix typos and spelling
errors in strings.
* m3-nat.c (intercept_exec_calls, mach_thread_parse_id): Likewise.
* mcore-tdep.c (mcore_analyze_prologue): Likewise.
* mips-tdep.c (mips16_next_pc, _initialize_mips_tdep): Likewise.
* remote-e7000.c (e7000_start_remote): Likewise.
* remote-rdp.c (handle_swi): Likewise.
* remote-vx.c (vx_load_command): Likewise.
* sh-tdep.c (sh_do_pseudo_register): Likewise.
* sol-thread.c (td_err_string): Likewise.
* symtab.c (decode_line_2): Likewise.
-------------------------------------------------------------------
2000-10-30 21:50:58 +00:00
Elena Zannoni 34e9d9bbe1 2000-07-31 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_push_arguments): Make header match prototype.

	* remote-e7000.c (e7000_start_remote): Use void *, not char * as
 	parameter to avoid compiler warning.
	(fetch_regs_from_dump): Call get_hex() with the correct number of
 	parameters.
2000-07-31 16:25:36 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Elena Zannoni fb40974593 2000-07-28 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_gdbarch_init): For sh4 initialize
 	register_convert_to_raw, register_convert_to_virtual,
 	register_convertible.
	(sh_sh4_register_convertible): New function.
	(sh_sh4_register_convert_to_virtual): New function.
	(sh_sh4_register_convert_to_raw): New function.
	Include floatformat.h.
2000-07-28 15:16:16 +00:00
Elena Zannoni fe9f384f16 2000-07-26 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* sh-tdep.c (sh_sh4_register_name, sh_sh4_register_byte,
 	sh_sh4_register_raw_size, sh_sh4_register_virtual_type,
 	sh_fetch_pseudo_register, sh_store_pseudo_register,
 	sh_do_pseudo_register, sh_gdbarch_init): Fix names for pseudoregs,
 	they should be numbered as drx fvy where x and y are multiples of
 	2 and 4 respectively.

	* config/sh/tm-sh.h: Fix names of pseudo regs.
2000-07-26 23:04:44 +00:00
Elena Zannoni 53116e27b6 2000-07-24 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* config/sh/tm-sh.h (struct gdbarch_tdep): Add sh4 specific
 	pseudo registers.
	(DO_REGISTERS_INFO): Define.

	* sh-tdep.c (sh_sh4_register_name): New function.
	(sh_generic_show_regs, sh3_show_regs, sh3e_show_regs,
 	sh3_dsp_show_regs, sh4_show_regs, sh_dsp_show_regs): Update
 	signature.
	(sh_show_regs_command): New function. Actual function called by
 	the 'regs' command.
	(sh_register_byte): Rename to...
	(sh_default_register_byte): ...New function.
	(sh_sh4_register_byte): New function.
	(sh_register_raw_size): Rename to...
	(sh_default_register_raw_size): ...New function.
	(sh_sh4_register_raw_size): New function.
	(sh_sh4_register_virtual_type): New function.
	(sh_sh4_build_float_register_type): New function.
	(sh_fetch_pseudo_register, sh_store_pseudo_register): New
 	functions.
	(fv_reg_base_num, dr_reg_base_num): New functions.
	(do_fv_register_info, do_dr_register_info, sh_do_pseudo_register,
 	sh_do_fp_register, sh_do_register, sh_print_register,
 	sh_do_registers_info): New functions.
	(sh_gdbarch_init): Initialize sh4 pseudo registers to -1. Update
 	architecture specific parts.
	(_initialize_sh_tdep): Use sh_show_regs_command for 'regs' command.
2000-07-24 20:39:21 +00:00
Elena Zannoni cc17453a58 2000-07-19 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
Multiarch the sh target.
	* sh-tdep.c:
	(sh_generic_reg_names, sh_reg_names,sh3_reg_names, sh3e_reg_names,
 	sh_dsp_reg_names, sh3_dsp_reg_names, sh_processor_type_table):
 	Remove.
	(XMALLOC): Define.
	(struct frame_extra_info): Define.
	(sh_register_raw_size, sh_register_virtual_size,
 	sh_register_virtual_type, sh_register_byte, sh_breakpoint_from_pc,
 	sh_frame_saved_pc, sh_skip_prologue,
 	sh_nofp_frame_init_saved_regs, sh_fp_frame_init_saved_regs,
 	sh_extract_struct_value_address, sh_use_struct_convention,
 	sh_store_struct_return, sh_push_arguments, sh_push_return_address,
 	sh_saved_pc_after_call, sh_generic_register_name,
 	sh_sh_register_name, sh_sh3_register_name, sh_sh3e_register_name,
 	sh_sh_dsp_register_name, sh_sh3_dsp_register_name,
 	sh_frame_args_address, sh_frame_locals_address,
 	sh_coerce_float_to_double, sh_default_store_return_value,
 	sh3e_sh4_store_return_value, sh_generic_show_regs,
 	sh3_show_regs,sh3e_show_regs, sh3_dsp_show_regs, sh4_show_regs,
 	sh_dsp_show_regs, sh_register_byte, sh_register_raw_size,
 	sh_register_virtual_size, sh_sh3e_register_virtual_type,
 	sh_default_register_virtual_type, sh_gdbarch_init): New functions.
	(sh_target_architecture_hook, sh_frame_find_saved_regs,
 	sh_show_regs): Delete functions.
	(sh_frame_chain, sh_find_callers_reg, sh_init_extra_frame_info,
 	sh_pop_frame, sh_extract_return_value): Update

	* config/sh/tm-sh.h (GDB_MULTI_ARCH): Define to 1.
	(struct gdbarch_tdep): Define.
	Remove all unnecessary defines.

	* remote-e7000.c ({PR,GBR,SR,MACL,VBR,MACH}_REGNUM): Define to -1,
 	for h8300 case.
	(want_sh,want_nopc_sh,want_nopc_sh3): Make nomenclature
 	consistent.
	(e7000_fetch_registers): Remove ifdef GDB_TARGET_IS_SH, use
 	runtime check instead.
	(e7000_wait): Ditto.

	* sh3-rom.c (sh3_supply_register): Use gdbarch_tdep to get the SSR
 	and SPC register numbers.
	(sh3_regnames, sh3e_regnames): Don't specify a size.

	* config/h8300/tm-h8300.h: Add comment.
2000-07-19 14:11:42 +00:00
Elena Zannoni 8db62801bd 2000-07-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* config/sh/tm-sh.h (STORE_RETURN_VALUE): Redefine as
 	sh_store_return_value().
	* sh-tdep.c (sh_store_return_value): New function. Store the
 	value returned by a function into the appropriate register.

2000-07-10  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>

        * sh-tdep.c (sh_skip_prologue): Before looking at the actual
 	instructions, try to see if the symbol table can be of help, by
 	calling after_prologue(). If this doesn't work, call
 	skip_prologue_hard_way().
	(skip_prologue_hard_way): Renamed from sh_skip_prologue. Add some
 	more instruction pattern matching for pushing of arguments, and
 	manipulation of r14.
	(after_prologue): New function. Use symbol table info to determine
 	the end of the prologue, if possible.
2000-07-10 14:43:37 +00:00
Elena Zannoni 2bfa91eece 2000-07-03 Christopher Faylor <cgf@cygnus.com>
Committed by Elena Zannoni <ezannoni@cygnus.com>
	* sh-tdep.c (sh_skip_prologue): Change prologue matching for modern
	compilers.
	(sh_frame_find_saved_regs): Ditto.
	(sh_find_callers_reg): Stop if pc is zero.
2000-07-03 18:59:36 +00:00
Andrew Cagney b4a2023990 The attatched moves the remaining guff from gdbarch.{h,c,sh} to
arch-utils.{h,c}.  The ``set architecutre'' and ``set endian''
commands (part of the move) were implemented to use add_set_enum_cmd()
so that ``set architecture <tab>'' works.
2000-06-07 04:38:02 +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
Andrew Cagney b71896da7e Add sh2 to list of known architectures. 2000-03-20 07:28:05 +00:00
Christopher Faylor 091be84d73 * configure.tgt: Add arm, mips, sh wince targets.
* config/arm/tm-wince.h: New file.
* config/arm/wince.mt New file.
* config/sh/tm-wince.h: New file.
* config/sh/wince.mt New file.
* config/mips/tm-wince.h: New file.
* config/mips/wince.mt New file.
* wince.c: New file.
* wince-stub.c: New file.
* wince-stub.h: New file.
* sh-tdep.c: Use correct register names for Windows CE.
2000-02-24 03:31:45 +00:00
Nick Clifton 031d1bf1b8 Remove extraneous code. 2000-02-14 18:43:48 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 9846de1bb5 import gdb-1999-07-07 pre reformat 1999-07-07 17:31:57 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +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
Mark Alexander 1eeb1b63fa * sh-tdep.c (sh_target_architecture_hook): Return immediately
when a matching machine is found.
1999-01-26 03:57:32 +00:00
Andrew Cagney aaa3c096db CARP:
Re-do TARGET_PRINT_INSN_INFO, TARGET_PRINT_INSN, TARGET_ARCHITECTURE,
TARGET_ARCHITECTURE_AUTO, TARGET_BYTE_ORDER_SELECTABLE_P,
TARGET_BYTE_ORDER so that they can all be overriden.

Document.

Convert mn10300 and PPC targets.
1998-12-13 23:28:46 +00:00