diff options
author | Fred Fish <fnf@specifix.com> | 1992-07-31 23:17:54 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-07-31 23:17:54 +0000 |
commit | 672786833c63ec2f9504a7eb0a75d99f0617c7b2 (patch) | |
tree | 6646e9d1df6389f2272327eb4d69abcfccd58c5a /gdb/i860-break.h | |
parent | 14f1fc24fab58318fd104cafb548269bec0f8650 (diff) | |
download | gdb-672786833c63ec2f9504a7eb0a75d99f0617c7b2.zip gdb-672786833c63ec2f9504a7eb0a75d99f0617c7b2.tar.gz gdb-672786833c63ec2f9504a7eb0a75d99f0617c7b2.tar.bz2 |
Update cygnus copies of currently undistributed i860 files maintained by
Peggy Fieland at stratus.com.
Diffstat (limited to 'gdb/i860-break.h')
-rw-r--r-- | gdb/i860-break.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/gdb/i860-break.h b/gdb/i860-break.h new file mode 100644 index 0000000..36da6b0 --- /dev/null +++ b/gdb/i860-break.h @@ -0,0 +1,83 @@ +/* I860 -specific breakpoint stuff. + Copyright (C) 1986, 1987 Free Software Foundation, Inc. + +GDB is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY. No author or distributor accepts responsibility to anyone +for the consequences of using it or for whether it serves any +particular purpose or works at all, unless he says so in writing. +Refer to the GDB General Public License for full details. + +Everyone is granted permission to copy, modify and redistribute GDB, +but only under the conditions described in the GDB General Public +License. A copy of this license is supposed to have been given to you +along with GDB so you can know your rights and responsibilities. It +should be in a file named COPYING. Among other things, the copyright +notice and this notice must be preserved on all copies. + +In other words, go ahead and share GDB, but don't try to stop +anyone else from sharing it farther. Help stamp out software hoarding! +*/ + +/* #define BREAKPOINT_DEBUG 1 */ + +#include "tm.h" + +#ifdef i860 +void i860_insert_breakpoints(); +void i860_dbrk_breakpoints(); + +#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)) + +/* This is the sequence of bytes we insert for a breakpoint. */ + +static char break_insn[] = BREAKPOINT; +static char float_insn[] = BREAKFLOAT; + +#endif + +#define FOPMSK 0x4C000000 +#define DOPMSK 0x4C000200 +#define FOP860 0x48000000 +#define DOP860 0x48000200 + +#define ALN32(a) ((( (int)(a) & 0x0007) == 0x04) ) +#define ALN64(a) ((( (int)(a) & 0x0007) == 0x00) ) +/* +#define ISFOP(a) ((((adj_read_memory_integer(a)) & FOPMSK)==FOP860 )) +#define ISCOR(a) ((!(((adj_read_memory_integer(a)) & FOPMSK)==FOP860 ))) +#define ISDOP(a) ((((adj_read_memory_integer(a)) & DOPMSK)==DOP860 )) +*/ + +#define ISFOP(a) ((((adj_read_memory_integer(a)) & FOPMSK)==FOP860 )) +#define ISCOR(a) ((!(((adj_read_memory_integer(a)) & FOPMSK)==FOP860 ))) +#define ISDOP(a) ((((adj_read_memory_integer(a)) & DOPMSK)==DOP860 )) + +#define ISDIM(a) (\ + ( ISDOP(a) && ALN64(a) && ISCOR(a+4)) || \ + ((ISFOP(a) && ALN64(a) && ISCOR(a+4)) && (ISDOP(a-8) || ISDOP(a-0x10))) || \ + ( ISCOR(a) && ALN32(a) && ISDOP(a-4)) || \ + ((ISCOR(a) && ALN32(a) && ISFOP(a+4)) && (ISDOP(a-4) || ISDOP(a-0x0C))) \ + ) +/* +#define ISDIM(a) (\ + ( ISDOP(a) && ALN64(a) && ISCOR(a+4)) || \ + ((ISFOP(a) && ALN64(a) && ISCOR(a+4)) && (ISDOP(a-8) || ISDOP(a-16))) || \ + ( ISCOR(a) && ALN32(a) && ISDOP(a-4)) || \ + ((ISCOR(a) && ALN32(a) && ISFOP(a+4)) && (ISDOP(a-4) || ISDOP(a-12))) \ + ) +*/ +#define FOPADR(a) ( ((int)(a) & 0xFFFFFFF8) ) +#define CORADR(a) ((((int)(a) & 0xFFFFFFFC ) | 0x04) ) + +#define DMNEXT(a) ( ISDIM(a)?(ISDIM(a+1)?(a+2):(a+1)):(a+1) ) +#define STDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x2000 ) +#define INDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x4000 ) +#define ENDIM (((*(int *)&(registers[REGISTER_BYTE(PS_REGNUM)])) & 0x6000) == 0x6000 ) + +#define DIM 8 +#define RIM 0x8004 +#define SIM 4 +#define ADDR_INC(a) (((int)(a) & 0x0FFF)) + +#define SINGLE_STEP_MODE 1 +#define BREAK_MODE 0 |