i386-builtin-types.def: Add USHORT_FTYPE_VOID.

* config/i386/i386-builtin-types.def: Add USHORT_FTYPE_VOID.
	Remove VOID_FTYPE_PUSHORT.
	* config/i386/i386.c (bdesc_special_args) <__builtin_ia32_fnstsw>:
	Change code to USHORT_FTYPE_VOID.
	(ix86_expand_special_args_builtin): Handle USHORT_FTYPE_VOID.
	(ix86_expand_builtin): Remove IX86_BUILTIN_FNSTSW handling.
	(ix86_atomic_assign_expand_fenv): Update for
	__builtin_ia32_fnstsw changes.
	* config/i386/i386.md (x86_fnstsw_1): Set length unconditionally to 2.
	(fnstsw): Change operand 0 to nonimmediate operand.

From-SVN: r212478
This commit is contained in:
Uros Bizjak 2014-07-12 11:09:51 +02:00
parent c35146e77f
commit e0770e2ace
4 changed files with 34 additions and 31 deletions

View File

@ -1,3 +1,16 @@
2014-07-12 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386-builtin-types.def: Add USHORT_FTYPE_VOID.
Remove VOID_FTYPE_PUSHORT.
* config/i386/i386.c (bdesc_special_args) <__builtin_ia32_fnstsw>:
Change code to USHORT_FTYPE_VOID.
(ix86_expand_special_args_builtin): Handle USHORT_FTYPE_VOID.
(ix86_expand_builtin): Remove IX86_BUILTIN_FNSTSW handling.
(ix86_atomic_assign_expand_fenv): Update for
__builtin_ia32_fnstsw changes.
* config/i386/i386.md (x86_fnstsw_1): Set length unconditionally to 2.
(fnstsw): Change operand 0 to nonimmediate operand.
2014-07-11 Jan Hubicka <hubicka@ucw.cz>
* vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h
@ -14,7 +27,7 @@
(varpool_ctor_useable_for_folding_p): New function.
* lto-streamer-out.c (get_symbol_initial_value): Take encoder
parameter; return error_mark_node for non-trivial constructors.
(lto_write_tree_1, DFS_write_tree): UPdate use of
(lto_write_tree_1, DFS_write_tree): Update use of
get_symbol_initial_value.
(output_function): Update initialization of symbol.
(output_constructor): New function.
@ -23,8 +36,7 @@
(lto_output): Output variable sections.
* lto-streamer-in.c (input_constructor): New function.
(lto_read_body): Rename from ...
(lto_read_body_or_constructor): ... this one; handle vars
too.
(lto_read_body_or_constructor): ... this one; handle vars too.
(lto_input_variable_constructor): New function.
* ipa-prop.c (ipa_prop_write_jump_functions,
ipa_prop_write_all_agg_replacement): Update.
@ -59,13 +71,12 @@
(ata5831): Same.
* config/avr/avr-tables.opt: Regenerate.
* config/avr/avr.h: Add declaration for text section start handler.
(EXTRA_SPEC_FUNCTIONS): Add text section start handler to SPEC function=
s.
(EXTRA_SPEC_FUNCTIONS): Add text section start handler to
SPEC functions.
(LINK_SPEC): Include text section start handler to linker spec.
* config/avr/driver-avr.c (avr_device_to_text_start): New function to
pass -Ttext option to linker if the text section start for the device i=
s
not zero.
pass -Ttext option to linker if the text section start for the device
is not zero.
* config/avr/t-multilib: Regenerate.
* doc/avr-mmcu.texi: Regenerate.
@ -79,8 +90,7 @@ s
2014-07-11 Roman Gareev <gareevroman@gmail.com>
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree):
New function.
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): New function.
(graphite_verify): New function.
(ivs_params_clear): New function.
(gcc_expression_from_isl_ast_expr_id): New function.
@ -109,9 +119,8 @@ s
2014-07-11 Richard Biener <rguenther@suse.de>
PR middle-end/61473
* builtins.c (fold_builtin_memory_op): Inline memory moves
that can be implemented with a single load followed by a
single store.
* builtins.c (fold_builtin_memory_op): Inline memory moves that
can be implemented with a single load followed by a single store.
(c_strlen): Only warn when only_value is not 2.
2014-07-11 Evgeny Stupachenko <evstupac@gmail.com>
@ -123,7 +132,7 @@ s
PR target/61561
* config/arm/arm.md (*movhi_insn_arch4): Handle stack pointer.
(*movhi_bytes): Likewise.
(*arm_movqi_insn): Likewise.
(*arm_movqi_insn): Likewise.
2014-07-11 Uros Bizjak <ubizjak@gmail.com>

View File

@ -162,6 +162,7 @@ DEF_POINTER_TYPE (PCV16SI, V16SI, CONST)
DEF_FUNCTION_TYPE (FLOAT128)
DEF_FUNCTION_TYPE (UINT64)
DEF_FUNCTION_TYPE (UNSIGNED)
DEF_FUNCTION_TYPE (USHORT)
DEF_FUNCTION_TYPE (INT)
DEF_FUNCTION_TYPE (VOID)
DEF_FUNCTION_TYPE (PVOID)
@ -256,7 +257,6 @@ DEF_FUNCTION_TYPE (VOID, PCVOID)
DEF_FUNCTION_TYPE (VOID, PVOID)
DEF_FUNCTION_TYPE (VOID, UINT64)
DEF_FUNCTION_TYPE (VOID, UNSIGNED)
DEF_FUNCTION_TYPE (VOID, PUSHORT)
DEF_FUNCTION_TYPE (INT, PUSHORT)
DEF_FUNCTION_TYPE (INT, PUNSIGNED)
DEF_FUNCTION_TYPE (INT, PULONGLONG)

View File

@ -28994,7 +28994,7 @@ static const struct builtin_description bdesc_special_args[] =
/* 80387 (for use internally for atomic compound assignment). */
{ 0, CODE_FOR_fnstenv, "__builtin_ia32_fnstenv", IX86_BUILTIN_FNSTENV, UNKNOWN, (int) VOID_FTYPE_PVOID },
{ 0, CODE_FOR_fldenv, "__builtin_ia32_fldenv", IX86_BUILTIN_FLDENV, UNKNOWN, (int) VOID_FTYPE_PCVOID },
{ 0, CODE_FOR_fnstsw, "__builtin_ia32_fnstsw", IX86_BUILTIN_FNSTSW, UNKNOWN, (int) VOID_FTYPE_PUSHORT },
{ 0, CODE_FOR_fnstsw, "__builtin_ia32_fnstsw", IX86_BUILTIN_FNSTSW, UNKNOWN, (int) USHORT_FTYPE_VOID },
{ 0, CODE_FOR_fnclex, "__builtin_ia32_fnclex", IX86_BUILTIN_FNCLEX, UNKNOWN, (int) VOID_FTYPE_VOID },
/* MMX */
@ -34598,6 +34598,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
break;
case INT_FTYPE_VOID:
case USHORT_FTYPE_VOID:
case UINT64_FTYPE_VOID:
case UNSIGNED_FTYPE_VOID:
nargs = 0;
@ -35283,7 +35284,6 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
case IX86_BUILTIN_FXRSTOR64:
case IX86_BUILTIN_FNSTENV:
case IX86_BUILTIN_FLDENV:
case IX86_BUILTIN_FNSTSW:
mode0 = BLKmode;
switch (fcode)
{
@ -35305,10 +35305,6 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
case IX86_BUILTIN_FLDENV:
icode = CODE_FOR_fldenv;
break;
case IX86_BUILTIN_FNSTSW:
icode = CODE_FOR_fnstsw;
mode0 = HImode;
break;
default:
gcc_unreachable ();
}
@ -46894,15 +46890,14 @@ ix86_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
hold_fnclex);
*clear = build_call_expr (fnclex, 0);
tree sw_var = create_tmp_var (short_unsigned_type_node, NULL);
mark_addressable (sw_var);
tree su_ptr = build_pointer_type (short_unsigned_type_node);
tree sw_addr = build1 (ADDR_EXPR, su_ptr, sw_var);
tree fnstsw_call = build_call_expr (fnstsw, 1, sw_addr);
tree fnstsw_call = build_call_expr (fnstsw, 0);
tree sw_mod = build2 (MODIFY_EXPR, short_unsigned_type_node,
sw_var, fnstsw_call);
tree exceptions_x87 = fold_convert (integer_type_node, sw_var);
tree update_mod = build2 (MODIFY_EXPR, integer_type_node,
exceptions_var, exceptions_x87);
*update = build2 (COMPOUND_EXPR, integer_type_node,
fnstsw_call, update_mod);
sw_mod, update_mod);
tree update_fldenv = build_call_expr (fldenv, 1, fenv_addr);
*update = build2 (COMPOUND_EXPR, void_type_node, *update, update_fldenv);
}

View File

@ -1532,8 +1532,7 @@
(unspec:HI [(reg:CCFP FPSR_REG)] UNSPEC_FNSTSW))]
"TARGET_80387"
"fnstsw\t%0"
[(set (attr "length")
(symbol_ref "ix86_attr_length_address_default (insn) + 2"))
[(set_attr "length" "2")
(set_attr "mode" "SI")
(set_attr "unit" "i387")])
@ -18114,12 +18113,12 @@
(symbol_ref "ix86_attr_length_address_default (insn) + 2"))])
(define_insn "fnstsw"
[(set (match_operand:HI 0 "memory_operand" "=m")
[(set (match_operand:HI 0 "nonimmediate_operand" "=a,m")
(unspec_volatile:HI [(const_int 0)] UNSPECV_FNSTSW))]
"TARGET_80387"
"fnstsw\t%0"
[(set_attr "type" "other")
(set_attr "memory" "store")
[(set_attr "type" "other,other")
(set_attr "memory" "none,store")
(set (attr "length")
(symbol_ref "ix86_attr_length_address_default (insn) + 2"))])