Commit b9f12a01 by David Edelsohn Committed by David Edelsohn

default64.h: Include rs6000-cpus.def.

        * config/rs6000/default64.h: Include rs6000-cpus.def.
        (TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).
        (TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.
        * config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7
        and POWER8.
        * config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to
        POWER8.
        * config/rs6000/rs6000.c (rs6000_file_start): Emit .machine
        pseudo-op to specify assembler dialect.

From-SVN: r219854
parent 90190bb3
2015-01-19 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/default64.h: Include rs6000-cpus.def.
(TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).
(TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.
* config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7
and POWER8.
* config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to
POWER8.
* config/rs6000/rs6000.c (rs6000_file_start): Emit .machine
pseudo-op to specify assembler dialect.
2015-01-19 Martin Liska <mliska@suse.cz>
PR ipa/64664
......
......@@ -18,10 +18,14 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#define RS6000_CPU(NAME, CPU, FLAGS)
#include "rs6000-cpus.def"
#undef RS6000_CPU
#if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_64BIT | MASK_LITTLE_ENDIAN)
#define TARGET_DEFAULT (ISA_2_7_MASKS_SERVER | MASK_POWERPC64 | MASK_64BIT | MASK_LITTLE_ENDIAN)
#else
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_64BIT)
#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT)
#endif
......@@ -327,6 +327,12 @@ detect_processor_aix (void)
case 0x4000:
return "power6";
case 0x8000:
return "power7";
case 0x10000:
return "power8";
default:
return "powerpc";
}
......
......@@ -71,11 +71,7 @@ extern int dot_symbols;
#undef PROCESSOR_DEFAULT
#define PROCESSOR_DEFAULT PROCESSOR_POWER7
#undef PROCESSOR_DEFAULT64
#ifdef LINUX64_DEFAULT_ABI_ELFv2
#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8
#else
#define PROCESSOR_DEFAULT64 PROCESSOR_POWER7
#endif
/* We don't need to generate entries in .fixup, except when
-mrelocatable or -mrelocatable-lib is given. */
......
......@@ -5077,6 +5077,28 @@ rs6000_file_start (void)
putc ('\n', file);
}
#ifdef USING_ELFOS_H
if (rs6000_default_cpu == 0 || rs6000_default_cpu[0] == '\0'
|| !global_options_set.x_rs6000_cpu_index)
{
fputs ("\t.machine ", asm_out_file);
if ((TARGET_DEFAULT & OPTION_MASK_DIRECT_MOVE) != 0)
fputs ("power8\n", asm_out_file);
else if ((TARGET_DEFAULT & OPTION_MASK_POPCNTD) != 0)
fputs ("power7\n", asm_out_file);
else if ((TARGET_DEFAULT & OPTION_MASK_CMPB) != 0)
fputs ("power6\n", asm_out_file);
else if ((TARGET_DEFAULT & OPTION_MASK_POPCNTB) != 0)
fputs ("power5\n", asm_out_file);
else if ((TARGET_DEFAULT & OPTION_MASK_MFCRF) != 0)
fputs ("power4\n", asm_out_file);
else if ((TARGET_DEFAULT & OPTION_MASK_POWERPC64) != 0)
fputs ("ppc64\n", asm_out_file);
else
fputs ("ppc\n", asm_out_file);
}
#endif
if (DEFAULT_ABI == ABI_ELFv2)
fprintf (file, "\t.abiversion 2\n");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment