summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-20 13:22:49 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-20 13:22:49 +0000
commit1a8bf94d3197b82fc41436b2a3043f339536f603 (patch)
tree4d66b707d35b8c679d14f070a4cc42b15a95d2a8 /gcc/expr.c
parent5cc6d735d73e4810078b05e651751ba7b84539be (diff)
downloadgcc-1a8bf94d3197b82fc41436b2a3043f339536f603.tar.gz
2008-03-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r133366 * gcc/basilys.c: pass_basilys is now a gimple_opt_pass. * gcc/tree-pass.h: pass_basilys is now a gimple_opt_pass. pass_compiler_probe now declared here. * gcc/passes.c: using new struct-s for passes. * gcc/compiler-probe.h: moved pass_compiler_probe from here to tree-pass.h * gcc/compiler-probe.c: pass_compiler_probe is a gimple_opt_pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133372 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 3294f1a23e0..7e1a0ffa85b 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4484,9 +4484,8 @@ store_expr (tree exp, rtx target, int call_param_p, bool nontemporal)
converting modes. */
if (INTEGRAL_TYPE_P (TREE_TYPE (exp))
&& TREE_TYPE (TREE_TYPE (exp)) == 0
- && (!lang_hooks.reduce_bit_field_operations
- || (GET_MODE_PRECISION (GET_MODE (target))
- == TYPE_PRECISION (TREE_TYPE (exp)))))
+ && GET_MODE_PRECISION (GET_MODE (target))
+ == TYPE_PRECISION (TREE_TYPE (exp)))
{
if (TYPE_UNSIGNED (TREE_TYPE (exp))
!= SUBREG_PROMOTED_UNSIGNED_P (target))
@@ -7055,6 +7054,7 @@ expand_expr_real (tree exp, rtx target, enum machine_mode tmode,
/* Handle ERROR_MARK before anybody tries to access its type. */
if (TREE_CODE (exp) == ERROR_MARK
+ || TREE_CODE (exp) == PREDICT_EXPR
|| (!GIMPLE_TUPLE_P (exp) && TREE_CODE (TREE_TYPE (exp)) == ERROR_MARK))
{
ret = CONST0_RTX (tmode);
@@ -7133,8 +7133,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
rtx subtarget, original_target;
int ignore;
tree context, subexp0, subexp1;
- bool reduce_bit_field = false;
-#define REDUCE_BIT_FIELD(expr) (reduce_bit_field && !ignore \
+ bool reduce_bit_field;
+#define REDUCE_BIT_FIELD(expr) (reduce_bit_field \
? reduce_to_bit_field_precision ((expr), \
target, \
type) \
@@ -7152,27 +7152,20 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
mode = TYPE_MODE (type);
unsignedp = TYPE_UNSIGNED (type);
}
- if (lang_hooks.reduce_bit_field_operations
- && TREE_CODE (type) == INTEGER_TYPE
- && GET_MODE_PRECISION (mode) > TYPE_PRECISION (type))
- {
- /* An operation in what may be a bit-field type needs the
- result to be reduced to the precision of the bit-field type,
- which is narrower than that of the type's mode. */
- reduce_bit_field = true;
- if (modifier == EXPAND_STACK_PARM)
- target = 0;
- }
- /* Use subtarget as the target for operand 0 of a binary operation. */
- subtarget = get_subtarget (target);
- original_target = target;
ignore = (target == const0_rtx
|| ((code == NON_LVALUE_EXPR || code == NOP_EXPR
|| code == CONVERT_EXPR || code == COND_EXPR
|| code == VIEW_CONVERT_EXPR)
&& TREE_CODE (type) == VOID_TYPE));
+ /* An operation in what may be a bit-field type needs the
+ result to be reduced to the precision of the bit-field type,
+ which is narrower than that of the type's mode. */
+ reduce_bit_field = (!ignore
+ && TREE_CODE (type) == INTEGER_TYPE
+ && GET_MODE_PRECISION (mode) > TYPE_PRECISION (type));
+
/* If we are going to ignore this result, we need only do something
if there is a side-effect somewhere in the expression. If there
is, short-circuit the most common cases here. Note that we must
@@ -7221,6 +7214,12 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
target = 0;
}
+ if (reduce_bit_field && modifier == EXPAND_STACK_PARM)
+ target = 0;
+
+ /* Use subtarget as the target for operand 0 of a binary operation. */
+ subtarget = get_subtarget (target);
+ original_target = target;
switch (code)
{