| 1 | /* Target-dependent code for UltraSPARC. |
| 2 | |
| 3 | Copyright 2003 Free Software Foundation, Inc. |
| 4 | |
| 5 | This file is part of GDB. |
| 6 | |
| 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. |
| 11 | |
| 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. |
| 16 | |
| 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. */ |
| 21 | |
| 22 | #ifndef SPARC64_TDEP_H |
| 23 | #define SPARC62_TDEP_H 1 |
| 24 | |
| 25 | /* Register numbers of various important registers. */ |
| 26 | |
| 27 | enum sparc_regnum |
| 28 | { |
| 29 | SPARC_G0_REGNUM, /* %g0 */ |
| 30 | SPARC_G1_REGNUM, |
| 31 | SPARC_G2_REGNUM, |
| 32 | SPARC_G3_REGNUM, |
| 33 | SPARC_G4_REGNUM, |
| 34 | SPARC_G5_REGNUM, |
| 35 | SPARC_G6_REGNUM, |
| 36 | SPARC_G7_REGNUM, /* %g7 */ |
| 37 | SPARC_O0_REGNUM, /* %o0 */ |
| 38 | SPARC_O1_REGNUM, |
| 39 | SPARC_O2_REGNUM, |
| 40 | SPARC_O3_REGNUM, |
| 41 | SPARC_O4_REGNUM, |
| 42 | SPARC_O5_REGNUM, |
| 43 | SPARC_SP_REGNUM, /* %sp (%o6) */ |
| 44 | SPARC_O7_REGNUM, /* %o7 */ |
| 45 | SPARC_L0_REGNUM, /* %l0 */ |
| 46 | SPARC_L1_REGNUM, |
| 47 | SPARC_L2_REGNUM, |
| 48 | SPARC_L3_REGNUM, |
| 49 | SPARC_L4_REGNUM, |
| 50 | SPARC_L5_REGNUM, |
| 51 | SPARC_L6_REGNUM, |
| 52 | SPARC_L7_REGNUM, /* %l7 */ |
| 53 | SPARC_I0_REGNUM, /* %i0 */ |
| 54 | SPARC_I1_REGNUM, |
| 55 | SPARC_I2_REGNUM, |
| 56 | SPARC_I3_REGNUM, |
| 57 | SPARC_I4_REGNUM, |
| 58 | SPARC_I5_REGNUM, |
| 59 | SPARC_FP_REGNUM, /* %fp (%i6) */ |
| 60 | SPARC_I7_REGNUM, /* %i7 */ |
| 61 | SPARC_F0_REGNUM, /* %f0 */ |
| 62 | SPARC_F31_REGNUM = SPARC_F0_REGNUM + 31 /* %f31 */ |
| 63 | }; |
| 64 | |
| 65 | enum sparc64_regnum |
| 66 | { |
| 67 | SPARC64_F32_REGNUM = SPARC_F0_REGNUM + 32, /* %f32 */ |
| 68 | SPARC64_F62_REGNUM = SPARC64_F32_REGNUM + 15, /* %f62 */ |
| 69 | SPARC64_PC_REGNUM, /* %pc */ |
| 70 | SPARC64_NPC_REGNUM, /* %npc */ |
| 71 | SPARC64_STATE_REGNUM, |
| 72 | SPARC64_FSR_REGNUM, /* %fsr */ |
| 73 | SPARC64_FPRS_REGNUM, /* %fprs */ |
| 74 | SPARC64_Y_REGNUM, /* %y */ |
| 75 | |
| 76 | /* Pseudo registers. */ |
| 77 | SPARC64_CWP_REGNUM, /* %cwp */ |
| 78 | SPARC64_PSTATE_REGNUM, /* %pstate */ |
| 79 | SPARC64_ASI_REGNUM, /* %asi */ |
| 80 | SPARC64_CCR_REGNUM, /* %ccr */ |
| 81 | SPARC64_D0_REGNUM, /* %d0 */ |
| 82 | SPARC64_D10_REGNUM = SPARC64_D0_REGNUM + 5, /* %d10 */ |
| 83 | SPARC64_D30_REGNUM = SPARC64_D0_REGNUM + 15, /* %d30 */ |
| 84 | SPARC64_D32_REGNUM = SPARC64_D0_REGNUM + 16, /* %d32 */ |
| 85 | SPARC64_D62_REGNUM = SPARC64_D0_REGNUM + 31, /* %d62 */ |
| 86 | SPARC64_Q0_REGNUM, /* %q0 */ |
| 87 | SPARC64_Q8_REGNUM = SPARC64_Q0_REGNUM + 2, /* %q8 */ |
| 88 | SPARC64_Q28_REGNUM = SPARC64_Q0_REGNUM + 7, /* %q28 */ |
| 89 | SPARC64_Q32_REGNUM = SPARC64_Q0_REGNUM + 8, /* %q32 */ |
| 90 | SPARC64_Q60_REGNUM = SPARC64_Q0_REGNUM + 15 /* %q60 */ |
| 91 | }; |
| 92 | |
| 93 | extern void sparc_supply_rwindow (CORE_ADDR sp, int regnum); |
| 94 | extern void sparc_fill_rwindow (CORE_ADDR sp, int regnum); |
| 95 | |
| 96 | /* Functions exported from sparc64fbsd-tdep.c. */ |
| 97 | |
| 98 | extern void sparc64fbsd_supply_reg (const char *regs, int regnum); |
| 99 | extern void sparc64fbsd_fill_reg (char *regs, int regnum); |
| 100 | extern void sparc64fbsd_supply_fpreg (const char *regs, int regnum); |
| 101 | extern void sparc64fbsd_fill_fpreg (char *regs, int regnum); |
| 102 | |
| 103 | #endif /* sparc64-tdep.h */ |