OLD | NEW |
1 /* Target dependent code for GDB on TI C6x systems. | 1 /* Target dependent code for GDB on TI C6x systems. |
2 | 2 |
3 Copyright (C) 2010-2012 Free Software Foundation, Inc. | 3 Copyright (C) 2010-2012 Free Software Foundation, Inc. |
4 Contributed by Andrew Jenner <andrew@codesourcery.com> | 4 Contributed by Andrew Jenner <andrew@codesourcery.com> |
5 Contributed by Yao Qi <yao@codesourcery.com> | 5 Contributed by Yao Qi <yao@codesourcery.com> |
6 | 6 |
7 This file is part of GDB. | 7 This file is part of GDB. |
8 | 8 |
9 This program is free software; you can redistribute it and/or modify | 9 This program is free software; you can redistribute it and/or modify |
10 it under the terms of the GNU General Public License as published by | 10 it under the terms of the GNU General Public License as published by |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 cache->reg_saved[i] = -1; | 139 cache->reg_saved[i] = -1; |
140 } | 140 } |
141 | 141 |
142 static unsigned long tic6x_fetch_instruction (struct gdbarch *, CORE_ADDR); | 142 static unsigned long tic6x_fetch_instruction (struct gdbarch *, CORE_ADDR); |
143 static int tic6x_register_number (int reg, int side, int crosspath); | 143 static int tic6x_register_number (int reg, int side, int crosspath); |
144 | 144 |
145 /* Do a full analysis of the prologue at START_PC and update CACHE accordingly. | 145 /* Do a full analysis of the prologue at START_PC and update CACHE accordingly. |
146 Bail out early if CURRENT_PC is reached. Returns the address of the first | 146 Bail out early if CURRENT_PC is reached. Returns the address of the first |
147 instruction after the prologue. */ | 147 instruction after the prologue. */ |
148 | 148 |
149 CORE_ADDR | 149 static CORE_ADDR |
150 tic6x_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, | 150 tic6x_analyze_prologue (struct gdbarch *gdbarch, const CORE_ADDR start_pc, |
151 const CORE_ADDR current_pc, | 151 const CORE_ADDR current_pc, |
152 struct tic6x_unwind_cache *cache, | 152 struct tic6x_unwind_cache *cache, |
153 struct frame_info *this_frame) | 153 struct frame_info *this_frame) |
154 { | 154 { |
155 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | 155 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); |
156 unsigned long inst; | 156 unsigned long inst; |
157 unsigned int src_reg, base_reg, dst_reg; | 157 unsigned int src_reg, base_reg, dst_reg; |
158 int i; | 158 int i; |
159 CORE_ADDR pc = start_pc; | 159 CORE_ADDR pc = start_pc; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 instead of offsets. */ | 291 instead of offsets. */ |
292 for (i = 0; i < TIC6X_NUM_CORE_REGS; i++) | 292 for (i = 0; i < TIC6X_NUM_CORE_REGS; i++) |
293 if (cache->reg_saved[i] != -1) | 293 if (cache->reg_saved[i] != -1) |
294 cache->reg_saved[i] = cache->base + cache->reg_saved[i]; | 294 cache->reg_saved[i] = cache->base + cache->reg_saved[i]; |
295 | 295 |
296 return return_pc; | 296 return return_pc; |
297 } | 297 } |
298 | 298 |
299 /* This is the implementation of gdbarch method skip_prologue. */ | 299 /* This is the implementation of gdbarch method skip_prologue. */ |
300 | 300 |
301 CORE_ADDR | 301 static CORE_ADDR |
302 tic6x_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) | 302 tic6x_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) |
303 { | 303 { |
304 CORE_ADDR limit_pc; | |
305 CORE_ADDR func_addr; | 304 CORE_ADDR func_addr; |
306 struct tic6x_unwind_cache cache; | 305 struct tic6x_unwind_cache cache; |
307 | 306 |
308 /* See if we can determine the end of the prologue via the symbol table. | 307 /* See if we can determine the end of the prologue via the symbol table. |
309 If so, then return either PC, or the PC after the prologue, whichever is | 308 If so, then return either PC, or the PC after the prologue, whichever is |
310 greater. */ | 309 greater. */ |
311 if (find_pc_partial_function (start_pc, NULL, &func_addr, NULL)) | 310 if (find_pc_partial_function (start_pc, NULL, &func_addr, NULL)) |
312 { | 311 { |
313 CORE_ADDR post_prologue_pc | 312 CORE_ADDR post_prologue_pc |
314 = skip_prologue_using_sal (gdbarch, func_addr); | 313 = skip_prologue_using_sal (gdbarch, func_addr); |
315 if (post_prologue_pc != 0) | 314 if (post_prologue_pc != 0) |
316 return max (start_pc, post_prologue_pc); | 315 return max (start_pc, post_prologue_pc); |
317 } | 316 } |
318 | 317 |
319 /* Can't determine prologue from the symbol table, need to examine | 318 /* Can't determine prologue from the symbol table, need to examine |
320 instructions. */ | 319 instructions. */ |
321 return tic6x_analyze_prologue (gdbarch, start_pc, (CORE_ADDR) -1, &cache, | 320 return tic6x_analyze_prologue (gdbarch, start_pc, (CORE_ADDR) -1, &cache, |
322 NULL); | 321 NULL); |
323 } | 322 } |
324 | 323 |
325 /* This is the implementation of gdbarch method breakpiont_from_pc. */ | 324 /* This is the implementation of gdbarch method breakpiont_from_pc. */ |
326 | 325 |
327 const unsigned char* | 326 static const unsigned char* |
328 tic6x_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, | 327 tic6x_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *bp_addr, |
329 int *bp_size) | 328 int *bp_size) |
330 { | 329 { |
331 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | 330 struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
332 | 331 |
333 *bp_size = 4; | 332 *bp_size = 4; |
334 | 333 |
335 if (tdep == NULL || tdep->breakpoint == NULL) | 334 if (tdep == NULL || tdep->breakpoint == NULL) |
336 { | 335 { |
337 if (BFD_ENDIAN_BIG == gdbarch_byte_order_for_code (gdbarch)) | 336 if (BFD_ENDIAN_BIG == gdbarch_byte_order_for_code (gdbarch)) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 390 |
392 static CORE_ADDR | 391 static CORE_ADDR |
393 tic6x_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame) | 392 tic6x_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame) |
394 { | 393 { |
395 return frame_unwind_register_unsigned (this_frame, TIC6X_SP_REGNUM); | 394 return frame_unwind_register_unsigned (this_frame, TIC6X_SP_REGNUM); |
396 } | 395 } |
397 | 396 |
398 | 397 |
399 /* Frame base handling. */ | 398 /* Frame base handling. */ |
400 | 399 |
401 struct tic6x_unwind_cache* | 400 static struct tic6x_unwind_cache* |
402 tic6x_frame_unwind_cache (struct frame_info *this_frame, | 401 tic6x_frame_unwind_cache (struct frame_info *this_frame, |
403 void **this_prologue_cache) | 402 void **this_prologue_cache) |
404 { | 403 { |
405 struct gdbarch *gdbarch = get_frame_arch (this_frame); | 404 struct gdbarch *gdbarch = get_frame_arch (this_frame); |
406 CORE_ADDR current_pc; | 405 CORE_ADDR current_pc; |
407 struct tic6x_unwind_cache *cache; | 406 struct tic6x_unwind_cache *cache; |
408 int i; | |
409 | 407 |
410 if (*this_prologue_cache) | 408 if (*this_prologue_cache) |
411 return *this_prologue_cache; | 409 return *this_prologue_cache; |
412 | 410 |
413 cache = FRAME_OBSTACK_ZALLOC (struct tic6x_unwind_cache); | 411 cache = FRAME_OBSTACK_ZALLOC (struct tic6x_unwind_cache); |
414 (*this_prologue_cache) = cache; | 412 (*this_prologue_cache) = cache; |
415 | 413 |
416 cache->return_regnum = TIC6X_RA_REGNUM; | 414 cache->return_regnum = TIC6X_RA_REGNUM; |
417 | 415 |
418 tic6x_setup_default (cache); | 416 tic6x_setup_default (cache); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 return r; | 597 return r; |
600 } | 598 } |
601 | 599 |
602 /* Determine where to set a single step breakpoint. */ | 600 /* Determine where to set a single step breakpoint. */ |
603 | 601 |
604 static CORE_ADDR | 602 static CORE_ADDR |
605 tic6x_get_next_pc (struct frame_info *frame, CORE_ADDR pc) | 603 tic6x_get_next_pc (struct frame_info *frame, CORE_ADDR pc) |
606 { | 604 { |
607 struct gdbarch *gdbarch = get_frame_arch (frame); | 605 struct gdbarch *gdbarch = get_frame_arch (frame); |
608 unsigned long inst; | 606 unsigned long inst; |
609 int offset; | |
610 int register_number; | 607 int register_number; |
611 int last = 0; | 608 int last = 0; |
612 | 609 |
613 do | 610 do |
614 { | 611 { |
615 inst = tic6x_fetch_instruction (gdbarch, pc); | 612 inst = tic6x_fetch_instruction (gdbarch, pc); |
616 | 613 |
617 last = !(inst & 1); | 614 last = !(inst & 1); |
618 | 615 |
619 if (inst == TIC6X_INST_SWE) | 616 if (inst == TIC6X_INST_SWE) |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 } | 688 } |
692 } | 689 } |
693 pc += TIC6X_OPCODE_SIZE; | 690 pc += TIC6X_OPCODE_SIZE; |
694 } | 691 } |
695 while (!last); | 692 while (!last); |
696 return pc; | 693 return pc; |
697 } | 694 } |
698 | 695 |
699 /* This is the implementation of gdbarch method software_single_step. */ | 696 /* This is the implementation of gdbarch method software_single_step. */ |
700 | 697 |
701 int | 698 static int |
702 tic6x_software_single_step (struct frame_info *frame) | 699 tic6x_software_single_step (struct frame_info *frame) |
703 { | 700 { |
704 struct gdbarch *gdbarch = get_frame_arch (frame); | 701 struct gdbarch *gdbarch = get_frame_arch (frame); |
705 struct address_space *aspace = get_frame_address_space (frame); | 702 struct address_space *aspace = get_frame_address_space (frame); |
706 CORE_ADDR next_pc = tic6x_get_next_pc (frame, get_frame_pc (frame)); | 703 CORE_ADDR next_pc = tic6x_get_next_pc (frame, get_frame_pc (frame)); |
707 | 704 |
708 insert_single_step_breakpoint (gdbarch, aspace, next_pc); | 705 insert_single_step_breakpoint (gdbarch, aspace, next_pc); |
709 | 706 |
710 return 1; | 707 return 1; |
711 } | 708 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 { | 811 { |
815 regcache_cooked_write (regcache, TIC6X_A4_REGNUM, valbuf); | 812 regcache_cooked_write (regcache, TIC6X_A4_REGNUM, valbuf); |
816 regcache_cooked_write (regcache, TIC6X_A5_REGNUM, valbuf + 4); | 813 regcache_cooked_write (regcache, TIC6X_A5_REGNUM, valbuf + 4); |
817 } | 814 } |
818 } | 815 } |
819 } | 816 } |
820 | 817 |
821 /* This is the implementation of gdbarch method return_value. */ | 818 /* This is the implementation of gdbarch method return_value. */ |
822 | 819 |
823 static enum return_value_convention | 820 static enum return_value_convention |
824 tic6x_return_value (struct gdbarch *gdbarch, struct type *func_type, | 821 tic6x_return_value (struct gdbarch *gdbarch, struct value *function, |
825 struct type *type, struct regcache *regcache, | 822 struct type *type, struct regcache *regcache, |
826 gdb_byte *readbuf, const gdb_byte *writebuf) | 823 gdb_byte *readbuf, const gdb_byte *writebuf) |
827 { | 824 { |
| 825 /* In C++, when function returns an object, even its size is small |
| 826 enough, it stii has to be passed via reference, pointed by register |
| 827 A3. */ |
| 828 if (current_language->la_language == language_cplus) |
| 829 { |
| 830 if (type != NULL) |
| 831 { |
| 832 CHECK_TYPEDEF (type); |
| 833 if (language_pass_by_reference (type)) |
| 834 return RETURN_VALUE_STRUCT_CONVENTION; |
| 835 } |
| 836 } |
| 837 |
828 if (TYPE_LENGTH (type) > 8) | 838 if (TYPE_LENGTH (type) > 8) |
829 return RETURN_VALUE_STRUCT_CONVENTION; | 839 return RETURN_VALUE_STRUCT_CONVENTION; |
830 | 840 |
831 if (readbuf) | 841 if (readbuf) |
832 tic6x_extract_return_value (type, regcache, | 842 tic6x_extract_return_value (type, regcache, |
833 gdbarch_byte_order (gdbarch), readbuf); | 843 gdbarch_byte_order (gdbarch), readbuf); |
834 if (writebuf) | 844 if (writebuf) |
835 tic6x_store_return_value (type, regcache, | 845 tic6x_store_return_value (type, regcache, |
836 gdbarch_byte_order (gdbarch), writebuf); | 846 gdbarch_byte_order (gdbarch), writebuf); |
837 | 847 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 int argnum; | 918 int argnum; |
909 int len = 0; | 919 int len = 0; |
910 int stack_offset = 4; | 920 int stack_offset = 4; |
911 int references_offset = 4; | 921 int references_offset = 4; |
912 CORE_ADDR func_addr = find_function_addr (function, NULL); | 922 CORE_ADDR func_addr = find_function_addr (function, NULL); |
913 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); | 923 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); |
914 struct type *func_type = value_type (function); | 924 struct type *func_type = value_type (function); |
915 /* The first arg passed on stack. Mostly the first 10 args are passed by | 925 /* The first arg passed on stack. Mostly the first 10 args are passed by |
916 registers. */ | 926 registers. */ |
917 int first_arg_on_stack = 10; | 927 int first_arg_on_stack = 10; |
918 /* If this inf-call is a cpp method call, and return value is passed by | |
919 reference, this flag is set to 1, otherwise set to 0. We need this flag | |
920 because computation of the return location in | |
921 infcall.c:call_function_by_hand is wrong for C6000 ELF ABI. In | |
922 call_function_by_hand, the language is considered first, and then | |
923 target ABI is considered. If language_pass_by_reference returns true, | |
924 the return location is passed as the first parameter to the function, | |
925 which is conflict with C6000 ELF ABI. If this flag is true, we should | |
926 adjust args and return locations accordingly to comply with C6000 ELF | |
927 ABI. */ | |
928 int cplus_return_struct_by_reference = 0; | |
929 | 928 |
930 if (current_language->la_language == language_cplus) | |
931 { | |
932 struct type *values_type; | |
933 | |
934 find_function_addr (function, &values_type); | |
935 | |
936 if (values_type) | |
937 { | |
938 CHECK_TYPEDEF (values_type); | |
939 if (language_pass_by_reference (values_type)) | |
940 cplus_return_struct_by_reference = 1; | |
941 } | |
942 | |
943 } | |
944 /* Set the return address register to point to the entry point of | 929 /* Set the return address register to point to the entry point of |
945 the program, where a breakpoint lies in wait. */ | 930 the program, where a breakpoint lies in wait. */ |
946 regcache_cooked_write_unsigned (regcache, TIC6X_RA_REGNUM, bp_addr); | 931 regcache_cooked_write_unsigned (regcache, TIC6X_RA_REGNUM, bp_addr); |
947 | 932 |
948 /* The caller must pass an argument in A3 containing a destination address | 933 /* The caller must pass an argument in A3 containing a destination address |
949 for the returned value. The callee returns the object by copying it to | 934 for the returned value. The callee returns the object by copying it to |
950 the address in A3. */ | 935 the address in A3. */ |
951 if (struct_return) | 936 if (struct_return) |
952 regcache_cooked_write_unsigned (regcache, 3, struct_addr); | 937 regcache_cooked_write_unsigned (regcache, 3, struct_addr); |
953 else if (cplus_return_struct_by_reference) | |
954 /* When cplus_return_struct_by_reference is 1, means local variable | |
955 lang_struct_return in call_function_by_hand is 1, so struct is | |
956 returned by reference, even STRUCT_RETURN is 0. Note that STRUCT_ADDR | |
957 is still valid in this case. */ | |
958 regcache_cooked_write_unsigned (regcache, 3, struct_addr); | |
959 | 938 |
960 /* Determine the type of this function. */ | 939 /* Determine the type of this function. */ |
961 func_type = check_typedef (func_type); | 940 func_type = check_typedef (func_type); |
962 if (TYPE_CODE (func_type) == TYPE_CODE_PTR) | 941 if (TYPE_CODE (func_type) == TYPE_CODE_PTR) |
963 func_type = check_typedef (TYPE_TARGET_TYPE (func_type)); | 942 func_type = check_typedef (TYPE_TARGET_TYPE (func_type)); |
964 | 943 |
965 gdb_assert (TYPE_CODE (func_type) == TYPE_CODE_FUNC | 944 gdb_assert (TYPE_CODE (func_type) == TYPE_CODE_FUNC |
966 || TYPE_CODE (func_type) == TYPE_CODE_METHOD); | 945 || TYPE_CODE (func_type) == TYPE_CODE_METHOD); |
967 | 946 |
968 /* For a variadic C function, the last explicitly declared argument and all | 947 /* For a variadic C function, the last explicitly declared argument and all |
969 remaining arguments are passed on the stack. */ | 948 remaining arguments are passed on the stack. */ |
970 if (TYPE_VARARGS (func_type)) | 949 if (TYPE_VARARGS (func_type)) |
971 first_arg_on_stack = TYPE_NFIELDS (func_type) - 1; | 950 first_arg_on_stack = TYPE_NFIELDS (func_type) - 1; |
972 | 951 |
973 /* Now make space on the stack for the args. If | 952 /* Now make space on the stack for the args. */ |
974 cplus_return_struct_by_reference is 1, means GDB pass an extra parameter | 953 for (argnum = 0; argnum < nargs; argnum++) |
975 in ARGS, which is useless here, skip it. */ | |
976 for (argnum = cplus_return_struct_by_reference; argnum < nargs; argnum++) | |
977 { | 954 { |
978 int len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4); | 955 int len = align_up (TYPE_LENGTH (value_type (args[argnum])), 4); |
979 if (argnum >= 10 - argreg) | 956 if (argnum >= 10 - argreg) |
980 references_offset += len; | 957 references_offset += len; |
981 stack_offset += len; | 958 stack_offset += len; |
982 } | 959 } |
983 sp -= stack_offset; | 960 sp -= stack_offset; |
984 /* SP should be 8-byte aligned, see C6000 ABI section 4.4.1 | 961 /* SP should be 8-byte aligned, see C6000 ABI section 4.4.1 |
985 Stack Alignment. */ | 962 Stack Alignment. */ |
986 sp = align_down (sp, 8); | 963 sp = align_down (sp, 8); |
987 stack_offset = 4; | 964 stack_offset = 4; |
988 | 965 |
989 /* Now load as many as possible of the first arguments into | 966 /* Now load as many as possible of the first arguments into |
990 registers, and push the rest onto the stack. Loop through args | 967 registers, and push the rest onto the stack. Loop through args |
991 from first to last. */ | 968 from first to last. */ |
992 for (argnum = cplus_return_struct_by_reference; argnum < nargs; argnum++) | 969 for (argnum = 0; argnum < nargs; argnum++) |
993 { | 970 { |
994 const gdb_byte *val; | 971 const gdb_byte *val; |
995 struct value *arg = args[argnum]; | 972 struct value *arg = args[argnum]; |
996 struct type *arg_type = check_typedef (value_type (arg)); | 973 struct type *arg_type = check_typedef (value_type (arg)); |
997 int len = TYPE_LENGTH (arg_type); | 974 int len = TYPE_LENGTH (arg_type); |
998 enum type_code typecode = TYPE_CODE (arg_type); | 975 enum type_code typecode = TYPE_CODE (arg_type); |
999 | 976 |
1000 val = value_contents (arg); | 977 val = value_contents (arg); |
1001 | 978 |
1002 /* Copy the argument to general registers or the stack in | 979 /* Copy the argument to general registers or the stack in |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 /* JMP_BUF contains 13 elements of type int, and return address is stored | 1180 /* JMP_BUF contains 13 elements of type int, and return address is stored |
1204 in the last slot. */ | 1181 in the last slot. */ |
1205 if (target_read_memory (jb_addr + 12 * 4, buf, 4)) | 1182 if (target_read_memory (jb_addr + 12 * 4, buf, 4)) |
1206 return 0; | 1183 return 0; |
1207 | 1184 |
1208 *pc = extract_unsigned_integer (buf, 4, byte_order); | 1185 *pc = extract_unsigned_integer (buf, 4, byte_order); |
1209 | 1186 |
1210 return 1; | 1187 return 1; |
1211 } | 1188 } |
1212 | 1189 |
| 1190 /* This is the implementation of gdbarch method |
| 1191 return_in_first_hidden_param_p. */ |
| 1192 |
| 1193 static int |
| 1194 tic6x_return_in_first_hidden_param_p (struct gdbarch *gdbarch, |
| 1195 struct type *type) |
| 1196 { |
| 1197 return 0; |
| 1198 } |
| 1199 |
1213 static struct gdbarch * | 1200 static struct gdbarch * |
1214 tic6x_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 1201 tic6x_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
1215 { | 1202 { |
1216 struct gdbarch *gdbarch; | 1203 struct gdbarch *gdbarch; |
1217 struct gdbarch_tdep *tdep; | 1204 struct gdbarch_tdep *tdep; |
1218 struct tdesc_arch_data *tdesc_data = NULL; | 1205 struct tdesc_arch_data *tdesc_data = NULL; |
1219 const struct target_desc *tdesc = info.target_desc; | 1206 const struct target_desc *tdesc = info.target_desc; |
1220 int has_gp = 0; | 1207 int has_gp = 0; |
1221 | 1208 |
1222 /* Check any target description for validity. */ | 1209 /* Check any target description for validity. */ |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 | 1348 |
1362 set_gdbarch_dummy_id (gdbarch, tic6x_dummy_id); | 1349 set_gdbarch_dummy_id (gdbarch, tic6x_dummy_id); |
1363 | 1350 |
1364 /* Enable inferior call support. */ | 1351 /* Enable inferior call support. */ |
1365 set_gdbarch_push_dummy_call (gdbarch, tic6x_push_dummy_call); | 1352 set_gdbarch_push_dummy_call (gdbarch, tic6x_push_dummy_call); |
1366 | 1353 |
1367 set_gdbarch_get_longjmp_target (gdbarch, tic6x_get_longjmp_target); | 1354 set_gdbarch_get_longjmp_target (gdbarch, tic6x_get_longjmp_target); |
1368 | 1355 |
1369 set_gdbarch_in_function_epilogue_p (gdbarch, tic6x_in_function_epilogue_p); | 1356 set_gdbarch_in_function_epilogue_p (gdbarch, tic6x_in_function_epilogue_p); |
1370 | 1357 |
| 1358 set_gdbarch_return_in_first_hidden_param_p (gdbarch, |
| 1359 tic6x_return_in_first_hidden_param
_p); |
| 1360 |
1371 /* Hook in ABI-specific overrides, if they have been registered. */ | 1361 /* Hook in ABI-specific overrides, if they have been registered. */ |
1372 gdbarch_init_osabi (info, gdbarch); | 1362 gdbarch_init_osabi (info, gdbarch); |
1373 | 1363 |
1374 if (tdesc_data) | 1364 if (tdesc_data) |
1375 tdesc_use_registers (gdbarch, tdesc, tdesc_data); | 1365 tdesc_use_registers (gdbarch, tdesc, tdesc_data); |
1376 | 1366 |
1377 return gdbarch; | 1367 return gdbarch; |
1378 } | 1368 } |
1379 | 1369 |
| 1370 /* -Wmissing-prototypes */ |
| 1371 extern initialize_file_ftype _initialize_tic6x_tdep; |
| 1372 |
1380 void | 1373 void |
1381 _initialize_tic6x_tdep (void) | 1374 _initialize_tic6x_tdep (void) |
1382 { | 1375 { |
1383 register_gdbarch_init (bfd_arch_tic6x, tic6x_gdbarch_init); | 1376 register_gdbarch_init (bfd_arch_tic6x, tic6x_gdbarch_init); |
1384 | 1377 |
1385 initialize_tdesc_tic6x_c64xp (); | 1378 initialize_tdesc_tic6x_c64xp (); |
1386 initialize_tdesc_tic6x_c64x (); | 1379 initialize_tdesc_tic6x_c64x (); |
1387 initialize_tdesc_tic6x_c62x (); | 1380 initialize_tdesc_tic6x_c62x (); |
1388 } | 1381 } |
OLD | NEW |