diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/darwin.c | 13 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 12 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 15 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 21 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 10 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 2 | ||||
-rw-r--r-- | gcc/config/vms/vms.c | 7 |
7 files changed, 44 insertions, 36 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index bedda1e..d8e5cd9 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -2962,7 +2962,7 @@ darwin_override_options (void) static void darwin_patch_builtin (int fncode) { - tree fn = built_in_decls[fncode]; + tree fn = builtin_decl_explicit (fncode); tree sym; char *newname; @@ -2974,7 +2974,7 @@ darwin_patch_builtin (int fncode) set_user_assembler_name (fn, newname); - fn = implicit_built_in_decls[fncode]; + fn = builtin_decl_implicit (fncode); if (fn) set_user_assembler_name (fn, newname); } @@ -3149,9 +3149,10 @@ darwin_rename_builtins (void) use the faster version. */ if (!flag_unsafe_math_optimizations) { - int dcode = (BUILT_IN_COMPLEX_DIV_MIN - + DCmode - MIN_MODE_COMPLEX_FLOAT); - tree fn = built_in_decls[dcode]; + enum built_in_function dcode + = (enum built_in_function)(BUILT_IN_COMPLEX_DIV_MIN + + DCmode - MIN_MODE_COMPLEX_FLOAT); + tree fn = builtin_decl_explicit (dcode); /* Fortran and c call TARGET_INIT_BUILTINS and TARGET_INIT_LIBFUNCS at different times, so we have to put a call into each to ensure that at least one of them is called @@ -3159,7 +3160,7 @@ darwin_rename_builtins (void) new hook to run after build_common_builtin_nodes runs. */ if (fn) set_user_assembler_name (fn, "___ieee_divdc3"); - fn = implicit_built_in_decls[dcode]; + fn = builtin_decl_implicit (dcode); if (fn) set_user_assembler_name (fn, "___ieee_divdc3"); } diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 490bf4ea..625c55e 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8027,7 +8027,7 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p, else { tree copy - = build_call_expr (implicit_built_in_decls[BUILT_IN_MEMCPY], + = build_call_expr (builtin_decl_implicit (BUILT_IN_MEMCPY), 3, dest_addr, src_addr, size_int (cur_size)); gimplify_and_add (copy, pre_p); @@ -29160,7 +29160,7 @@ ix86_veclibabi_svml (enum built_in_function fn, tree type_out, tree type_in) return NULL_TREE; } - bname = IDENTIFIER_POINTER (DECL_NAME (implicit_built_in_decls[fn])); + bname = IDENTIFIER_POINTER (DECL_NAME (builtin_decl_implicit (fn))); if (fn == BUILT_IN_LOGF) strcpy (name, "vmlsLn4"); @@ -29178,7 +29178,8 @@ ix86_veclibabi_svml (enum built_in_function fn, tree type_out, tree type_in) name[4] &= ~0x20; arity = 0; - for (args = DECL_ARGUMENTS (implicit_built_in_decls[fn]); args; + for (args = DECL_ARGUMENTS (builtin_decl_implicit (fn)); + args; args = TREE_CHAIN (args)) arity++; @@ -29259,11 +29260,12 @@ ix86_veclibabi_acml (enum built_in_function fn, tree type_out, tree type_in) return NULL_TREE; } - bname = IDENTIFIER_POINTER (DECL_NAME (implicit_built_in_decls[fn])); + bname = IDENTIFIER_POINTER (DECL_NAME (builtin_decl_implicit (fn))); sprintf (name + 7, "%s", bname+10); arity = 0; - for (args = DECL_ARGUMENTS (implicit_built_in_decls[fn]); args; + for (args = DECL_ARGUMENTS (builtin_decl_implicit (fn)); + args; args = TREE_CHAIN (args)) arity++; diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index f4fbf08..6d3ac6d 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -10100,15 +10100,12 @@ ia64_init_builtins (void) if (TARGET_HPUX) { - if (built_in_decls [BUILT_IN_FINITE]) - set_user_assembler_name (built_in_decls [BUILT_IN_FINITE], - "_Isfinite"); - if (built_in_decls [BUILT_IN_FINITEF]) - set_user_assembler_name (built_in_decls [BUILT_IN_FINITEF], - "_Isfinitef"); - if (built_in_decls [BUILT_IN_FINITEL]) - set_user_assembler_name (built_in_decls [BUILT_IN_FINITEL], - "_Isfinitef128"); + if ((decl = builtin_decl_explicit (BUILT_IN_FINITE))) != NULL_TREE) + set_user_assembler_name (decl, "_Isfinite"); + if ((decl = builtin_decl_explicit (BUILT_IN_FINITEF))) != NULL_TREE) + set_user_assembler_name (decl, "_Isfinitef"); + if ((decl = builtin_decl_explicit (BUILT_IN_FINITEL))) != NULL_TREE) + set_user_assembler_name (decl, "_Isfinitef128"); } } diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index e3ad4c8..66e3fc7 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -555,16 +555,21 @@ static void pa_init_builtins (void) { #ifdef DONT_HAVE_FPUTC_UNLOCKED - built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] = - built_in_decls[(int) BUILT_IN_PUTC_UNLOCKED]; - implicit_built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED] - = implicit_built_in_decls[(int) BUILT_IN_PUTC_UNLOCKED]; + { + tree decl = builtin_decl_explicit (BUILT_IN_PUTC_UNLOCKED); + set_builtin_decl (BUILT_IN_FPUTC_UNLOCKED, decl, + builtin_decl_implicit_p (BUILT_IN_PUTC_UNLOCKED)); + } #endif #if TARGET_HPUX_11 - if (built_in_decls [BUILT_IN_FINITE]) - set_user_assembler_name (built_in_decls [BUILT_IN_FINITE], "_Isfinite"); - if (built_in_decls [BUILT_IN_FINITEF]) - set_user_assembler_name (built_in_decls [BUILT_IN_FINITEF], "_Isfinitef"); + { + tree decl; + + if ((decl = builtin_decl_explicit (BUILT_IN_FINITE)) != NULL_TREE) + set_user_assembler_name (decl, "_Isfinite"); + if ((decl = builtin_decl_explicit (BUILT_IN_FINITEF)) != NULL_TREE) + set_user_assembler_name (decl, "_Isfinitef"); + } #endif if (HPUX_LONG_DOUBLE_LIBRARY) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 63c0f0c..4fd2192 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3739,7 +3739,7 @@ rs6000_builtin_vectorized_libmass (tree fndecl, tree type_out, tree type_in) case BUILT_IN_SQRT: case BUILT_IN_TAN: case BUILT_IN_TANH: - bdecl = implicit_built_in_decls[fn]; + bdecl = builtin_decl_implicit (fn); suffix = "d2"; /* pow -> powd2 */ if (el_mode != DFmode || n != 2) @@ -3776,7 +3776,7 @@ rs6000_builtin_vectorized_libmass (tree fndecl, tree type_out, tree type_in) case BUILT_IN_SQRTF: case BUILT_IN_TANF: case BUILT_IN_TANHF: - bdecl = implicit_built_in_decls[fn]; + bdecl = builtin_decl_implicit (fn); suffix = "4"; /* powf -> powf4 */ if (el_mode != SFmode || n != 4) @@ -9400,7 +9400,7 @@ rs6000_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p, tree tmp = create_tmp_var (type, "va_arg_tmp"); tree dest_addr = build_fold_addr_expr (tmp); - tree copy = build_call_expr (implicit_built_in_decls[BUILT_IN_MEMCPY], + tree copy = build_call_expr (builtin_decl_implicit (BUILT_IN_MEMCPY), 3, dest_addr, addr, size_int (rsize * 4)); gimplify_and_add (copy, pre_p); @@ -12213,8 +12213,8 @@ rs6000_init_builtins (void) #if TARGET_XCOFF /* AIX libm provides clog as __clog. */ - if (built_in_decls [BUILT_IN_CLOG]) - set_user_assembler_name (built_in_decls [BUILT_IN_CLOG], "__clog"); + if ((tdecl = builtin_decl_explicit ([BUILT_IN_CLOG))) != NULL_TREE) + set_user_assembler_name (tdecl, "__clog"); #endif #ifdef SUBTARGET_INIT_BUILTINS diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 9606f68..9c7cc56 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -6789,7 +6789,7 @@ sparc_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p, { tree tmp = create_tmp_var (type, "va_arg_tmp"); tree dest_addr = build_fold_addr_expr (tmp); - tree copy = build_call_expr (implicit_built_in_decls[BUILT_IN_MEMCPY], + tree copy = build_call_expr (builtin_decl_implicit (BUILT_IN_MEMCPY), 3, dest_addr, addr, size_int (rsize)); TREE_ADDRESSABLE (tmp) = 1; gimplify_and_add (copy, pre_p); diff --git a/gcc/config/vms/vms.c b/gcc/config/vms/vms.c index 62a1661..44940a3 100644 --- a/gcc/config/vms/vms.c +++ b/gcc/config/vms/vms.c @@ -99,8 +99,11 @@ vms_patch_builtins (void) unsigned int i; /* Fwrite on VMS is non-standard. */ - implicit_built_in_decls[(int) BUILT_IN_FWRITE] = NULL_TREE; - implicit_built_in_decls[(int) BUILT_IN_FWRITE_UNLOCKED] = NULL_TREE; + if (builtin_decl_implicit_p (BUILT_IN_WRITE)) + set_builtin_decl_implicit_p (BUILT_IN_WRITE, false); + + if (builtin_decl_implicit_p (BUILT_IN_WRITE_UNLOCKED)) + set_builtin_decl_implicit_p (BUILT_IN_WRITE_UNLOCKED, false); /* Define aliases for names. */ for (i = 0; i < NBR_CRTL_NAMES; i++) |