This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Another unrelated SSE patch
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: Another unrelated SSE patch
- From: Richard Henderson <rth at redhat dot com>
- Date: Thu, 22 Feb 2001 14:46:55 -0800
- Cc: bernds at redhat dot com, gcc at gcc dot gnu dot org
- References: <20010221211347.Q8978@atrey.karlin.mff.cuni.cz>
On Wed, Feb 21, 2001 at 09:13:47PM +0100, Jan Hubicka wrote:
> /* Value should be nonzero if EXP is okay for MAX_INTEGER_COMPUTATION_MODE */
> #define MAX_INTEGER_COMPUTATION_OK(exp) \
> (TARGET_SSE && \
> (TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == RTL_EXPR))
>
> Can someone please contribute the relevant bits in expr.c?
Here's the raw bits.
r~
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expr.c,v
retrieving revision 1.295
diff -c -p -d -r1.295 expr.c
*** expr.c 2001/02/04 22:43:59 1.295
--- expr.c 2001/02/22 22:17:31
*************** Boston, MA 02111-1307, USA. */
*** 57,62 ****
--- 57,69 ----
#endif
#endif
+ /* Supply a default definition for MAX_INTEGER_COMPUTATION_OK.
+ Return true if TREE is ok even if it is a mode larger than
+ MAX_INTEGER_COMPUTATION_MODE. */
+ #ifndef MAX_INTEGER_COMPUTATION_OK
+ #define MAX_INTEGER_COMPUTATION_OK(TREE) 0
+ #endif
+
/* Decide whether a function's arguments should be processed
from first to last or from last to first.
*************** check_max_integer_computation_mode (exp)
*** 5856,5861 ****
--- 5863,5869 ----
{
mode = TYPE_MODE (TREE_TYPE (exp));
if (GET_MODE_CLASS (mode) == MODE_INT
+ && ! MAX_INTEGER_COMPUTATION_OK (exp)
&& mode > MAX_INTEGER_COMPUTATION_MODE)
internal_error ("unsupported wide integer operation");
}
*************** check_max_integer_computation_mode (exp)
*** 5865,5870 ****
--- 5873,5879 ----
{
mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)));
if (GET_MODE_CLASS (mode) == MODE_INT
+ && ! MAX_INTEGER_COMPUTATION_OK (TREE_OPERAND (exp, 0))
&& mode > MAX_INTEGER_COMPUTATION_MODE)
internal_error ("unsupported wide integer operation");
}
*************** check_max_integer_computation_mode (exp)
*** 5874,5884 ****
--- 5883,5895 ----
{
mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 0)));
if (GET_MODE_CLASS (mode) == MODE_INT
+ && ! MAX_INTEGER_COMPUTATION_OK (TREE_OPERAND (exp, 0))
&& mode > MAX_INTEGER_COMPUTATION_MODE)
internal_error ("unsupported wide integer operation");
mode = TYPE_MODE (TREE_TYPE (TREE_OPERAND (exp, 1)));
if (GET_MODE_CLASS (mode) == MODE_INT
+ && ! MAX_INTEGER_COMPUTATION_OK (TREE_OPERAND (exp, 1))
&& mode > MAX_INTEGER_COMPUTATION_MODE)
internal_error ("unsupported wide integer operation");
}
*************** expand_expr (exp, target, tmode, modifie
*** 6037,6042 ****
--- 6048,6054 ----
enum machine_mode mode = GET_MODE (target);
if (GET_MODE_CLASS (mode) == MODE_INT
+ && ! MAX_INTEGER_COMPUTATION_OK (exp)
&& mode > MAX_INTEGER_COMPUTATION_MODE)
internal_error ("unsupported wide integer operation");
}
*************** expand_expr (exp, target, tmode, modifie
*** 6052,6057 ****
--- 6064,6070 ----
&& TREE_CODE (exp) != CALL_EXPR
&& TREE_CODE (exp) != RTL_EXPR
&& GET_MODE_CLASS (tmode) == MODE_INT
+ && ! MAX_INTEGER_COMPUTATION_OK (exp)
&& tmode > MAX_INTEGER_COMPUTATION_MODE)
internal_error ("unsupported wide integer operation");