Mercurial > hg > CbC > CbC_gcc
diff gcc/config/spu/spu.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line diff
--- a/gcc/config/spu/spu.c Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/config/spu/spu.c Thu Oct 25 07:37:49 2018 +0900 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2017 Free Software Foundation, Inc. +/* Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -14,6 +14,8 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ +#define IN_TARGET_CODE 1 + #include "config.h" #include "system.h" #include "coretypes.h" @@ -56,6 +58,8 @@ #include "dumpfile.h" #include "builtins.h" #include "rtl-iter.h" +#include "flags.h" +#include "toplev.h" /* This file should be included last. */ #include "target-def.h" @@ -236,8 +240,9 @@ flag_omit_frame_pointer = 1; /* Functions must be 8 byte aligned so we correctly handle dual issue */ - if (align_functions < 8) - align_functions = 8; + parse_alignment_opts (); + if (align_functions.levels[0].get_value () < 8) + str_align_functions = "8"; spu_hint_dist = 8*4 - spu_max_nops*4; if (spu_hint_dist < 0) @@ -1903,8 +1908,6 @@ spu_const (machine_mode mode, HOST_WIDE_INT val) { rtx inner; - rtvec v; - int units, i; gcc_assert (GET_MODE_CLASS (mode) == MODE_INT || GET_MODE_CLASS (mode) == MODE_FLOAT @@ -1923,14 +1926,7 @@ else inner = hwint_to_const_double (GET_MODE_INNER (mode), val); - units = GET_MODE_NUNITS (mode); - - v = rtvec_alloc (units); - - for (i = 0; i < units; ++i) - RTVEC_ELT (v, i) = inner; - - return gen_rtx_CONST_VECTOR (mode, v); + return gen_const_vec_duplicate (mode, inner); } /* Create a MODE vector constant from 4 ints. */ @@ -2038,8 +2034,9 @@ for (; insn; insn = next_insn) { next_insn = next_active_insn (insn); - if (INSN_CODE (insn) == CODE_FOR_iprefetch - || INSN_CODE (insn) == CODE_FOR_hbr) + if (INSN_P (insn) + && (INSN_CODE (insn) == CODE_FOR_iprefetch + || INSN_CODE (insn) == CODE_FOR_hbr)) { if (hbr_insn) { @@ -2057,7 +2054,7 @@ } hbr_insn = insn; } - if (INSN_CODE (insn) == CODE_FOR_blockage && next_insn) + if (INSN_P (insn) && INSN_CODE (insn) == CODE_FOR_blockage && next_insn) { if (GET_MODE (insn) == TImode) PUT_MODE (next_insn, TImode); @@ -2775,7 +2772,9 @@ spu_sched_init (FILE *file ATTRIBUTE_UNUSED, int verbose ATTRIBUTE_UNUSED, int max_ready ATTRIBUTE_UNUSED) { - if (align_labels > 4 || align_loops > 4 || align_jumps > 4) + if (align_labels.levels[0].get_value () > 4 + || align_loops.levels[0].get_value () > 4 + || align_jumps.levels[0].get_value () > 4) { /* When any block might be at least 8-byte aligned, assume they will all be at least 8-byte aligned to make sure dual issue @@ -7191,7 +7190,7 @@ /* Implement TARGET_TRULY_NOOP_TRUNCATION. */ static bool -spu_truly_noop_truncation (unsigned int outprec, unsigned int inprec) +spu_truly_noop_truncation (poly_uint64 outprec, poly_uint64 inprec) { return inprec <= 32 && outprec <= inprec; } @@ -7223,13 +7222,13 @@ /* Table of machine attributes. */ static const struct attribute_spec spu_attribute_table[] = { - /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler, - affects_type_identity } */ - { "naked", 0, 0, true, false, false, spu_handle_fndecl_attribute, - false }, - { "spu_vector", 0, 0, false, true, false, spu_handle_vector_attribute, - false }, - { NULL, 0, 0, false, false, false, NULL, false } + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, + affects_type_identity, handler, exclude } */ + { "naked", 0, 0, true, false, false, false, + spu_handle_fndecl_attribute, NULL }, + { "spu_vector", 0, 0, false, true, false, false, + spu_handle_vector_attribute, NULL }, + { NULL, 0, 0, false, false, false, false, NULL, NULL } }; /* TARGET overrides. */ @@ -7464,6 +7463,9 @@ #undef TARGET_CONSTANT_ALIGNMENT #define TARGET_CONSTANT_ALIGNMENT spu_constant_alignment +#undef TARGET_HAVE_SPECULATION_SAFE_VALUE +#define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed + struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-spu.h"