+2002-03-19 David Edelsohn <edelsohn@gnu.org>
+
+ * expr.c (expand_expr): Sign-extend CONST_INT generated from
+ TREE_STRING_POINTER.
+
Tue Mar 19 14:12:32 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* config/sparc/sparc.h (CAN_ELMINIATE): Can only eliminate FP
&& GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) == 1
&& modifier != EXPAND_WRITE)
- return
- GEN_INT (TREE_STRING_POINTER (string)[TREE_INT_CST_LOW (index)]);
+ return gen_int_mode (TREE_STRING_POINTER (string)
+ [TREE_INT_CST_LOW (index)], mode);
op0 = expand_expr (exp1, NULL_RTX, VOIDmode, EXPAND_SUM);
op0 = memory_address (mode, op0);
&& compare_tree_int (index, TREE_STRING_LENGTH (array)) < 0
&& GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) == 1)
- return
- GEN_INT (TREE_STRING_POINTER (array)[TREE_INT_CST_LOW (index)]);
+ return gen_int_mode (TREE_STRING_POINTER (array)
+ [TREE_INT_CST_LOW (index)], mode);
/* If this is a constant index into a constant array,
just get the value from the array. Handle both the cases when
if (GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) == 1)
- return (GEN_INT
- (TREE_STRING_POINTER
- (init)[TREE_INT_CST_LOW (index)]));
+ return gen_int_mode (TREE_STRING_POINTER (init)
+ [TREE_INT_CST_LOW (index)], mode);
}
}
}