1130803Smarcel/* Target-dependent header for the MIPS architecture, for GDB, the GNU Debugger. 2130803Smarcel 3130803Smarcel Copyright 2002, 2003 Free Software Foundation, Inc. 4130803Smarcel 5130803Smarcel This file is part of GDB. 6130803Smarcel 7130803Smarcel This program is free software; you can redistribute it and/or modify 8130803Smarcel it under the terms of the GNU General Public License as published by 9130803Smarcel the Free Software Foundation; either version 2 of the License, or 10130803Smarcel (at your option) any later version. 11130803Smarcel 12130803Smarcel This program is distributed in the hope that it will be useful, 13130803Smarcel but WITHOUT ANY WARRANTY; without even the implied warranty of 14130803Smarcel MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15130803Smarcel GNU General Public License for more details. 16130803Smarcel 17130803Smarcel You should have received a copy of the GNU General Public License 18130803Smarcel along with this program; if not, write to the Free Software 19130803Smarcel Foundation, Inc., 59 Temple Place - Suite 330, 20130803Smarcel Boston, MA 02111-1307, USA. */ 21130803Smarcel 22130803Smarcel#ifndef MIPS_TDEP_H 23130803Smarcel#define MIPS_TDEP_H 24130803Smarcel 25130803Smarcelstruct gdbarch; 26130803Smarcel 27130803Smarcel/* All the possible MIPS ABIs. */ 28130803Smarcelenum mips_abi 29130803Smarcel { 30130803Smarcel MIPS_ABI_UNKNOWN = 0, 31130803Smarcel MIPS_ABI_N32, 32130803Smarcel MIPS_ABI_O32, 33130803Smarcel MIPS_ABI_N64, 34130803Smarcel MIPS_ABI_O64, 35130803Smarcel MIPS_ABI_EABI32, 36130803Smarcel MIPS_ABI_EABI64, 37130803Smarcel MIPS_ABI_LAST 38130803Smarcel }; 39130803Smarcel 40130803Smarcel/* Return the MIPS ABI associated with GDBARCH. */ 41130803Smarcelenum mips_abi mips_abi (struct gdbarch *gdbarch); 42130803Smarcel 43130803Smarcel/* For wince :-(. */ 44130803Smarcelextern CORE_ADDR mips_next_pc (CORE_ADDR pc); 45130803Smarcel 46130803Smarcel/* Return the "MIPS" register size. Just a short cut to the BFD 47130803Smarcel architecture's word size. */ 48130803Smarcelextern int mips_regsize (struct gdbarch *gdbarch); 49130803Smarcel 50130803Smarcel/* Return the current index for various MIPS registers. */ 51130803Smarcelstruct mips_regnum 52130803Smarcel{ 53130803Smarcel int pc; 54130803Smarcel int fp0; 55130803Smarcel int fp_implementation_revision; 56130803Smarcel int fp_control_status; 57130803Smarcel int badvaddr; /* Bad vaddr for addressing exception. */ 58130803Smarcel int cause; /* Describes last exception. */ 59130803Smarcel int hi; /* Multiply/divide temp. */ 60130803Smarcel int lo; /* ... */ 61130803Smarcel}; 62130803Smarcelextern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch); 63130803Smarcel 64130803Smarcelenum { 65204138Srrs MIPS_S0_REGNUM = 16, 66204138Srrs MIPS_S1_REGNUM = 17, 67204138Srrs MIPS_S2_REGNUM = 18, 68204138Srrs MIPS_S3_REGNUM = 19, 69204138Srrs MIPS_S4_REGNUM = 20, 70204138Srrs MIPS_S5_REGNUM = 21, 71204138Srrs MIPS_S6_REGNUM = 22, 72204138Srrs MIPS_S7_REGNUM = 23, 73204138Srrs MIPS_SP_REGNUM = 29, 74204138Srrs MIPS_FP_REGNUM = 30, 75204138Srrs MIPS_RA_REGNUM = 31, 76130803Smarcel MIPS_EMBED_LO_REGNUM = 33, 77130803Smarcel MIPS_EMBED_HI_REGNUM = 34, 78130803Smarcel MIPS_EMBED_BADVADDR_REGNUM = 35, 79130803Smarcel MIPS_EMBED_CAUSE_REGNUM = 36, 80130803Smarcel MIPS_EMBED_PC_REGNUM = 37, 81214949Sgonzo MIPS_EMBED_FP0_REGNUM = 40 82130803Smarcel}; 83130803Smarcel 84130803Smarcel/* Defined in mips-tdep.c and used in remote-mips.c */ 85130803Smarcelextern void deprecated_mips_set_processor_regs_hack (void); 86130803Smarcel 87130803Smarcel 88130803Smarcel#endif /* MIPS_TDEP_H */ 89