tm-i960.h
来自「模拟嵌入式硬件平台的软件源代码」· C头文件 代码 · 共 346 行 · 第 1/2 页
H
346 行
// OBSOLETE /* Parameters for target machine Intel 960, for GDB, the GNU debugger.// OBSOLETE // OBSOLETE Copyright 1990, 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2002 Free// OBSOLETE Software Foundation, Inc.// OBSOLETE // OBSOLETE Contributed by Intel Corporation.// OBSOLETE This file is part of GDB.// OBSOLETE // OBSOLETE This program is free software; you can redistribute it and/or modify// OBSOLETE it under the terms of the GNU General Public License as published by// OBSOLETE the Free Software Foundation; either version 2 of the License, or// OBSOLETE (at your option) any later version.// OBSOLETE // OBSOLETE This program is distributed in the hope that it will be useful,// OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of// OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// OBSOLETE GNU General Public License for more details.// OBSOLETE // OBSOLETE You should have received a copy of the GNU General Public License// OBSOLETE along with this program; if not, write to the Free Software// OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330,// OBSOLETE Boston, MA 02111-1307, USA. */// OBSOLETE // OBSOLETE /* Definitions to target GDB to any i960. */// OBSOLETE // OBSOLETE #ifndef I80960// OBSOLETE #define I80960// OBSOLETE #endif// OBSOLETE // OBSOLETE #include "doublest.h"// OBSOLETE // OBSOLETE /* Hook for the SYMBOL_CLASS of a parameter when decoding DBX symbol// OBSOLETE information. In the i960, parameters can be stored as locals or as// OBSOLETE args, depending on the type of the debug record.// OBSOLETE // OBSOLETE From empirical observation, gcc960 uses N_LSYM to indicate// OBSOLETE arguments passed in registers and then copied immediately// OBSOLETE to the frame, and N_PSYM to indicate arguments passed in a// OBSOLETE g14-relative argument block. */// OBSOLETE // OBSOLETE #define DBX_PARM_SYMBOL_CLASS(type) ((type == N_LSYM)? LOC_LOCAL_ARG: LOC_ARG)// OBSOLETE // OBSOLETE /* Offset from address of function to start of its code.// OBSOLETE Zero on most machines. */// OBSOLETE // OBSOLETE #define FUNCTION_START_OFFSET 0// OBSOLETE // OBSOLETE /* Advance ip across any function entry prologue instructions// OBSOLETE to reach some "real" code. */// OBSOLETE // OBSOLETE #define SKIP_PROLOGUE(ip) (i960_skip_prologue (ip))// OBSOLETE extern CORE_ADDR i960_skip_prologue ();// OBSOLETE // OBSOLETE /* Immediately after a function call, return the saved ip.// OBSOLETE Can't always go through the frames for this because on some machines// OBSOLETE the new frame is not set up until the new function// OBSOLETE executes some instructions. */// OBSOLETE // OBSOLETE #define SAVED_PC_AFTER_CALL(frame) (saved_pc_after_call (frame))// OBSOLETE extern CORE_ADDR saved_pc_after_call ();// OBSOLETE // OBSOLETE /* Stack grows upward */// OBSOLETE // OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) > (rhs))// OBSOLETE // OBSOLETE /* Say how long (ordinary) registers are. This is a piece of bogosity// OBSOLETE used in push_word and a few other places; REGISTER_RAW_SIZE is the// OBSOLETE real way to know how big a register is. */// OBSOLETE // OBSOLETE #define REGISTER_SIZE 4// OBSOLETE // OBSOLETE /* Number of machine registers */// OBSOLETE #define NUM_REGS 40// OBSOLETE // OBSOLETE /* Initializer for an array of names of registers.// OBSOLETE There should be NUM_REGS strings in this initializer. */// OBSOLETE // OBSOLETE #define REGISTER_NAMES { \// OBSOLETE /* 0 */ "pfp", "sp", "rip", "r3", "r4", "r5", "r6", "r7", \// OBSOLETE /* 8 */ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",\// OBSOLETE /* 16 */ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \// OBSOLETE /* 24 */ "g8", "g9", "g10", "g11", "g12", "g13", "g14", "fp", \// OBSOLETE /* 32 */ "pcw", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\// OBSOLETE }// OBSOLETE // OBSOLETE /* Register numbers of various important registers (used to index// OBSOLETE into arrays of register names and register values). */// OBSOLETE // OBSOLETE #define R0_REGNUM 0 /* First local register */// OBSOLETE #define SP_REGNUM 1 /* Contains address of top of stack */// OBSOLETE #define RIP_REGNUM 2 /* Return instruction pointer (local r2) */// OBSOLETE #define R15_REGNUM 15 /* Last local register */// OBSOLETE #define G0_REGNUM 16 /* First global register */// OBSOLETE #define G13_REGNUM 29 /* g13 - holds struct return address */// OBSOLETE #define G14_REGNUM 30 /* g14 - ptr to arg block / leafproc return address */// OBSOLETE #define FP_REGNUM 31 /* Contains address of executing stack frame */// OBSOLETE #define PCW_REGNUM 32 /* process control word */// OBSOLETE #define ACW_REGNUM 33 /* arithmetic control word */// OBSOLETE #define TCW_REGNUM 34 /* trace control word */// OBSOLETE #define IP_REGNUM 35 /* instruction pointer */// OBSOLETE #define FP0_REGNUM 36 /* First floating point register */// OBSOLETE // OBSOLETE /* Some registers have more than one name */// OBSOLETE // OBSOLETE #define PC_REGNUM IP_REGNUM /* GDB refers to ip as the Program Counter */// OBSOLETE #define PFP_REGNUM R0_REGNUM /* Previous frame pointer */// OBSOLETE // OBSOLETE /* Total amount of space needed to store our copies of the machine's// OBSOLETE register state, the array `registers'. */// OBSOLETE #define REGISTER_BYTES ((36*4) + (4*10))// OBSOLETE // OBSOLETE /* Index within `registers' of the first byte of the space for register N. */// OBSOLETE // OBSOLETE #define REGISTER_BYTE(N) ( (N) < FP0_REGNUM ? \// OBSOLETE (4*(N)) : ((10*(N)) - (6*FP0_REGNUM)) )// OBSOLETE // OBSOLETE /* The i960 has register windows, sort of. */// OBSOLETE // OBSOLETE extern void i960_get_saved_register (char *raw_buffer,// OBSOLETE int *optimized,// OBSOLETE CORE_ADDR *addrp,// OBSOLETE struct frame_info *frame,// OBSOLETE int regnum,// OBSOLETE enum lval_type *lval);// OBSOLETE // OBSOLETE #define GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval) \// OBSOLETE i960_get_saved_register(raw_buffer, optimized, addrp, frame, regnum, lval)// OBSOLETE // OBSOLETE // OBSOLETE /* Number of bytes of storage in the actual machine representation// OBSOLETE for register N. On the i960, all regs are 4 bytes except for floating// OBSOLETE point, which are 10. NINDY only sends us 8 byte values for these,// OBSOLETE which is a pain, but VxWorks handles this correctly, so we must. */// OBSOLETE // OBSOLETE #define REGISTER_RAW_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 10 )// OBSOLETE // OBSOLETE /* Number of bytes of storage in the program's representation for register N. */// OBSOLETE // OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) ( (N) < FP0_REGNUM ? 4 : 8 )// OBSOLETE // OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */// OBSOLETE // OBSOLETE #define MAX_REGISTER_RAW_SIZE 10// OBSOLETE // OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */// OBSOLETE // OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8// OBSOLETE // OBSOLETE #include "floatformat.h"// OBSOLETE // OBSOLETE #define TARGET_LONG_DOUBLE_FORMAT &floatformat_i960_ext// OBSOLETE // OBSOLETE /* Return the GDB type object for the "standard" data type// OBSOLETE of data in register N. */// OBSOLETE // OBSOLETE struct type *i960_register_type (int regnum);// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) i960_register_type (N)// OBSOLETE // OBSOLETE /* Macros for understanding function return values... */// OBSOLETE // OBSOLETE /* Does the specified function use the "struct returning" convention// OBSOLETE or the "value returning" convention? The "value returning" convention// OBSOLETE almost invariably returns the entire value in registers. The// OBSOLETE "struct returning" convention often returns the entire value in// OBSOLETE memory, and passes a pointer (out of or into the function) saying// OBSOLETE where the value (is or should go).// OBSOLETE // OBSOLETE Since this sometimes depends on whether it was compiled with GCC,// OBSOLETE this is also an argument. This is used in call_function to build a// OBSOLETE stack, and in value_being_returned to print return values.// OBSOLETE // OBSOLETE On i960, a structure is returned in registers g0-g3, if it will fit.// OBSOLETE If it's more than 16 bytes long, g13 pointed to it on entry. */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?