FreeBSD/contrib/binutils/gas/config/tc-i386.c
/* Pick the target format to use.  */
Pick the target format to use.
Pick the target format to use .
const char *
i386_target_format (void)
{
  if (!strcmp (default_arch, "x86_64"))
    {
      set_code_flag (CODE_64BIT);
      if (cpu_arch_isa_flags == 0)
	cpu_arch_isa_flags = Cpu186|Cpu286|Cpu386|Cpu486
			     |Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2
			     |CpuSSE|CpuSSE2;
      if (cpu_arch_tune_flags == 0)
	cpu_arch_tune_flags = Cpu186|Cpu286|Cpu386|Cpu486
			      |Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2
			      |CpuSSE|CpuSSE2;
    }
  else if (!strcmp (default_arch, "i386"))
    {
      set_code_flag (CODE_32BIT);
      if (cpu_arch_isa_flags == 0)
	cpu_arch_isa_flags = Cpu186|Cpu286|Cpu386;
      if (cpu_arch_tune_flags == 0)
	cpu_arch_tune_flags = Cpu186|Cpu286|Cpu386;
    }
  else
    as_fatal (_("Unknown architecture"));
  switch (OUTPUT_FLAVOR)
    {
#ifdef OBJ_MAYBE_AOUT
    case bfd_target_aout_flavour:
      return AOUT_TARGET_FORMAT;
#endif
#ifdef OBJ_MAYBE_COFF
    case bfd_target_coff_flavour:
      return "coff-i386";
#endif
#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
    case bfd_target_elf_flavour:
      {
	if (flag_code == CODE_64BIT)
	  {
	    object_64bit = 1;
	    use_rela_relocations = 1;
	  }
	return flag_code == CODE_64BIT ? ELF_TARGET_FORMAT64 : ELF_TARGET_FORMAT;
      }
#endif
    default:
      abort ();
      return NULL;
    }
}
const char * i386_target_format ( void ) { if ( ! strcmp ( default_arch , " " ) ) { set_code_flag ( CODE_64BIT ) ; if ( cpu_arch_isa_flags == 0 ) cpu_arch_isa_flags = Cpu186 | Cpu286 | Cpu386 | Cpu486 | Cpu586 | Cpu686 | CpuP4 | CpuMMX | CpuMMX2 | CpuSSE | CpuSSE2 ; if ( cpu_arch_tune_flags == 0 ) cpu_arch_tune_flags = Cpu186 | Cpu286 | Cpu386 | Cpu486 | Cpu586 | Cpu686 | CpuP4 | CpuMMX | CpuMMX2 | CpuSSE | CpuSSE2 ; } else if ( ! strcmp ( default_arch , " " ) ) { set_code_flag ( CODE_32BIT ) ; if ( cpu_arch_isa_flags == 0 ) cpu_arch_isa_flags = Cpu186 | Cpu286 | Cpu386 ; if ( cpu_arch_tune_flags == 0 ) cpu_arch_tune_flags = Cpu186 | Cpu286 | Cpu386 ; } else as_fatal ( _ ( " " ) ) ; switch ( OUTPUT_FLAVOR ) { #ifdef OBJ_MAYBE_AOUT case bfd_target_aout_flavour : return AOUT_TARGET_FORMAT ; #endif #ifdef OBJ_MAYBE_COFF case bfd_target_coff_flavour : return " " ; #endif #if defined ( OBJ_MAYBE_ELF ) || defined ( OBJ_ELF ) case bfd_target_elf_flavour : { if ( flag_code == CODE_64BIT ) { object_64bit = 1 ; use_rela_relocations = 1 ; } return flag_code == CODE_64BIT ? ELF_TARGET_FORMAT64 : ELF_TARGET_FORMAT ; } #endif default : abort ( ) ; return NULL ; } }
Pick the target format to use.
Pick the target format to use .