Reindented to GNU standard. No semantic changes. This checkin is to
[deliverable/binutils-gdb.git] / gdb / i860-break.h
CommitLineData
67278683
FF
1/* I860 -specific breakpoint stuff.
2 Copyright (C) 1986, 1987 Free Software Foundation, Inc.
3
4GDB is distributed in the hope that it will be useful, but WITHOUT ANY
5WARRANTY. No author or distributor accepts responsibility to anyone
6for the consequences of using it or for whether it serves any
7particular purpose or works at all, unless he says so in writing.
8Refer to the GDB General Public License for full details.
9
10Everyone is granted permission to copy, modify and redistribute GDB,
11but only under the conditions described in the GDB General Public
12License. A copy of this license is supposed to have been given to you
13along with GDB so you can know your rights and responsibilities. It
14should be in a file named COPYING. Among other things, the copyright
15notice and this notice must be preserved on all copies.
16
17In other words, go ahead and share GDB, but don't try to stop
18anyone else from sharing it farther. Help stamp out software hoarding!
19*/
20
21/* #define BREAKPOINT_DEBUG 1 */
22
23#include "tm.h"
24
25#ifdef i860
26void i860_insert_breakpoints();
27void i860_dbrk_breakpoints();
28
29#define BREAKPOINT_HERE(b,pc) ((b->act_addr[0] == pc) || (b->act_addr[1] == pc) ||(b->act_addr[2] == pc) || (b->act_addr[2] == pc))
30
31/* This is the sequence of bytes we insert for a breakpoint. */
32
33static char break_insn[] = BREAKPOINT;
34static char float_insn[] = BREAKFLOAT;
35
36#endif
37
38#define FOPMSK 0x4C000000
39#define DOPMSK 0x4C000200
40#define FOP860 0x48000000
41#define DOP860 0x48000200
42
43#define ALN32(a) ((( (int)(a) & 0x0007) == 0x04) )
44#define ALN64(a) ((( (int)(a) & 0x0007) == 0x00) )
45/*
46#define ISFOP(a) ((((adj_read_memory_integer(a)) & FOPMSK)==FOP860 ))
47#define ISCOR(a) ((!(((adj_read_memory_integer(a)) & FOPMSK)==FOP860 )))
48#define ISDOP(a) ((((adj_read_memory_integer(a)) & DOPMSK)==DOP860 ))
49*/
50
51#define ISFOP(a) ((((adj_read_memory_integer(a)) & FOPMSK)==FOP860 ))
52#define ISCOR(a) ((!(((adj_read_memory_integer(a)) & FOPMSK)==FOP860 )))
53#define ISDOP(a) ((((adj_read_memory_integer(a)) & DOPMSK)==DOP860 ))
54
55#define ISDIM(a) (\
56 ( ISDOP(a) && ALN64(a) && ISCOR(a+4)) || \
57 ((ISFOP(a) && ALN64(a) && ISCOR(a+4)) && (ISDOP(a-8) || ISDOP(a-0x10))) || \
58 ( ISCOR(a) && ALN32(a) && ISDOP(a-4)) || \
59 ((ISCOR(a) && ALN32(a) && ISFOP(a+4)) && (ISDOP(a-4) || ISDOP(a-0x0C))) \
60 )
61/*
62#define ISDIM(a) (\
63 ( ISDOP(a) && ALN64(a) && ISCOR(a+4)) || \
64 ((ISFOP(a) && ALN64(a) && ISCOR(a+4)) && (ISDOP(a-8) || ISDOP(a-16))) || \
65 ( ISCOR(a) && ALN32(a) && ISDOP(a-4)) || \
66 ((ISCOR(a) && ALN32(a) && ISFOP(a+4)) && (ISDOP(a-4) || ISDOP(a-12))) \
67 )
68*/
69#define FOPADR(a) ( ((int)(a) & 0xFFFFFFF8) )
70#define CORADR(a) ((((int)(a) & 0xFFFFFFFC ) | 0x04) )
71
72#define DMNEXT(a) ( ISDIM(a)?(ISDIM(a+1)?(a+2):(a+1)):(a+1) )
73#define STDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x2000 )
74#define INDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x4000 )
75#define ENDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x6000 )
76
77#define DIM 8
78#define RIM 0x8004
79#define SIM 4
80#define ADDR_INC(a) (((int)(a) & 0x0FFF))
81
82#define SINGLE_STEP_MODE 1
83#define BREAK_MODE 0
This page took 0.044825 seconds and 4 git commands to generate.