| 1 | /* Definitions to target GDB to OpenRISC 1000 32-bit targets. |
| 2 | Copyright (C) 2008-2019 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 it |
| 7 | under the terms of the GNU General Public License as published by the Free |
| 8 | Software Foundation; either version 3 of the License, or (at your option) |
| 9 | any later version. |
| 10 | |
| 11 | This program is distributed in the hope that it will be useful, but WITHOUT |
| 12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 14 | more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License along |
| 17 | With this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | |
| 19 | #ifndef OR1K_TDEP_H |
| 20 | #define OR1K_TDEP_H |
| 21 | |
| 22 | #ifndef TARGET_OR1K |
| 23 | #define TARGET_OR1K |
| 24 | #endif |
| 25 | |
| 26 | #include "../opcodes/or1k-desc.h" |
| 27 | #include "../opcodes/or1k-opc.h" |
| 28 | |
| 29 | /* General Purpose Registers */ |
| 30 | #define OR1K_ZERO_REGNUM 0 |
| 31 | #define OR1K_SP_REGNUM 1 |
| 32 | #define OR1K_FP_REGNUM 2 |
| 33 | #define OR1K_FIRST_ARG_REGNUM 3 |
| 34 | #define OR1K_LAST_ARG_REGNUM 8 |
| 35 | #define OR1K_LR_REGNUM 9 |
| 36 | #define OR1K_FIRST_SAVED_REGNUM 10 |
| 37 | #define OR1K_RV_REGNUM 11 |
| 38 | #define OR1K_PPC_REGNUM (OR1K_MAX_GPR_REGS + 0) |
| 39 | #define OR1K_NPC_REGNUM (OR1K_MAX_GPR_REGS + 1) |
| 40 | #define OR1K_SR_REGNUM (OR1K_MAX_GPR_REGS + 2) |
| 41 | |
| 42 | /* Properties of the architecture. GDB mapping of registers is all the GPRs |
| 43 | and SPRs followed by the PPC, NPC and SR at the end. Red zone is the area |
| 44 | past the end of the stack reserved for exception handlers etc. */ |
| 45 | |
| 46 | #define OR1K_MAX_GPR_REGS 32 |
| 47 | #define OR1K_NUM_PSEUDO_REGS 0 |
| 48 | #define OR1K_NUM_REGS (OR1K_MAX_GPR_REGS + 3) |
| 49 | #define OR1K_STACK_ALIGN 4 |
| 50 | #define OR1K_INSTLEN 4 |
| 51 | #define OR1K_INSTBITLEN (OR1K_INSTLEN * 8) |
| 52 | #define OR1K_NUM_TAP_RECORDS 8 |
| 53 | #define OR1K_FRAME_RED_ZONE_SIZE 2536 |
| 54 | |
| 55 | #endif /* OR1K_TDEP_H */ |