hp300 native support
[binutils-gdb.git] / gdb / nm-hp300bsd.h
1 /* Parameters for Hewlett-Packard 9000/300 native support under bsd.
2 Copyright 1986, 1987, 1989, 1991, 1992 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20 /* This is a piece of magic that is given a register number REGNO
21 and as BLOCKEND the address in the system of the end of the user structure
22 and stores in ADDR the address in the kernel or core dump
23 of that register. */
24
25 #define REGISTER_U_ADDR(addr, blockend, regno) \
26 { \
27 if (regno < PS_REGNUM) \
28 addr = (int) &((struct frame *)(blockend))->f_regs[regno]; \
29 else if (regno == PS_REGNUM) \
30 addr = (int) &((struct frame *)(blockend))->f_stackadj; \
31 else if (regno == PC_REGNUM) \
32 addr = (int) &((struct frame *)(blockend))->f_pc; \
33 else if (regno < FPC_REGNUM) \
34 addr = (int) \
35 &((struct user *)0)->u_pcb.pcb_fpregs.fpf_regs[((regno)-FP0_REGNUM)*3];\
36 else if (regno == FPC_REGNUM) \
37 addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpcr; \
38 else if (regno == FPS_REGNUM) \
39 addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpsr; \
40 else \
41 addr = (int) &((struct user *)0)->u_pcb.pcb_fpregs.fpf_fpiar; \
42 }
43