diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-24 09:15:14 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-24 09:15:14 +0000 |
commit | 3a9cd27cdfc06453ef1f8111c1c924054c9dba7d (patch) | |
tree | f94c8dad035aaa03e627bc5d586f5d2818a390c8 /gcc/expr.c | |
parent | d52dacf5c9774bf7f4cdb9bf181d17c866bc7c48 (diff) | |
download | gcc-3a9cd27cdfc06453ef1f8111c1c924054c9dba7d.tar.gz |
2011-05-24 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 174103 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@174106 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index dde55711067..971432c19af 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -8105,7 +8105,10 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, op1 = gen_label_rtx (); jumpifnot_1 (code, treeop0, treeop1, op1, -1); - emit_move_insn (target, const1_rtx); + if (TYPE_PRECISION (type) == 1 && !TYPE_UNSIGNED (type)) + emit_move_insn (target, constm1_rtx); + else + emit_move_insn (target, const1_rtx); emit_label (op1); return target; @@ -10050,7 +10053,8 @@ do_store_flag (sepops ops, rtx target, enum machine_mode mode) if ((code == NE || code == EQ) && TREE_CODE (arg0) == BIT_AND_EXPR && integer_zerop (arg1) - && integer_pow2p (TREE_OPERAND (arg0, 1))) + && integer_pow2p (TREE_OPERAND (arg0, 1)) + && (TYPE_PRECISION (ops->type) != 1 || TYPE_UNSIGNED (ops->type))) { tree type = lang_hooks.types.type_for_mode (mode, unsignedp); return expand_expr (fold_single_bit_test (loc, @@ -10070,7 +10074,9 @@ do_store_flag (sepops ops, rtx target, enum machine_mode mode) /* Try a cstore if possible. */ return emit_store_flag_force (target, code, op0, op1, - operand_mode, unsignedp, 1); + operand_mode, unsignedp, + (TYPE_PRECISION (ops->type) == 1 + && !TYPE_UNSIGNED (ops->type)) ? -1 : 1); } |