Mercurial > hg > CbC > CbC_gcc
diff gcc/config/spu/spu-c.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | f6334be47118 |
children | 84e7813d76e9 |
line wrap: on
line diff
--- a/gcc/config/spu/spu-c.c Sun Aug 21 07:07:55 2011 +0900 +++ b/gcc/config/spu/spu-c.c Fri Oct 27 22:46:09 2017 +0900 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 2006-2017 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 @@ -17,14 +17,10 @@ #include "config.h" #include "system.h" #include "coretypes.h" -#include "tm.h" -#include "cpplib.h" -#include "tree.h" +#include "target.h" #include "c-family/c-common.h" -#include "c-family/c-pragma.h" -#include "tm_p.h" +#include "stringpool.h" #include "langhooks.h" -#include "target.h" /* Keep the vector keywords handy for fast comparisons. */ @@ -93,8 +89,8 @@ #define SCALAR_TYPE_P(t) (INTEGRAL_TYPE_P (t) \ || SCALAR_FLOAT_TYPE_P (t) \ || POINTER_TYPE_P (t)) - VEC(tree,gc) *fnargs = (VEC(tree,gc) *) passed_args; - unsigned int nargs = VEC_length (tree, fnargs); + vec<tree, va_gc> *fnargs = static_cast <vec<tree, va_gc> *> (passed_args); + unsigned int nargs = vec_safe_length (fnargs); int new_fcode, fcode = DECL_FUNCTION_CODE (fndecl); struct spu_builtin_description *desc; tree match = NULL_TREE; @@ -137,7 +133,7 @@ return error_mark_node; } - var = VEC_index (tree, fnargs, p); + var = (*fnargs)[p]; if (TREE_CODE (var) == NON_LVALUE_EXPR) var = TREE_OPERAND (var, 0); @@ -180,7 +176,7 @@ return error_mark_node; } - return build_function_call_vec (loc, match, fnargs, NULL); + return build_function_call_vec (loc, vNULL, match, fnargs, NULL); #undef SCALAR_TYPE_P } @@ -193,7 +189,8 @@ cpp_assert (pfile, "machine=spu"); if (spu_arch == PROCESSOR_CELLEDP) cpp_define (pfile, "__SPU_EDP__"); - cpp_define (pfile, "__vector=__attribute__((__spu_vector__))"); + if (cpp_get_options (pfile)->lang != CLK_ASM) + cpp_define (pfile, "__vector=__attribute__((__spu_vector__))"); switch (spu_ea_model) { case 32: @@ -206,7 +203,7 @@ gcc_unreachable (); } - if (!flag_iso) + if (!flag_iso && cpp_get_options (pfile)->lang != CLK_ASM) { /* Define this when supporting context-sensitive keywords. */ cpp_define (pfile, "__VECTOR_KEYWORD_SUPPORTED__");