1 /* Native-dependent code for FreeBSD/sparc64.
3 Copyright 2003 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
24 #include "sparc64-tdep.h"
25 #include "sparcbsd-nat.h"
27 /* Determine whether `struct reg' contains register REGNUM. */
30 sparc64fbsd_reg_supplies_p (int regnum)
32 /* Integer registers. */
33 if ((regnum >= SPARC_G0_REGNUM && regnum <= SPARC_G7_REGNUM)
34 || (regnum >= SPARC_O0_REGNUM && regnum <= SPARC_O7_REGNUM)
35 || (regnum >= SPARC_L0_REGNUM && regnum <= SPARC_L7_REGNUM)
36 || (regnum >= SPARC_I0_REGNUM && regnum <= SPARC_I7_REGNUM))
39 /* Control registers. */
40 if (regnum == SPARC64_PC_REGNUM
41 || regnum == SPARC64_NPC_REGNUM
42 || regnum == SPARC64_STATE_REGNUM
43 || regnum == SPARC64_FPRS_REGNUM
44 || regnum == SPARC64_Y_REGNUM)
50 /* Determine whether `struct fpreg' contains register REGNUM. */
53 sparc64fbsd_fpreg_supplies_p (int regnum)
55 /* Floating-point registers. */
56 if ((regnum >= SPARC_F0_REGNUM && regnum <= SPARC_F31_REGNUM)
57 || (regnum >= SPARC64_F32_REGNUM && regnum <= SPARC64_F62_REGNUM))
60 /* Control registers. */
61 if (regnum == SPARC64_FSR_REGNUM)
67 /* Provide a prototype to silence -Wmissing-prototypes. */
68 void _initialize_sparc64fbsd_nat (void);
71 _initialize_sparc64fbsd_nat (void)
73 sparcbsd_supply_reg = sparc64fbsd_supply_reg;
74 sparcbsd_fill_reg = sparc64fbsd_fill_reg;
75 sparcbsd_supply_fpreg = sparc64fbsd_supply_fpreg;
76 sparcbsd_fill_fpreg = sparc64fbsd_fill_fpreg;
78 sparcbsd_reg_supplies_p = sparc64fbsd_reg_supplies_p;
79 sparcbsd_fpreg_supplies_p = sparc64fbsd_fpreg_supplies_p;