MIPS is always multi-arch enabled.
[deliverable/binutils-gdb.git] / gdb / config / mips / tm-irix5.h
1 /* Target machine description for SGI Iris under Irix 5, for GDB.
2 Copyright 1990-1993, 1995, 2000 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21 #include "mips/tm-irix3.h"
22
23 /* FIXME: cagney/2000-04-04: Testing the _MIPS_SIM_NABI32 and
24 _MIPS_SIM in a tm-*.h file is simply wrong! Those are
25 host-dependant macros (provided by /usr/include) and stop any
26 chance of the target being cross compiled */
27 #if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32
28 /*
29 * Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs
30 */
31
32 #undef REGISTER_BYTES
33 #define REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE)
34
35 #undef REGISTER_BYTE
36 #define REGISTER_BYTE(N) \
37 (((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \
38 ((N) < FP0_REGNUM + 32) ? \
39 FP0_REGNUM * MIPS_REGSIZE + \
40 ((N) - FP0_REGNUM) * sizeof(double) : \
41 32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE)
42
43 #undef REGISTER_VIRTUAL_TYPE
44 #define REGISTER_VIRTUAL_TYPE(N) \
45 (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \
46 : ((N) == 32 /*SR*/) ? builtin_type_uint32 \
47 : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \
48 : builtin_type_int)
49
50 #undef MIPS_LAST_ARG_REGNUM
51 #define MIPS_LAST_ARG_REGNUM 11 /* N32 uses R4 through R11 for args */
52
53 /* MIPS_STACK_ARGSIZE -- how many bytes does a pushed function arg take
54 up on the stack? For the n32 ABI, eight bytes are reserved for each
55 register. Like MIPS_SAVED_REGSIZE but different. */
56 #define MIPS_DEFAULT_STACK_ARGSIZE 8
57
58 /* N32 does not reserve home space for registers used to carry
59 parameters. */
60 #define MIPS_REGS_HAVE_HOME_P 0
61
62 /* Force N32 ABI as the default. */
63 #define MIPS_DEFAULT_ABI MIPS_ABI_N32
64
65 #endif /* N32 */
66
67
68 /* The signal handler trampoline is called _sigtramp. */
69 #undef IN_SIGTRAMP
70 #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name))
71
72 /* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to
73 get to the saved PC (the register mask and status register are both
74 32 bits) and then another 4 to get to the lower 32 bits. We skip
75 the same 4 bytes, plus the 8 bytes for the PC to get to the
76 registers, and add another 4 to get to the lower 32 bits. We skip
77 8 bytes per register. */
78 #undef SIGFRAME_PC_OFF
79 #define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4 + 4)
80 #undef SIGFRAME_REGSAVE_OFF
81 #define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4)
82 #undef SIGFRAME_FPREGSAVE_OFF
83 #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4)
84 #define SIGFRAME_REG_SIZE 8
This page took 0.035316 seconds and 5 git commands to generate.