set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value); set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
set_gdbarch_return_value (gdbarch, sh_return_value_fpu);
static gdbarch_init_ftype sh_gdbarch_init;static struct gdbarch *sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches){  struct gdbarch *gdbarch;  sh_show_regs = sh_generic_show_regs;  switch (info.bfd_arch_info->mach)    {    case bfd_mach_sh2e:      sh_show_regs = sh2e_show_regs;      break;    case bfd_mach_sh_dsp:      sh_show_regs = sh_dsp_show_regs;      break;    case bfd_mach_sh3:      sh_show_regs = sh3_show_regs;      break;    case bfd_mach_sh3e:      sh_show_regs = sh3e_show_regs;      break;    case bfd_mach_sh3_dsp:    case bfd_mach_sh4al_dsp:      sh_show_regs = sh3_dsp_show_regs;      break;    case bfd_mach_sh4:    case bfd_mach_sh4a:      sh_show_regs = sh4_show_regs;      break;    case bfd_mach_sh4_nofpu:    case bfd_mach_sh4a_nofpu:      sh_show_regs = sh4_nofpu_show_regs;      break;    case bfd_mach_sh5:      sh_show_regs = sh64_show_regs;      /* SH5 is handled entirely in sh64-tdep.c */      return sh64_gdbarch_init (info, arches);    }  /* If there is already a candidate, use it.  */  arches = gdbarch_list_lookup_by_info (arches, &info);  if (arches != NULL)    return arches->gdbarch;  /* None found, create a new architecture from the information     provided. */  gdbarch = gdbarch_alloc (&info, NULL);  set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);  set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);  set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);  set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);  set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);  set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);  set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);  set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);  set_gdbarch_num_regs (gdbarch, SH_NUM_REGS);  set_gdbarch_sp_regnum (gdbarch, 15);  set_gdbarch_pc_regnum (gdbarch, 16);  set_gdbarch_fp0_regnum (gdbarch, -1);  set_gdbarch_num_pseudo_regs (gdbarch, 0);  set_gdbarch_register_type (gdbarch, sh_default_register_type);  set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);  set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc);  set_gdbarch_use_struct_convention (gdbarch, sh_use_struct_convention);  set_gdbarch_print_insn (gdbarch, gdb_print_insn_sh);  set_gdbarch_register_sim_regno (gdbarch, legacy_register_sim_regno);  set_gdbarch_write_pc (gdbarch, generic_target_write_pc);  set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);  set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);  set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);  set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);  set_gdbarch_inner_than (gdbarch, core_addr_lessthan);  set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);  set_gdbarch_believe_pcc_promotion (gdbarch, 1);  set_gdbarch_frame_align (gdbarch, sh_frame_align);  set_gdbarch_unwind_sp (gdbarch, sh_unwind_sp);  set_gdbarch_unwind_pc (gdbarch, sh_unwind_pc);  set_gdbarch_unwind_dummy_id (gdbarch, sh_unwind_dummy_id);  frame_base_set_default (gdbarch, &sh_frame_base);  set_gdbarch_in_function_epilogue_p (gdbarch, sh_in_function_epilogue_p);  switch (info.bfd_arch_info->mach)    {    case bfd_mach_sh:      set_gdbarch_register_name (gdbarch, sh_sh_register_name);      break;    case bfd_mach_sh2:      set_gdbarch_register_name (gdbarch, sh_sh_register_name);      break;    case bfd_mach_sh2e:      /* doubles on sh2e and sh3e are actually 4 byte. */      set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);      set_gdbarch_register_name (gdbarch, sh_sh2e_register_name);      set_gdbarch_register_type (gdbarch, sh_sh3e_register_type);      set_gdbarch_fp0_regnum (gdbarch, 25);      set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);      set_gdbarch_extract_return_value (gdbarch,					sh3e_sh4_extract_return_value);      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu);      break;    case bfd_mach_sh_dsp:      set_gdbarch_register_name (gdbarch, sh_sh_dsp_register_name);      set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);      break;    case bfd_mach_sh3:      set_gdbarch_register_name (gdbarch, sh_sh3_register_name);      break;    case bfd_mach_sh3e:      /* doubles on sh2e and sh3e are actually 4 byte. */      set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);      set_gdbarch_register_name (gdbarch, sh_sh3e_register_name);      set_gdbarch_register_type (gdbarch, sh_sh3e_register_type);      set_gdbarch_fp0_regnum (gdbarch, 25);      set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);      set_gdbarch_extract_return_value (gdbarch,					sh3e_sh4_extract_return_value);      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu);      break;    case bfd_mach_sh3_dsp:      set_gdbarch_register_name (gdbarch, sh_sh3_dsp_register_name);      set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);      break;    case bfd_mach_sh4:    case bfd_mach_sh4a:      set_gdbarch_register_name (gdbarch, sh_sh4_register_name);      set_gdbarch_register_type (gdbarch, sh_sh4_register_type);      set_gdbarch_fp0_regnum (gdbarch, 25);      set_gdbarch_num_pseudo_regs (gdbarch, 12);      set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read);      set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write);      set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);      set_gdbarch_extract_return_value (gdbarch,					sh3e_sh4_extract_return_value);      set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu);      break;    case bfd_mach_sh4_nofpu:    case bfd_mach_sh4a_nofpu:      set_gdbarch_register_name (gdbarch, sh_sh4_nofpu_register_name);      break;    case bfd_mach_sh4al_dsp:      set_gdbarch_register_name (gdbarch, sh_sh4al_dsp_register_name);      set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);      break;    default:      set_gdbarch_register_name (gdbarch, sh_sh_register_name);      break;    }  /* Hook in ABI-specific overrides, if they have been registered.  */  gdbarch_init_osabi (info, gdbarch);  frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);  frame_unwind_append_sniffer (gdbarch, sh_frame_sniffer);  return gdbarch;}