diff --git a/contrib/gcc/config/i386/i386.c b/contrib/gcc/config/i386/i386.c index b965e8dc4f7e..feab422cc383 100644 --- a/contrib/gcc/config/i386/i386.c +++ b/contrib/gcc/config/i386/i386.c @@ -13480,6 +13480,9 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n) gcc_assert (n < MAX_386_STACK_LOCALS); + /* Virtual slot is valid only before vregs are instantiated. */ + gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated); + for (s = ix86_stack_locals; s; s = s->next) if (s->mode == mode && s->n == n) return s->rtl; @@ -14570,6 +14573,7 @@ enum ix86_builtins IX86_BUILTIN_VEC_EXT_V4SF, IX86_BUILTIN_VEC_EXT_V4SI, IX86_BUILTIN_VEC_EXT_V8HI, + IX86_BUILTIN_VEC_EXT_V16QI, IX86_BUILTIN_VEC_EXT_V2SI, IX86_BUILTIN_VEC_EXT_V4HI, IX86_BUILTIN_VEC_SET_V8HI, @@ -15542,13 +15546,13 @@ ix86_init_mmx_sse_builtins (void) /* Access to the vec_extract patterns. */ ftype = build_function_type_list (double_type_node, V2DF_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2df", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2df", ftype, IX86_BUILTIN_VEC_EXT_V2DF); ftype = build_function_type_list (long_long_integer_type_node, V2DI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v2di", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v2di", ftype, IX86_BUILTIN_VEC_EXT_V2DI); ftype = build_function_type_list (float_type_node, V4SF_type_node, @@ -15558,12 +15562,12 @@ ix86_init_mmx_sse_builtins (void) ftype = build_function_type_list (intSI_type_node, V4SI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v4si", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v4si", ftype, IX86_BUILTIN_VEC_EXT_V4SI); ftype = build_function_type_list (intHI_type_node, V8HI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_ext_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v8hi", ftype, IX86_BUILTIN_VEC_EXT_V8HI); ftype = build_function_type_list (intHI_type_node, V4HI_type_node, @@ -15576,11 +15580,15 @@ ix86_init_mmx_sse_builtins (void) def_builtin (MASK_MMX, "__builtin_ia32_vec_ext_v2si", ftype, IX86_BUILTIN_VEC_EXT_V2SI); + ftype = build_function_type_list (intQI_type_node, V16QI_type_node, + integer_type_node, NULL_TREE); + def_builtin (MASK_SSE2, "__builtin_ia32_vec_ext_v16qi", ftype, IX86_BUILTIN_VEC_EXT_V16QI); + /* Access to the vec_set patterns. */ ftype = build_function_type_list (V8HI_type_node, V8HI_type_node, intHI_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_SSE, "__builtin_ia32_vec_set_v8hi", + def_builtin (MASK_SSE2, "__builtin_ia32_vec_set_v8hi", ftype, IX86_BUILTIN_VEC_SET_V8HI); ftype = build_function_type_list (V4HI_type_node, V4HI_type_node, @@ -16124,13 +16132,13 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, case IX86_BUILTIN_LDMXCSR: op0 = expand_normal (TREE_VALUE (arglist)); - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_move_insn (target, op0); emit_insn (gen_sse_ldmxcsr (target)); return 0; case IX86_BUILTIN_STMXCSR: - target = assign_386_stack_local (SImode, SLOT_TEMP); + target = assign_386_stack_local (SImode, SLOT_VIRTUAL); emit_insn (gen_sse_stmxcsr (target)); return copy_to_mode_reg (SImode, target); @@ -16492,6 +16500,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED, case IX86_BUILTIN_VEC_EXT_V4SF: case IX86_BUILTIN_VEC_EXT_V4SI: case IX86_BUILTIN_VEC_EXT_V8HI: + case IX86_BUILTIN_VEC_EXT_V16QI: case IX86_BUILTIN_VEC_EXT_V2SI: case IX86_BUILTIN_VEC_EXT_V4HI: return ix86_expand_vec_ext_builtin (arglist, target); diff --git a/contrib/gcc/config/i386/i386.h b/contrib/gcc/config/i386/i386.h index 40f31eda475d..5f1b58f6c187 100644 --- a/contrib/gcc/config/i386/i386.h +++ b/contrib/gcc/config/i386/i386.h @@ -2166,7 +2166,8 @@ enum ix86_entity enum ix86_stack_slot { - SLOT_TEMP = 0, + SLOT_VIRTUAL = 0, + SLOT_TEMP, SLOT_CW_STORED, SLOT_CW_TRUNC, SLOT_CW_FLOOR, diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c index d0c383e20432..7549ec421f07 100644 --- a/contrib/gcc/function.c +++ b/contrib/gcc/function.c @@ -5093,6 +5093,14 @@ thread_prologue_and_epilogue_insns (rtx f ATTRIBUTE_UNUSED) /* Retain a map of the prologue insns. */ record_insns (seq, &prologue); prologue_end = emit_note (NOTE_INSN_PROLOGUE_END); + +#ifndef PROFILE_BEFORE_PROLOGUE + /* Ensure that instructions are not moved into the prologue when + profiling is on. The call to the profiling routine can be + emitted within the live range of a call-clobbered register. */ + if (current_function_profile) + emit_insn (gen_rtx_ASM_INPUT (VOIDmode, "")); +#endif seq = get_insns (); end_sequence (); diff --git a/contrib/gcc/version.c b/contrib/gcc/version.c index 2f7906ee94ff..0da50b1c7b9f 100644 --- a/contrib/gcc/version.c +++ b/contrib/gcc/version.c @@ -9,7 +9,7 @@ in parentheses. You may also wish to include a number indicating the revision of your modified compiler. */ -#define VERSUFFIX "[FreeBSD]" +#define VERSUFFIX " [FreeBSD]" /* This is the location of the online document giving instructions for reporting bugs. If you distribute a modified version of GCC,