annotate packages/hal/h8300/h8300h/current/src/h8300h_stub.c @ 2729:74dbf4c3f2e1 after-copyright-change-20090129

Update all copyright banners to reflect FSF ownership; fix and improve licence text.
author jlarmour
date Thu, 29 Jan 2009 17:47:46 +0000
parents bbd1a5ee1075
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
1 //========================================================================
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
2 //
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
3 // h8300h_stub.c
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
4 //
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
5 // Helper functions for H8/300H stub
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
6 //
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
7 //========================================================================
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
8 // ####ECOSGPLCOPYRIGHTBEGIN####
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
9 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
10 // This file is part of eCos, the Embedded Configurable Operating System.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
12 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
13 // eCos is free software; you can redistribute it and/or modify it under
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
14 // the terms of the GNU General Public License as published by the Free
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
15 // Software Foundation; either version 2 or (at your option) any later
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
16 // version.
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
17 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
18 // eCos is distributed in the hope that it will be useful, but WITHOUT
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
19 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
20 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
21 // for more details.
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
22 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
23 // You should have received a copy of the GNU General Public License
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
24 // along with eCos; if not, write to the Free Software Foundation, Inc.,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
25 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
26 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
27 // As a special exception, if other files instantiate templates or use
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
28 // macros or inline functions from this file, or you compile this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
29 // and link it with other works to produce a work based on this file,
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
30 // this file does not by itself cause the resulting work to be covered by
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
31 // the GNU General Public License. However the source code for this file
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
32 // must still be made available in accordance with section (3) of the GNU
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
33 // General Public License v2.
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
34 //
2729
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
35 // This exception does not invalidate any other reasons why a work based
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
36 // on this file might be covered by the GNU General Public License.
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
37 // -------------------------------------------
74dbf4c3f2e1 Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents: 1571
diff changeset
38 // ####ECOSGPLCOPYRIGHTEND####
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
39 //========================================================================
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
40 //#####DESCRIPTIONBEGIN####
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
41 //
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
42 // Author(s): Yoshinori Sato
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
43 // Contributors: Yoshinori Sato
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
44 // Date: 2002-05-03
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
45 // Purpose:
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
46 // Description: Helper functions for H8/300H stub
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
47 // Usage:
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
48 //
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
49 //####DESCRIPTIONEND####
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
50 //
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
51 //========================================================================
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
52
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
53 #include <stddef.h>
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
54
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
55 #include <pkgconf/hal.h>
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
56
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
57 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
58
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
59 #include <cyg/hal/hal_stub.h>
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
60 #include <cyg/hal/hal_arch.h>
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
61 #include <cyg/hal/hal_intr.h>
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
62 #include <cyg/hal/hal_diag.h>
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
63
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
64 #ifdef CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
65 #include <cyg/hal/dbg-threads-api.h> // dbg_currthread_id
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
66 #endif
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
67
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
68 /*--------------------------------------------------------------------*/
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
69 /* Given a trap value TRAP, return the corresponding signal. */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
70
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
71 int __computeSignal (unsigned int trap_number)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
72 {
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
73 switch (trap_number) {
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
74 case CYGNUM_HAL_VECTOR_TRAP3:
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
75 return SIGTRAP;
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
76 default:
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
77 return SIGINT;
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
78 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
79 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
80
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
81 /*--------------------------------------------------------------------*/
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
82 /* Return the trap number corresponding to the last-taken trap. */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
83
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
84 int __get_trap_number (void)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
85 {
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
86 extern int CYG_LABEL_NAME(_intvector);
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
87 // The vector is not not part of the GDB register set so get it
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
88 // directly from the save context.
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
89 return CYG_LABEL_NAME(_intvector);
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
90 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
91
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
92 /*--------------------------------------------------------------------*/
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
93 /* Set the currently-saved pc register value to PC. This also updates NPC
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
94 as needed. */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
95
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
96 void set_pc (target_register_t pc)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
97 {
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
98 put_register (PC, pc);
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
99 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
100
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
101
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
102 /*----------------------------------------------------------------------
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
103 * Single-step support.
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
104 */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
105
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
106 typedef struct {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
107 unsigned short *addr;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
108 unsigned short inst;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
109 } breakinfo;
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
110
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
111 static breakinfo InstBuffer = {(unsigned short *)-1,0};
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
112
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
113 /* Clear any single-step breakpoint(s) that may have been set. */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
114
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
115 void __clear_single_step (void)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
116 {
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
117 if ((long)InstBuffer.addr != -1L) {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
118 *InstBuffer.addr = InstBuffer.inst;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
119 InstBuffer.addr = (unsigned short *)-1;
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
120 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
121 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
122
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
123 /* calculate next pc */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
124
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
125 enum jump_type{none,aabs,aind,ret,reg,relb,relw};
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
126
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
127 /* opcode decode table define
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
128 ptn: opcode pattern
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
129 msk: opcode bitmask
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
130 len: instruction length (<0 next table index)
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
131 jmp: jump operation mode */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
132
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
133 struct optable {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
134 unsigned char pattern;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
135 unsigned char mask;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
136 signed char length;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
137 char type;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
138 } __attribute__((aligned(1),packed));
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
139
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
140 #define OPTABLE(ptn,msk,len,jmp) {ptn,msk,len,jmp}
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
141
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
142 const static struct optable optable_0[] = {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
143 OPTABLE(0x00,0xff, 1,none), /* 0x00 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
144 OPTABLE(0x01,0xff,-1,none), /* 0x01 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
145 OPTABLE(0x02,0xfe, 1,none), /* 0x02-0x03 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
146 OPTABLE(0x04,0xee, 1,none), /* 0x04-0x05/0x14-0x15 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
147 OPTABLE(0x06,0xfe, 1,none), /* 0x06-0x07 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
148 OPTABLE(0x08,0xea, 1,none), /* 0x08-0x09/0x0c-0x0d/0x18-0x19/0x1c-0x1d */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
149 OPTABLE(0x0a,0xee, 1,none), /* 0x0a-0x0b/0x1a-0x1b */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
150 OPTABLE(0x0e,0xee, 1,none), /* 0x0e-0x0f/0x1e-0x1f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
151 OPTABLE(0x10,0xfc, 1,none), /* 0x10-0x13 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
152 OPTABLE(0x16,0xfe, 1,none), /* 0x16-0x17 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
153 OPTABLE(0x20,0xe0, 1,none), /* 0x20-0x3f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
154 OPTABLE(0x40,0xf0, 1,relb), /* 0x40-0x4f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
155 OPTABLE(0x50,0xfc, 1,none), /* 0x50-0x53 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
156 OPTABLE(0x54,0xfd, 1,ret ), /* 0x54/0x56 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
157 OPTABLE(0x55,0xff, 1,relb), /* 0x55 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
158 OPTABLE(0x57,0xff, 1,none), /* 0x57 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
159 OPTABLE(0x58,0xfb, 2,relw), /* 0x58/0x5c */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
160 OPTABLE(0x59,0xfb, 1,reg ), /* 0x59/0x5b */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
161 OPTABLE(0x5a,0xfb, 2,aabs), /* 0x5a/0x5e */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
162 OPTABLE(0x5b,0xfb, 2,aind), /* 0x5b/0x5f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
163 OPTABLE(0x60,0xe8, 1,none), /* 0x60-0x67/0x70-0x77 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
164 OPTABLE(0x68,0xfa, 1,none), /* 0x68-0x69/0x6c-0x6d */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
165 OPTABLE(0x6a,0xfe,-2,none), /* 0x6a-0x6b */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
166 OPTABLE(0x6e,0xfe, 2,none), /* 0x6e-0x6f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
167 OPTABLE(0x78,0xff, 4,none), /* 0x78 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
168 OPTABLE(0x79,0xff, 2,none), /* 0x79 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
169 OPTABLE(0x7a,0xff, 3,none), /* 0x7a */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
170 OPTABLE(0x7b,0xff, 2,none), /* 0x7b */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
171 OPTABLE(0x7c,0xfc, 2,none), /* 0x7c-0x7f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
172 OPTABLE(0x80,0x80, 1,none), /* 0x80-0xff */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
173 };
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
174
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
175 const static struct optable optable_1[] = {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
176 OPTABLE(0x00,0xff,-3,none), /* 0x0100 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
177 OPTABLE(0x40,0xf0,-3,none), /* 0x0140-0x14f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
178 OPTABLE(0x80,0xf0, 1,none), /* 0x0180-0x018f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
179 OPTABLE(0xc0,0xc0, 2,none), /* 0x01c0-0x01ff */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
180 };
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
181
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
182 const static struct optable optable_2[] = {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
183 OPTABLE(0x00,0x20, 2,none), /* 0x6a0?/0x6a8?/0x6b0?/0x6b8? */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
184 OPTABLE(0x20,0x20, 3,none), /* 0x6a2?/0x6aa?/0x6b2?/0x6ba? */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
185 };
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
186
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
187 const static struct optable optable_3[] = {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
188 OPTABLE(0x69,0xfb, 2,none), /* 0x010069/0x01006d/014069/0x01406d */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
189 OPTABLE(0x6b,0xff,-4,none), /* 0x01006b/0x01406b */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
190 OPTABLE(0x6f,0xff, 3,none), /* 0x01006f/0x01406f */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
191 OPTABLE(0x78,0xff, 5,none), /* 0x010078/0x014078 */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
192 };
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
193
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
194 const static struct optable optable_4[] = {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
195 OPTABLE(0x00,0x78, 3,none), /* 0x0100690?/0x01006d0?/0140690/0x01406d0?/0x0100698?/0x01006d8?/0140698?/0x01406d8? */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
196 OPTABLE(0x20,0x78, 4,none), /* 0x0100692?/0x01006d2?/0140692/0x01406d2?/0x010069a?/0x01006da?/014069a?/0x01406da? */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
197 };
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
198
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
199 const static struct {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
200 const struct optable *op;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
201 int length;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
202 } optables[] = {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
203 {optable_0,sizeof(optable_0)/sizeof(struct optable)},
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
204 {optable_1,sizeof(optable_1)/sizeof(struct optable)},
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
205 {optable_2,sizeof(optable_2)/sizeof(struct optable)},
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
206 {optable_3,sizeof(optable_3)/sizeof(struct optable)},
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
207 {optable_4,sizeof(optable_4)/sizeof(struct optable)},
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
208 };
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
209
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
210 const static unsigned char condmask[] = {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
211 0x00,0x40,0x01,0x04,0x02,0x08,0x10,0x20
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
212 };
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
213
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
214 static int isbranch(int reson)
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
215 {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
216 unsigned char cond = get_register(CCR);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
217 /* encode complex conditions */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
218 /* B4: N^V
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
219 B5: Z|(N^V)
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
220 B6: C|Z */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
221 __asm__("bld #3,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
222 "bxor #1,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
223 "bst #4,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
224 "bor #2,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
225 "bst #5,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
226 "bld #2,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
227 "bor #0,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
228 "bst #6,%w0\n\t"
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
229 :"=&r"(cond):"g"(cond):"cc");
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
230 cond &= condmask[reson >> 1];
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
231 if (!(reson & 1))
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
232 return cond == 0;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
233 else
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
234 return cond != 0;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
235 }
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
236
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
237 static unsigned short *getnextpc(unsigned short *pc)
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
238 {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
239 const struct optable *op;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
240 unsigned char *fetch_p;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
241 unsigned char inst;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
242 unsigned long addr;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
243 unsigned long *sp;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
244 int op_len;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
245 op = optables[0].op;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
246 op_len = optables[0].length;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
247 fetch_p = (unsigned char *)pc;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
248 inst = *fetch_p++;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
249 do {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
250 if ((inst & op->mask) == op->pattern) {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
251 if (op->length < 0) {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
252 op = optables[-op->length].op;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
253 op_len = optables[-op->length].length + 1;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
254 inst = *fetch_p++;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
255 } else {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
256 switch (op->type) {
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
257 case none:
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
258 return pc + op->length;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
259 case aabs:
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
260 addr = *(unsigned long *)pc;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
261 return (unsigned short *)(addr & 0x00ffffff);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
262 case aind:
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
263 addr = *pc & 0xff;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
264 return (unsigned short *)(*(unsigned long *)addr);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
265 case ret:
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
266 sp = (unsigned long *)get_register(SP);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
267 return (unsigned short *)(*(sp+3) & 0x00ffffff);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
268 case reg:
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
269 addr = get_register((*pc >> 4) & 0x07);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
270 return (unsigned short *)addr;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
271 case relb:
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
272 if ((inst = 0x55) || isbranch(inst & 0x0f))
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
273 (unsigned char *)pc += (signed char)(*fetch_p);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
274 return pc+1; /* skip myself */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
275 case relw:
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
276 if ((inst = 0x5c) || isbranch((*fetch_p & 0xf0) >> 4))
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
277 (unsigned char *)pc += (signed short)(*(pc+1));
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
278 return pc+2; /* skip myself */
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
279 }
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
280 }
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
281 } else
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
282 op++;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
283 } while(--op_len > 0);
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
284 return NULL;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
285 }
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
286
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
287 /* Set breakpoint(s) to simulate a single step from the current PC. */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
288
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
289 void __single_step (void)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
290 {
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
291 unsigned short *nextpc;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
292 nextpc = getnextpc((unsigned short *)get_register(PC));
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
293 InstBuffer.addr = nextpc;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
294 InstBuffer.inst = *nextpc;
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
295 *nextpc = HAL_BREAKINST;
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
296 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
297
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
298 void __install_breakpoints (void)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
299 {
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
300 /* NOP since single-step HW exceptions are used instead of
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
301 breakpoints. */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
302 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
303
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
304 void __clear_breakpoints (void)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
305 {
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
306
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
307 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
308
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
309
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
310 /* If the breakpoint we hit is in the breakpoint() instruction, return a
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
311 non-zero value. */
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
312
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
313 externC void CYG_LABEL_NAME(breakinst)(void);
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
314 int
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
315 __is_breakpoint_function ()
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
316 {
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
317 return get_register (PC) == (target_register_t)&CYG_LABEL_NAME(breakinst);
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
318 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
319
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
320
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
321 /* Skip the current instruction. */
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
322 /* only TRAPA instruction */
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
323
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
324 void __skipinst (void)
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
325 {
1571
bbd1a5ee1075 * src/h8300h_stub.c
asl
parents: 1281
diff changeset
326 put_register (PC, get_register(PC) + 2);
1281
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
327 }
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
328
f58b62f3c85d Apply Yoshinori Sato's H8/300 patches plus a few of my own.
nickg
parents:
diff changeset
329 #endif // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS