OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [VER_5_3/] [gdb-5.3/] [gdb/] [config/] [sparc/] [tm-sparclite.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
/* Macro definitions for GDB for a Fujitsu SPARClite.
2
   Copyright 1993, 1994, 1995, 1998, 1999, 2000
3
   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
#include "regcache.h"
23
 
24
#define TARGET_SPARCLITE 1      /* Still needed for non-multi-arch case */
25
 
26
#include "sparc/tm-sparc.h"
27
 
28
/* Note: we are not defining GDB_MULTI_ARCH for the sparclet target
29
   at this time, because we have not figured out how to detect the
30
   sparclet target from the bfd structure.  */
31
 
32
/* Sparclite regs, for debugging purposes */
33
 
34
enum {
35
  DIA1_REGNUM = 72,             /* debug instr address register 1 */
36
  DIA2_REGNUM = 73,             /* debug instr address register 2 */
37
  DDA1_REGNUM = 74,             /* debug data address register 1 */
38
  DDA2_REGNUM = 75,             /* debug data address register 2 */
39
  DDV1_REGNUM = 76,             /* debug data value register 1 */
40
  DDV2_REGNUM = 77,             /* debug data value register 2 */
41
  DCR_REGNUM  = 78,             /* debug control register */
42
  DSR_REGNUM  = 79              /* debug status regsiter */
43
};
44
 
45
/* overrides of tm-sparc.h */
46
 
47
#undef TARGET_BYTE_ORDER
48
 
49
/* Select the sparclite disassembler.  Slightly different instruction set from
50
   the V8 sparc.  */
51
 
52
#undef TM_PRINT_INSN_MACH
53
#define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclite
54
 
55
/* Amount PC must be decremented by after a hardware instruction breakpoint.
56
   This is often the number of bytes in BREAKPOINT
57
   but not always.  */
58
 
59
#define DECR_PC_AFTER_HW_BREAK 4
60
 
61
#if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
62
/*
63
 * The following defines must go away for MULTI_ARCH.
64
 */
65
 
66
#undef  FRAME_CHAIN_VALID
67
#define FRAME_CHAIN_VALID(FP,FI) func_frame_chain_valid (FP, FI)
68
 
69
#undef NUM_REGS
70
#define NUM_REGS 80
71
 
72
#undef REGISTER_BYTES
73
#define REGISTER_BYTES (32*4+32*4+8*4+8*4)
74
 
75
#undef REGISTER_NAMES
76
#define REGISTER_NAMES  \
77
{ "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",       \
78
  "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",       \
79
  "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",       \
80
  "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",       \
81
                                                                \
82
  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",       \
83
  "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
84
  "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",       \
85
  "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",       \
86
                                                                \
87
  "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr",        \
88
  "dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr" }
89
 
90
#define DIA1_REGNUM 72          /* debug instr address register 1 */
91
#define DIA2_REGNUM 73          /* debug instr address register 2 */
92
#define DDA1_REGNUM 74          /* debug data address register 1 */
93
#define DDA2_REGNUM 75          /* debug data address register 2 */
94
#define DDV1_REGNUM 76          /* debug data value register 1 */
95
#define DDV2_REGNUM 77          /* debug data value register 2 */
96
#define DCR_REGNUM 78           /* debug control register */
97
#define DSR_REGNUM 79           /* debug status regsiter */
98
 
99
#endif /* GDB_MULTI_ARCH */
100
 
101
#define TARGET_HW_BREAK_LIMIT 2
102
#define TARGET_HW_WATCH_LIMIT 2
103
 
104
/* Enable watchpoint macro's */
105
 
106
#define TARGET_HAS_HARDWARE_WATCHPOINTS
107
 
108
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
109
        sparclite_check_watch_resources (type, cnt, ot)
110
 
111
/* When a hardware watchpoint fires off the PC will be left at the
112
   instruction which caused the watchpoint.  It will be necessary for
113
   GDB to step over the watchpoint. ***
114
 
115
   #define STOPPED_BY_WATCHPOINT(W) \
116
   ((W).kind == TARGET_WAITKIND_STOPPED \
117
   && (W).value.sig == TARGET_SIGNAL_TRAP \
118
   && ((int) read_register (IPSW_REGNUM) & 0x00100000))
119
 */
120
 
121
/* Use these macros for watchpoint insertion/deletion.  */
122
#define target_insert_watchpoint(addr, len, type) sparclite_insert_watchpoint (addr, len, type)
123
#define target_remove_watchpoint(addr, len, type) sparclite_remove_watchpoint (addr, len, type)
124
#define target_insert_hw_breakpoint(addr, len) sparclite_insert_hw_breakpoint (addr, len)
125
#define target_remove_hw_breakpoint(addr, len) sparclite_remove_hw_breakpoint (addr, len)
126
#define target_stopped_data_address() sparclite_stopped_data_address()

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.