⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tm-sp64.h

📁 gdb that s ported for PXA270 processor. definitely helpful for people interested in embedded system
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Target machine sub-parameters for SPARC64, for GDB, the GNU debugger.   This is included by other tm-*.h files to define SPARC64 cpu-related info.   Copyright 1994, 1995, 1996, 1998, 1999, 2000   Free Software Foundation, Inc.   This is (obviously) based on the SPARC Vn (n<9) port.   Contributed by Doug Evans (dje@cygnus.com).   Further modified by Bob Manson (manson@cygnus.com).   This file is part of GDB.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place - Suite 330,   Boston, MA 02111-1307, USA.  */struct type;#define GDB_MULTI_ARCH GDB_MULTI_ARCH_PARTIAL#ifndef GDB_TARGET_IS_SPARC64#define GDB_TARGET_IS_SPARC64 1#endif#include "sparc/tm-sparc.h"/* Eeeew. Ok, we have to assume (for now) that the processor really is   in sparc64 mode. While this is the same instruction sequence as   on the Sparc, the stack frames are offset by +2047 (and the arguments   are 8 bytes instead of 4). *//* Instructions are:   std  %f10, [ %fp + 0x7a7 ]   std  %f8, [ %fp + 0x79f ]   std  %f6, [ %fp + 0x797 ]   std  %f4, [ %fp + 0x78f ]   std  %f2, [ %fp + 0x787 ]   std  %f0, [ %fp + 0x77f ]   std  %g6, [ %fp + 0x777 ]   std  %g4, [ %fp + 0x76f ]   std  %g2, [ %fp + 0x767 ]   std  %g0, [ %fp + 0x75f ]   std  %fp, [ %fp + 0x757 ]   std  %i4, [ %fp + 0x74f ]   std  %i2, [ %fp + 0x747 ]   std  %i0, [ %fp + 0x73f ]   nop   nop   nop   nop   rd  %tbr, %o0   st  %o0, [ %fp + 0x72b ]   rd  %tpc, %o0   st  %o0, [ %fp + 0x727 ]   rd  %psr, %o0   st  %o0, [ %fp + 0x723 ]   rd  %y, %o0   st  %o0, [ %fp + 0x71f ]   ldx  [ %sp + 0x8a7 ], %o5   ldx  [ %sp + 0x89f ], %o4   ldx  [ %sp + 0x897 ], %o3   ldx  [ %sp + 0x88f ], %o2   ldx  [ %sp + 0x887 ], %o1   call  %g0   ldx  [ %sp + 0x87f ], %o0   nop   ta  1   nop   nop */#if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)/* * The following defines must go away for MULTI_ARCH. */#ifndef DO_CALL_DUMMY_ON_STACK/* * These defines will suffice for the AT_ENTRY_POINT call dummy method. */#undef  CALL_DUMMY#define CALL_DUMMY {0}#undef  DEPRECATED_CALL_DUMMY_LENGTH#define DEPRECATED_CALL_DUMMY_LENGTH 0#undef  CALL_DUMMY_CALL_OFFSET#define CALL_DUMMY_CALL_OFFSET 0#undef  DEPRECATED_CALL_DUMMY_START_OFFSET#define DEPRECATED_CALL_DUMMY_START_OFFSET 0#undef  DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET 0#undef  CALL_DUMMY_LOCATION #define CALL_DUMMY_LOCATION AT_ENTRY_POINT#undef  DEPRECATED_PC_IN_CALL_DUMMY#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_at_entry_point (pc, sp, frame_address)#undef  DEPRECATED_CALL_DUMMY_STACK_ADJUST#define DEPRECATED_CALL_DUMMY_STACK_ADJUST 128#undef  DEPRECATED_SIZEOF_CALL_DUMMY_WORDS#define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS 0#undef  CALL_DUMMY_ADDRESS#define CALL_DUMMY_ADDRESS() entry_point_address()#undef  DEPRECATED_FIX_CALL_DUMMY#define DEPRECATED_FIX_CALL_DUMMY(DUMMYNAME, PC, FUN, NARGS, ARGS, TYPE, GCC_P) #undef  DEPRECATED_PUSH_RETURN_ADDRESS#define DEPRECATED_PUSH_RETURN_ADDRESS(PC, SP) sparc_at_entry_push_return_address (PC, SP)extern CORE_ADDR sparc_at_entry_push_return_address (CORE_ADDR pc,						     CORE_ADDR sp);#undef  STORE_STRUCT_RETURN#define STORE_STRUCT_RETURN(ADDR, SP) \     sparc_at_entry_store_struct_return (ADDR, SP)extern void sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);#else/* * Old call dummy method, with CALL_DUMMY on the stack. */#undef  CALL_DUMMY#define CALL_DUMMY {		 0x9de3bec0fd3fa7f7LL, 0xf93fa7eff53fa7e7LL,\				 0xf13fa7dfed3fa7d7LL, 0xe93fa7cfe53fa7c7LL,\				 0xe13fa7bfdd3fa7b7LL, 0xd93fa7afd53fa7a7LL,\				 0xd13fa79fcd3fa797LL, 0xc93fa78fc53fa787LL,\				 0xc13fa77fcc3fa777LL, 0xc83fa76fc43fa767LL,\				 0xc03fa75ffc3fa757LL, 0xf83fa74ff43fa747LL,\				 0xf03fa73f01000000LL, 0x0100000001000000LL,\				 0x0100000091580000LL, 0xd027a72b93500000LL,\				 0xd027a72791480000LL, 0xd027a72391400000LL,\				 0xd027a71fda5ba8a7LL, 0xd85ba89fd65ba897LL,\				 0xd45ba88fd25ba887LL, 0x9fc02000d05ba87fLL,\				 0x0100000091d02001LL, 0x0100000001000000LL }/* 128 is to reserve space to write the %i/%l registers that will be restored   when we resume. */#undef  DEPRECATED_CALL_DUMMY_STACK_ADJUST#define DEPRECATED_CALL_DUMMY_STACK_ADJUST 128/* Size of the call dummy in bytes. */#undef  DEPRECATED_CALL_DUMMY_LENGTH#define DEPRECATED_CALL_DUMMY_LENGTH 192/* Offset within CALL_DUMMY of the 'call' instruction. */#undef  DEPRECATED_CALL_DUMMY_START_OFFSET#define DEPRECATED_CALL_DUMMY_START_OFFSET 148/* Offset within CALL_DUMMY of the 'call' instruction. */#undef  CALL_DUMMY_CALL_OFFSET#define CALL_DUMMY_CALL_OFFSET (DEPRECATED_CALL_DUMMY_START_OFFSET + (5 * 4))/* Offset within CALL_DUMMY of the 'ta 1' instruction. */#undef  DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (DEPRECATED_CALL_DUMMY_START_OFFSET + (8 * 4))/* Call dummy will be located on the stack.  */#undef  CALL_DUMMY_LOCATION#define CALL_DUMMY_LOCATION ON_STACK#undef  DEPRECATED_PC_IN_CALL_DUMMY#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)/* Insert the function address into the call dummy.  */#undef  DEPRECATED_FIX_CALL_DUMMY#define DEPRECATED_FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ sparc_fix_call_dummy (dummyname, pc, fun, type, gcc_p)void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,			   struct type *value_type, int using_gcc);/* The remainder of these will accept the default definition.  */#undef  DEPRECATED_SIZEOF_CALL_DUMMY_WORDS#undef  DEPRECATED_PUSH_RETURN_ADDRESS#undef  CALL_DUMMY_ADDRESS#undef  STORE_STRUCT_RETURN#endif/* Does the specified function use the "struct returning" convention   or the "value returning" convention?  The "value returning" convention   almost invariably returns the entire value in registers.  The   "struct returning" convention often returns the entire value in   memory, and passes a pointer (out of or into the function) saying   where the value (is or should go).   Since this sometimes depends on whether it was compiled with GCC,   this is also an argument.  This is used in call_function to build a   stack, and in value_being_returned to print return values.    On Sparc64, we only pass pointers to structs if they're larger than   32 bytes. Otherwise they're stored in %o0-%o3 (floating-point   values go into %fp0-%fp3).  */#undef  USE_STRUCT_CONVENTION#define USE_STRUCT_CONVENTION(gcc_p, type) (TYPE_LENGTH (type) > 32)CORE_ADDR sparc64_push_arguments (int,				  struct value **, CORE_ADDR, int, CORE_ADDR);#undef DEPRECATED_PUSH_ARGUMENTS#define DEPRECATED_PUSH_ARGUMENTS(A,B,C,D,E) \     (sparc64_push_arguments ((A), (B), (C), (D), (E)))/* Store the address of the place in which to copy the structure the   subroutine will return.  This is called from call_function. *//* FIXME: V9 uses %o0 for this.  */#undef  STORE_STRUCT_RETURN#define STORE_STRUCT_RETURN(ADDR, SP) \  { target_write_memory ((SP)+(16*8), (char *)&(ADDR), 8); }/* Stack must be aligned on 128-bit boundaries when synthesizing   function calls. */#undef  STACK_ALIGN#define STACK_ALIGN(ADDR) (((ADDR) + 15 ) & -16)/* Initializer for an array of names of registers.   There should be NUM_REGS strings in this initializer.  *//* Some of these registers are only accessible from priviledged mode.   They are here for kernel debuggers, etc.  *//* FIXME: icc and xcc are currently considered separate registers.   This may have to change and consider them as just one (ccr).   Let's postpone this as long as we can.  It's nice to be able to set   them individually.  *//* FIXME: fcc0-3 are currently separate, even though they are also part of   fsr.  May have to remove them but let's postpone this as long as

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -