r112927 - in /trunk/gcc: ChangeLog fold-const.c...

sayle@gcc.gnu.org sayle@gcc.gnu.org
Thu Apr 13 21:10:00 GMT 2006


Author: sayle
Date: Thu Apr 13 21:10:31 2006
New Revision: 112927

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112927
Log:

	* fold-const.c (native_encode_expr): New function to encode
	the target representation of an INTEGER_CST, REAL_CST, COMPLEX_CST
	or VECTOR_CST into a specified buffer.
	(native_encode_int): New function.
	(native_encode_real): New function.
	(native_encode_complex): New function.
	(native_encode_vector): New function.
	(native_interpret_expr): Inverse of native_encode_expr to convert
	a target representation into an INTEGER_CST, REAL_CST etc...
	(native_interpret_int): New function.
	(native_interpret_real): New function.
	(native_interpret_complex): New function.
	(native_interpret_vector): New function.
	(fold_view_convert_expr): New function to constant fold/evaluate
	a VIEW_CONVERT_EXPR of a suitable constant expression.
	(fold_unary) <VIEW_CONVERT_EXPR>: Call fold_view_convert_expr.
	Change call of build1 to fold_build1 when constructing a
	VIEW_CONVERT_EXPR.

	* gcc.target/i386/20050113-1.c: Tweak testcase to reflect that casts
	of integers to a vector types are now constant expressions in C.
	* gcc.dg/vect/vect-fold-1.c: New test case.


Added:
    trunk/gcc/testsuite/gcc.dg/vect/vect-fold-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/20050113-1.c



More information about the Gcc-cvs mailing list