]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ft32-tdep.c
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / gdb / ft32-tdep.c
CommitLineData
49d45b20
JB
1/* Target-dependent code for FT32.
2
1d506c26 3 Copyright (C) 2009-2024 Free Software Foundation, Inc.
49d45b20
JB
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 3 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, see <http://www.gnu.org/licenses/>. */
19
ec452525 20#include "extract-store-integer.h"
d55e5aa6 21#include "frame.h"
4de283e4
TT
22#include "frame-unwind.h"
23#include "frame-base.h"
24#include "symtab.h"
25#include "gdbtypes.h"
5b9707eb 26#include "cli/cli-cmds.h"
49d45b20 27#include "gdbcore.h"
4de283e4 28#include "value.h"
49d45b20 29#include "inferior.h"
4de283e4 30#include "symfile.h"
49d45b20
JB
31#include "objfiles.h"
32#include "osabi.h"
4de283e4
TT
33#include "language.h"
34#include "arch-utils.h"
49d45b20
JB
35#include "regcache.h"
36#include "trad-frame.h"
4de283e4
TT
37#include "dis-asm.h"
38#include "record.h"
39
40#include "opcode/ft32.h"
41
42#include "ft32-tdep.h"
d026e67e 43#include "sim/sim-ft32.h"
4de283e4 44#include <algorithm>
49d45b20
JB
45
46#define RAM_BIAS 0x800000 /* Bias added to RAM addresses. */
47
49d45b20
JB
48/* Use an invalid address -1 as 'not available' marker. */
49enum { REG_UNAVAIL = (CORE_ADDR) (-1) };
50
51struct ft32_frame_cache
52{
53 /* Base address of the frame */
54 CORE_ADDR base;
55 /* Function this frame belongs to */
56 CORE_ADDR pc;
57 /* Total size of this frame */
58 LONGEST framesize;
59 /* Saved registers in this frame */
60 CORE_ADDR saved_regs[FT32_NUM_REGS];
61 /* Saved SP in this frame */
62 CORE_ADDR saved_sp;
63 /* Has the new frame been LINKed. */
64 bfd_boolean established;
65};
66
67/* Implement the "frame_align" gdbarch method. */
68
69static CORE_ADDR
70ft32_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
71{
72 /* Align to the size of an instruction (so that they can safely be
73 pushed onto the stack. */
74 return sp & ~1;
75}
76
49d45b20 77
04180708 78constexpr gdb_byte ft32_break_insn[] = { 0x02, 0x00, 0x34, 0x00 };
49d45b20 79
04180708 80typedef BP_MANIPULATION (ft32_break_insn) ft32_breakpoint;
49d45b20
JB
81
82/* FT32 register names. */
83
84static const char *const ft32_register_names[] =
85{
86 "fp", "sp",
87 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
88 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
89 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
90 "r24", "r25", "r26", "r27", "r28", "cc",
91 "pc"
92};
93
94/* Implement the "register_name" gdbarch method. */
95
96static const char *
97ft32_register_name (struct gdbarch *gdbarch, int reg_nr)
98{
69f6730d 99 static_assert (ARRAY_SIZE (ft32_register_names) == FT32_NUM_REGS);
49d45b20
JB
100 return ft32_register_names[reg_nr];
101}
102
103/* Implement the "register_type" gdbarch method. */
104
105static struct type *
106ft32_register_type (struct gdbarch *gdbarch, int reg_nr)
107{
108 if (reg_nr == FT32_PC_REGNUM)
345bd07c 109 {
08106042 110 ft32_gdbarch_tdep *tdep = gdbarch_tdep<ft32_gdbarch_tdep> (gdbarch);
345bd07c
SM
111 return tdep->pc_type;
112 }
49d45b20
JB
113 else if (reg_nr == FT32_SP_REGNUM || reg_nr == FT32_FP_REGNUM)
114 return builtin_type (gdbarch)->builtin_data_ptr;
115 else
116 return builtin_type (gdbarch)->builtin_int32;
117}
118
119/* Write into appropriate registers a function return value
120 of type TYPE, given in virtual format. */
121
122static void
123ft32_store_return_value (struct type *type, struct regcache *regcache,
124 const gdb_byte *valbuf)
125{
ac7936df 126 struct gdbarch *gdbarch = regcache->arch ();
49d45b20
JB
127 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
128 CORE_ADDR regval;
df86565b 129 int len = type->length ();
49d45b20
JB
130
131 /* Things always get returned in RET1_REGNUM, RET2_REGNUM. */
132 regval = extract_unsigned_integer (valbuf, len > 4 ? 4 : len, byte_order);
133 regcache_cooked_write_unsigned (regcache, FT32_R0_REGNUM, regval);
134 if (len > 4)
135 {
136 regval = extract_unsigned_integer (valbuf + 4,
137 len - 4, byte_order);
138 regcache_cooked_write_unsigned (regcache, FT32_R1_REGNUM, regval);
139 }
140}
141
dcc31d28
JB
142/* Fetch a single 32-bit instruction from address a. If memory contains
143 a compressed instruction pair, return the expanded instruction. */
144
145static ULONGEST
146ft32_fetch_instruction (CORE_ADDR a, int *isize,
dda83cd7 147 enum bfd_endian byte_order)
dcc31d28
JB
148{
149 unsigned int sc[2];
150 ULONGEST inst;
151
152 CORE_ADDR a4 = a & ~3;
153 inst = read_code_unsigned_integer (a4, 4, byte_order);
154 *isize = ft32_decode_shortcode (a4, inst, sc) ? 2 : 4;
155 if (*isize == 2)
156 return sc[1 & (a >> 1)];
157 else
158 return inst;
159}
160
49d45b20
JB
161/* Decode the instructions within the given address range. Decide
162 when we must have reached the end of the function prologue. If a
163 frame_info pointer is provided, fill in its saved_regs etc.
164
165 Returns the address of the first instruction after the prologue. */
166
49d45b20
JB
167static CORE_ADDR
168ft32_analyze_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
169 struct ft32_frame_cache *cache,
170 struct gdbarch *gdbarch)
171{
172 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
173 CORE_ADDR next_addr;
870f88f7 174 ULONGEST inst;
dcc31d28 175 int isize = 0;
ae4e2501 176 int regnum, pushreg;
177 struct bound_minimal_symbol msymbol;
178 const int first_saved_reg = 13; /* The first saved register. */
179 /* PROLOGS are addresses of the subroutine prologs, PROLOGS[n]
180 is the address of __prolog_$rN.
181 __prolog_$rN pushes registers from 13 through n inclusive.
182 So for example CALL __prolog_$r15 is equivalent to:
183 PUSH $r13
184 PUSH $r14
185 PUSH $r15
186 Note that PROLOGS[0] through PROLOGS[12] are unused. */
187 CORE_ADDR prologs[32];
49d45b20
JB
188
189 cache->saved_regs[FT32_PC_REGNUM] = 0;
190 cache->framesize = 0;
191
ae4e2501 192 for (regnum = first_saved_reg; regnum < 32; regnum++)
193 {
194 char prolog_symbol[32];
195
196 snprintf (prolog_symbol, sizeof (prolog_symbol), "__prolog_$r%02d",
197 regnum);
198 msymbol = lookup_minimal_symbol (prolog_symbol, NULL, NULL);
199 if (msymbol.minsym)
4aeddc50 200 prologs[regnum] = msymbol.value_address ();
ae4e2501 201 else
202 prologs[regnum] = 0;
203 }
204
49d45b20 205 if (start_addr >= end_addr)
ae4e2501 206 return end_addr;
49d45b20
JB
207
208 cache->established = 0;
dcc31d28 209 for (next_addr = start_addr; next_addr < end_addr; next_addr += isize)
49d45b20 210 {
dcc31d28 211 inst = ft32_fetch_instruction (next_addr, &isize, byte_order);
49d45b20 212
86feccb9 213 if (FT32_IS_PUSH (inst))
49d45b20 214 {
ae4e2501 215 pushreg = FT32_PUSH_REG (inst);
49d45b20 216 cache->framesize += 4;
ae4e2501 217 cache->saved_regs[FT32_R0_REGNUM + pushreg] = cache->framesize;
49d45b20 218 }
ae4e2501 219 else if (FT32_IS_CALL (inst))
220 {
221 for (regnum = first_saved_reg; regnum < 32; regnum++)
222 {
223 if ((4 * (inst & 0x3ffff)) == prologs[regnum])
224 {
225 for (pushreg = first_saved_reg; pushreg <= regnum;
226 pushreg++)
227 {
228 cache->framesize += 4;
229 cache->saved_regs[FT32_R0_REGNUM + pushreg] =
230 cache->framesize;
231 }
ae4e2501 232 }
233 }
234 break;
235 }
49d45b20
JB
236 else
237 break;
238 }
239 for (regnum = FT32_R0_REGNUM; regnum < FT32_PC_REGNUM; regnum++)
240 {
241 if (cache->saved_regs[regnum] != REG_UNAVAIL)
ae4e2501 242 cache->saved_regs[regnum] =
243 cache->framesize - cache->saved_regs[regnum];
49d45b20
JB
244 }
245 cache->saved_regs[FT32_PC_REGNUM] = cache->framesize;
246
247 /* It is a LINK? */
248 if (next_addr < end_addr)
249 {
dcc31d28 250 inst = ft32_fetch_instruction (next_addr, &isize, byte_order);
86feccb9 251 if (FT32_IS_LINK (inst))
49d45b20
JB
252 {
253 cache->established = 1;
254 for (regnum = FT32_R0_REGNUM; regnum < FT32_PC_REGNUM; regnum++)
255 {
256 if (cache->saved_regs[regnum] != REG_UNAVAIL)
257 cache->saved_regs[regnum] += 4;
258 }
259 cache->saved_regs[FT32_PC_REGNUM] = cache->framesize + 4;
260 cache->saved_regs[FT32_FP_REGNUM] = 0;
86feccb9 261 cache->framesize += FT32_LINK_SIZE (inst);
dcc31d28 262 next_addr += isize;
49d45b20
JB
263 }
264 }
265
266 return next_addr;
267}
268
269/* Find the end of function prologue. */
270
271static CORE_ADDR
272ft32_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
273{
274 CORE_ADDR func_addr = 0, func_end = 0;
275 const char *func_name;
276
277 /* See if we can determine the end of the prologue via the symbol table.
278 If so, then return either PC, or the PC after the prologue, whichever
279 is greater. */
280 if (find_pc_partial_function (pc, &func_name, &func_addr, &func_end))
281 {
282 CORE_ADDR post_prologue_pc
283 = skip_prologue_using_sal (gdbarch, func_addr);
284 if (post_prologue_pc != 0)
325fac50 285 return std::max (pc, post_prologue_pc);
49d45b20
JB
286 else
287 {
288 /* Can't determine prologue from the symbol table, need to examine
289 instructions. */
290 struct symtab_and_line sal;
291 struct symbol *sym;
292 struct ft32_frame_cache cache;
293 CORE_ADDR plg_end;
294
295 memset (&cache, 0, sizeof cache);
296
297 plg_end = ft32_analyze_prologue (func_addr,
298 func_end, &cache, gdbarch);
299 /* Found a function. */
ccf41c24
TT
300 sym = lookup_symbol (func_name, nullptr, SEARCH_FUNCTION_DOMAIN,
301 nullptr).symbol;
49d45b20 302 /* Don't use line number debug info for assembly source files. */
c1b5c1eb 303 if ((sym != NULL) && sym->language () != language_asm)
49d45b20
JB
304 {
305 sal = find_pc_line (func_addr, 0);
306 if (sal.end && sal.end < func_end)
307 {
308 /* Found a line number, use it as end of prologue. */
309 return sal.end;
310 }
311 }
312 /* No useable line symbol. Use result of prologue parsing method. */
313 return plg_end;
314 }
315 }
316
317 /* No function symbol -- just return the PC. */
318 return pc;
319}
320
623fb775 321/* Implementation of `pointer_to_address' gdbarch method.
322
323 On FT32 address space zero is RAM, address space 1 is flash.
324 RAM appears at address RAM_BIAS, flash at address 0. */
325
326static CORE_ADDR
327ft32_pointer_to_address (struct gdbarch *gdbarch,
328 struct type *type, const gdb_byte *buf)
329{
330 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
331 CORE_ADDR addr
df86565b 332 = extract_unsigned_integer (buf, type->length (), byte_order);
623fb775 333
334 if (TYPE_ADDRESS_CLASS_1 (type))
335 return addr;
336 else
337 return addr | RAM_BIAS;
338}
339
340/* Implementation of `address_class_type_flags' gdbarch method.
341
342 This method maps DW_AT_address_class attributes to a
343 type_instance_flag_value. */
344
314ad88d 345static type_instance_flags
623fb775 346ft32_address_class_type_flags (int byte_size, int dwarf2_addr_class)
347{
348 /* The value 1 of the DW_AT_address_class attribute corresponds to the
349 __flash__ qualifier, meaning pointer to data in FT32 program memory.
350 */
351 if (dwarf2_addr_class == 1)
352 return TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
353 return 0;
354}
355
356/* Implementation of `address_class_type_flags_to_name' gdbarch method.
357
358 Convert a type_instance_flag_value to an address space qualifier. */
359
360static const char*
314ad88d
PA
361ft32_address_class_type_flags_to_name (struct gdbarch *gdbarch,
362 type_instance_flags type_flags)
623fb775 363{
364 if (type_flags & TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1)
365 return "flash";
366 else
367 return NULL;
368}
369
370/* Implementation of `address_class_name_to_type_flags' gdbarch method.
371
372 Convert an address space qualifier to a type_instance_flag_value. */
373
314ad88d 374static bool
623fb775 375ft32_address_class_name_to_type_flags (struct gdbarch *gdbarch,
376 const char* name,
314ad88d 377 type_instance_flags *type_flags_ptr)
623fb775 378{
379 if (strcmp (name, "flash") == 0)
380 {
381 *type_flags_ptr = TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1;
314ad88d 382 return true;
623fb775 383 }
384 else
314ad88d 385 return false;
623fb775 386}
387
49d45b20
JB
388/* Given a return value in `regbuf' with a type `valtype',
389 extract and copy its value into `valbuf'. */
390
391static void
392ft32_extract_return_value (struct type *type, struct regcache *regcache,
393 gdb_byte *dst)
394{
ac7936df 395 struct gdbarch *gdbarch = regcache->arch ();
49d45b20
JB
396 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
397 bfd_byte *valbuf = dst;
df86565b 398 int len = type->length ();
49d45b20
JB
399 ULONGEST tmp;
400
401 /* By using store_unsigned_integer we avoid having to do
402 anything special for small big-endian values. */
403 regcache_cooked_read_unsigned (regcache, FT32_R0_REGNUM, &tmp);
404 store_unsigned_integer (valbuf, (len > 4 ? len - 4 : len), byte_order, tmp);
405
406 /* Ignore return values more than 8 bytes in size because the ft32
407 returns anything more than 8 bytes in the stack. */
408 if (len > 4)
409 {
410 regcache_cooked_read_unsigned (regcache, FT32_R1_REGNUM, &tmp);
411 store_unsigned_integer (valbuf + len - 4, 4, byte_order, tmp);
412 }
413}
414
415/* Implement the "return_value" gdbarch method. */
416
417static enum return_value_convention
418ft32_return_value (struct gdbarch *gdbarch, struct value *function,
419 struct type *valtype, struct regcache *regcache,
420 gdb_byte *readbuf, const gdb_byte *writebuf)
421{
df86565b 422 if (valtype->length () > 8)
49d45b20
JB
423 return RETURN_VALUE_STRUCT_CONVENTION;
424 else
425 {
426 if (readbuf != NULL)
427 ft32_extract_return_value (valtype, regcache, readbuf);
428 if (writebuf != NULL)
429 ft32_store_return_value (valtype, regcache, writebuf);
430 return RETURN_VALUE_REGISTER_CONVENTION;
431 }
432}
433
434/* Allocate and initialize a ft32_frame_cache object. */
435
436static struct ft32_frame_cache *
437ft32_alloc_frame_cache (void)
438{
439 struct ft32_frame_cache *cache;
440 int i;
441
442 cache = FRAME_OBSTACK_ZALLOC (struct ft32_frame_cache);
443
444 for (i = 0; i < FT32_NUM_REGS; ++i)
445 cache->saved_regs[i] = REG_UNAVAIL;
446
447 return cache;
448}
449
450/* Populate a ft32_frame_cache object for this_frame. */
451
452static struct ft32_frame_cache *
8480a37e 453ft32_frame_cache (const frame_info_ptr &this_frame, void **this_cache)
49d45b20
JB
454{
455 struct ft32_frame_cache *cache;
456 CORE_ADDR current_pc;
457 int i;
458
459 if (*this_cache)
9a3c8263 460 return (struct ft32_frame_cache *) *this_cache;
49d45b20
JB
461
462 cache = ft32_alloc_frame_cache ();
463 *this_cache = cache;
464
465 cache->base = get_frame_register_unsigned (this_frame, FT32_FP_REGNUM);
466 if (cache->base == 0)
467 return cache;
468
469 cache->pc = get_frame_func (this_frame);
470 current_pc = get_frame_pc (this_frame);
471 if (cache->pc)
472 {
473 struct gdbarch *gdbarch = get_frame_arch (this_frame);
474
475 ft32_analyze_prologue (cache->pc, current_pc, cache, gdbarch);
476 if (!cache->established)
477 cache->base = get_frame_register_unsigned (this_frame, FT32_SP_REGNUM);
478 }
479
480 cache->saved_sp = cache->base - 4;
481
482 for (i = 0; i < FT32_NUM_REGS; ++i)
483 if (cache->saved_regs[i] != REG_UNAVAIL)
484 cache->saved_regs[i] = cache->base + cache->saved_regs[i];
485
486 return cache;
487}
488
49d45b20
JB
489/* Given a GDB frame, determine the address of the calling function's
490 frame. This will be used to create a new GDB frame struct. */
491
492static void
8480a37e 493ft32_frame_this_id (const frame_info_ptr &this_frame,
49d45b20
JB
494 void **this_prologue_cache, struct frame_id *this_id)
495{
496 struct ft32_frame_cache *cache = ft32_frame_cache (this_frame,
497 this_prologue_cache);
498
499 /* This marks the outermost frame. */
500 if (cache->base == 0)
501 return;
502
503 *this_id = frame_id_build (cache->saved_sp, cache->pc);
504}
505
506/* Get the value of register regnum in the previous stack frame. */
507
508static struct value *
8480a37e 509ft32_frame_prev_register (const frame_info_ptr &this_frame,
49d45b20
JB
510 void **this_prologue_cache, int regnum)
511{
512 struct ft32_frame_cache *cache = ft32_frame_cache (this_frame,
513 this_prologue_cache);
514
515 gdb_assert (regnum >= 0);
516
517 if (regnum == FT32_SP_REGNUM && cache->saved_sp)
518 return frame_unwind_got_constant (this_frame, regnum, cache->saved_sp);
519
520 if (regnum < FT32_NUM_REGS && cache->saved_regs[regnum] != REG_UNAVAIL)
521 return frame_unwind_got_memory (this_frame, regnum,
522 RAM_BIAS | cache->saved_regs[regnum]);
523
524 return frame_unwind_got_register (this_frame, regnum, regnum);
525}
526
527static const struct frame_unwind ft32_frame_unwind =
528{
a154d838 529 "ft32 prologue",
49d45b20
JB
530 NORMAL_FRAME,
531 default_frame_unwind_stop_reason,
532 ft32_frame_this_id,
533 ft32_frame_prev_register,
534 NULL,
535 default_frame_sniffer
536};
537
538/* Return the base address of this_frame. */
539
540static CORE_ADDR
8480a37e 541ft32_frame_base_address (const frame_info_ptr &this_frame, void **this_cache)
49d45b20
JB
542{
543 struct ft32_frame_cache *cache = ft32_frame_cache (this_frame,
544 this_cache);
545
546 return cache->base;
547}
548
549static const struct frame_base ft32_frame_base =
550{
551 &ft32_frame_unwind,
552 ft32_frame_base_address,
553 ft32_frame_base_address,
554 ft32_frame_base_address
555};
556
49d45b20
JB
557/* Allocate and initialize the ft32 gdbarch object. */
558
559static struct gdbarch *
560ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
561{
623fb775 562 struct type *void_type;
563 struct type *func_void_type;
49d45b20
JB
564
565 /* If there is already a candidate, use it. */
566 arches = gdbarch_list_lookup_by_info (arches, &info);
567 if (arches != NULL)
568 return arches->gdbarch;
569
570 /* Allocate space for the new architecture. */
2b16913c
SM
571 gdbarch *gdbarch
572 = gdbarch_alloc (&info, gdbarch_tdep_up (new ft32_gdbarch_tdep));
573 ft32_gdbarch_tdep *tdep = gdbarch_tdep<ft32_gdbarch_tdep> (gdbarch);
49d45b20 574
623fb775 575 /* Create a type for PC. We can't use builtin types here, as they may not
576 be defined. */
cc495054
TT
577 type_allocator alloc (gdbarch);
578 void_type = alloc.new_type (TYPE_CODE_VOID, TARGET_CHAR_BIT, "void");
623fb775 579 func_void_type = make_function_type (void_type, NULL);
9c794d2d 580 tdep->pc_type = init_pointer_type (alloc, 4 * TARGET_CHAR_BIT, NULL,
88dfca6c 581 func_void_type);
314ad88d
PA
582 tdep->pc_type->set_instance_flags (tdep->pc_type->instance_flags ()
583 | TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1);
623fb775 584
49d45b20
JB
585 set_gdbarch_num_regs (gdbarch, FT32_NUM_REGS);
586 set_gdbarch_sp_regnum (gdbarch, FT32_SP_REGNUM);
587 set_gdbarch_pc_regnum (gdbarch, FT32_PC_REGNUM);
588 set_gdbarch_register_name (gdbarch, ft32_register_name);
589 set_gdbarch_register_type (gdbarch, ft32_register_type);
590
591 set_gdbarch_return_value (gdbarch, ft32_return_value);
592
623fb775 593 set_gdbarch_pointer_to_address (gdbarch, ft32_pointer_to_address);
594
49d45b20
JB
595 set_gdbarch_skip_prologue (gdbarch, ft32_skip_prologue);
596 set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
04180708
YQ
597 set_gdbarch_breakpoint_kind_from_pc (gdbarch, ft32_breakpoint::kind_from_pc);
598 set_gdbarch_sw_breakpoint_from_kind (gdbarch, ft32_breakpoint::bp_from_kind);
49d45b20
JB
599 set_gdbarch_frame_align (gdbarch, ft32_frame_align);
600
601 frame_base_set_default (gdbarch, &ft32_frame_base);
602
49d45b20
JB
603 /* Hook in ABI-specific overrides, if they have been registered. */
604 gdbarch_init_osabi (info, gdbarch);
605
606 /* Hook in the default unwinders. */
607 frame_unwind_append_unwinder (gdbarch, &ft32_frame_unwind);
608
609 /* Support simple overlay manager. */
610 set_gdbarch_overlay_update (gdbarch, simple_overlay_update);
611
623fb775 612 set_gdbarch_address_class_type_flags (gdbarch, ft32_address_class_type_flags);
613 set_gdbarch_address_class_name_to_type_flags
614 (gdbarch, ft32_address_class_name_to_type_flags);
615 set_gdbarch_address_class_type_flags_to_name
616 (gdbarch, ft32_address_class_type_flags_to_name);
617
49d45b20
JB
618 return gdbarch;
619}
620
621/* Register this machine's init routine. */
622
6c265988 623void _initialize_ft32_tdep ();
49d45b20 624void
6c265988 625_initialize_ft32_tdep ()
49d45b20 626{
ec29a63c 627 gdbarch_register (bfd_arch_ft32, ft32_gdbarch_init);
49d45b20 628}