]>
Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* Target machine description for SGI Iris under Irix 5, for GDB. |
2 | Copyright 1990, 1991, 1992, 1993, 1995 Free Software Foundation, Inc. | |
3 | ||
c5aa993b | 4 | This file is part of GDB. |
c906108c | 5 | |
c5aa993b JM |
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. | |
c906108c | 10 | |
c5aa993b JM |
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. | |
c906108c | 15 | |
c5aa993b JM |
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. */ | |
c906108c SS |
20 | |
21 | #include "mips/tm-irix3.h" | |
22 | ||
23 | #if defined (_MIPS_SIM_NABI32) && _MIPS_SIM == _MIPS_SIM_NABI32 | |
24 | /* | |
25 | * Irix 6 (n32 ABI) has 32-bit GP regs and 64-bit FP regs | |
26 | */ | |
27 | ||
28 | #undef REGISTER_BYTES | |
29 | #define REGISTER_BYTES (MIPS_NUMREGS * 8 + (NUM_REGS - MIPS_NUMREGS) * MIPS_REGSIZE) | |
30 | ||
31 | #undef REGISTER_BYTE | |
32 | #define REGISTER_BYTE(N) \ | |
33 | (((N) < FP0_REGNUM) ? (N) * MIPS_REGSIZE : \ | |
34 | ((N) < FP0_REGNUM + 32) ? \ | |
35 | FP0_REGNUM * MIPS_REGSIZE + \ | |
36 | ((N) - FP0_REGNUM) * sizeof(double) : \ | |
37 | 32 * sizeof(double) + ((N) - 32) * MIPS_REGSIZE) | |
38 | ||
39 | #undef REGISTER_VIRTUAL_TYPE | |
40 | #define REGISTER_VIRTUAL_TYPE(N) \ | |
41 | (((N) >= FP0_REGNUM && (N) < FP0_REGNUM+32) ? builtin_type_double \ | |
42 | : ((N) == 32 /*SR*/) ? builtin_type_uint32 \ | |
43 | : ((N) >= 70 && (N) <= 89) ? builtin_type_uint32 \ | |
44 | : builtin_type_int) | |
45 | ||
46 | #undef MIPS_LAST_ARG_REGNUM | |
c5aa993b | 47 | #define MIPS_LAST_ARG_REGNUM 11 /* N32 uses R4 through R11 for args */ |
c906108c SS |
48 | |
49 | #undef MIPS_NUM_ARG_REGS | |
50 | #define MIPS_NUM_ARG_REGS 8 | |
51 | ||
52 | #endif /* N32 */ | |
53 | ||
54 | /* When calling functions on Irix 5 (or any MIPS SVR4 ABI compliant | |
55 | platform) $25 must hold the function address. Dest_Reg is a macro | |
56 | used in CALL_DUMMY in tm-mips.h. */ | |
57 | #undef Dest_Reg | |
58 | #define Dest_Reg 25 | |
59 | ||
60 | /* The signal handler trampoline is called _sigtramp. */ | |
61 | #undef IN_SIGTRAMP | |
62 | #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigtramp", name)) | |
63 | ||
64 | /* Irix 5 saves a full 64 bits for each register. We skip 2 * 4 to | |
65 | get to the saved PC (the register mask and status register are both | |
66 | 32 bits) and then another 4 to get to the lower 32 bits. We skip | |
67 | the same 4 bytes, plus the 8 bytes for the PC to get to the | |
68 | registers, and add another 4 to get to the lower 32 bits. We skip | |
69 | 8 bytes per register. */ | |
70 | #undef SIGFRAME_PC_OFF | |
71 | #define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4 + 4) | |
72 | #undef SIGFRAME_REGSAVE_OFF | |
73 | #define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 4) | |
74 | #undef SIGFRAME_FPREGSAVE_OFF | |
75 | #define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 2 * 4 + 8 + 32 * 8 + 4) | |
76 | #define SIGFRAME_REG_SIZE 8 |