-/* Parameters for execution on a Hitachi Super-H machine.
+/* Target-specific definition for a Hitachi Super-H.
Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GDB.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Contributed by Steve Chamberlain sac@cygnus.com */
/* Define the bit, byte, and word ordering of the machine. */
-#define TARGET_BYTE_ORDER BIG_ENDIAN
+#define TARGET_BYTE_ORDER_SELECTABLE
/* Offset from address of function to start of its code.
The return address is the value saved in the PR register + 4 */
#define SAVED_PC_AFTER_CALL(frame) \
- (ADDR_BITS_REMOVE(read_register(PR_REGNUM))+4)
+ (ADDR_BITS_REMOVE(read_register(PR_REGNUM)))
/* Stack grows downward. */
/* Illegal instruction - used by the simulator for breakpoint
detection */
-#define BREAKPOINT {0xc3, 0xff} /* 0xc3ff is trapa #ff */
+#define BREAKPOINT {0xc3, 0xc3} /* 0xc3c3 is trapa #c3, and it works in big
+ and little endian modes */
+#define BIG_REMOTE_BREAKPOINT { 0xc3, 0x20 }
+#define LITTLE_REMOTE_BREAKPOINT { 0x20, 0xc3 }
/* If your kernel resets the pc after the trap happens you may need to
define this before including this file. */
/* Nonzero if instruction at PC is a return instruction. */
#define ABOUT_TO_RETURN(pc) (read_memory_integer(pc,2) == 0x000b)
-/* Return 1 if P points to an invalid floating point value. */
-
-#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */
-
/* Say how long registers are. */
#define REGISTER_TYPE long
/* Return the GDB type object for the "standard" data type
of data in register N. */
-#define REGISTER_VIRTUAL_TYPE(N) builtin_type_int
+#define REGISTER_VIRTUAL_TYPE(N) \
+ ((((N) >= FP0_REGNUM && (N) <= FP15_REGNUM) \
+ || (N) == FPUL_REGNUM) \
+ ? builtin_type_float : builtin_type_int)
/* Initializer for an array of names of registers.
Entries beyond the first NUM_REGS are ignored. */
#define REGISTER_NAMES \
- {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
- "r8", "r9", "r10","r11","r12","r13","r14","r15",\
- "pc", "pr","gbr","vbr","mach","macl","sr","ticks","stalls","cycles","insts" ,"plr","tlr" }
-
-#define NUM_REGS 28
+ {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
+ "r8", "r9", "r10","r11","r12", "r13", "r14","r15",\
+ "pc", "pr", "gbr","vbr","mach","macl","sr", \
+ "ssr", "spc", \
+ "r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0", \
+ "r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1", \
+ "fpul","fpscr", \
+ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", \
+ "fr8", "fr9", "fr10","fr11","fr12","fr13","fr14","fr15"\
+ }
+
+#define NUM_REGS 59
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
to be actual register numbers as far as the user is concerned
but do serve to get the desired values when passed to read_register. */
+#define R0_REGNUM 0
#define FP_REGNUM 14
#define SP_REGNUM 15
#define PC_REGNUM 16
#define VBR_REGNUM 19
#define MACH_REGNUM 20
#define MACL_REGNUM 21
-#define CR_REGNUM 22
+#define SR_REGNUM 22
+#define NUM_REALREGS 23
+#define FPUL_REGNUM 41
+#define FP0_REGNUM 43
+#define FP15_REGNUM 58
+#undef NUM_REALREGS
+#define NUM_REALREGS 59
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function.
is a useful bit of info */
#define EXTRA_FRAME_INFO \
- CORE_ADDR return_pc;
+ CORE_ADDR return_pc; \
+ int leaf_function; \
+ int f_offset;
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) \
init_extra_frame_info(fromleaf, fi)
typedef unsigned short INSN_WORD;
-#define ADDR_BITS_REMOVE(addr) ((addr) & 0xffffff)
+#define ADDR_BITS_REMOVE(addr) ((addr))
#define CALL_DUMMY_LENGTH 10
#define POP_FRAME pop_frame();
+
+#define NOP {0x20, 0x0b}
+
+#define REGISTER_SIZE 4
+