aboutsummaryrefslogtreecommitdiff
path: root/flow.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-13 12:00:29 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:06:07 -0700
commit6278edfccdbb3b6a0bbe9f066991e28564ea0884 (patch)
treed1f3c4fe4125a8899eb74c16e4b289b08c25cb04 /flow.c
parentMake sure to mark all registers that have already been allocated (diff)
downloadsparse-6278edfccdbb3b6a0bbe9f066991e28564ea0884.tar.gz
sparse-6278edfccdbb3b6a0bbe9f066991e28564ea0884.tar.bz2
sparse-6278edfccdbb3b6a0bbe9f066991e28564ea0884.zip
Split OP_SETVAL into OP_SETVAL (fp expressions and labels) and OP_SYMADDR
(symbol addresses). They are pretty different. Symbol addresses have special meaning during various phases, from symbol simplification to CSE.
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/flow.c b/flow.c
index c523efc..9d2f0fb 100644
--- a/flow.c
+++ b/flow.c
@@ -53,15 +53,10 @@ static int pseudo_truth_value(pseudo_t pseudo)
case PSEUDO_REG: {
struct instruction *insn = pseudo->def;
- if (insn->opcode == OP_SETVAL && insn->target == pseudo) {
- struct expression *expr = insn->val;
-
- /* A symbol address is always considered true.. */
- if (!expr)
- return 1;
- if (expr->type == EXPR_VALUE)
- return !!expr->value;
- }
+
+ /* A symbol address is always considered true.. */
+ if (insn->opcode == OP_SYMADDR && insn->target == pseudo)
+ return 1;
}
/* Fall through */
default:
@@ -614,7 +609,7 @@ static void simplify_one_symbol(struct entrypoint *ep, struct symbol *sym)
break;
case OP_LOAD:
break;
- case OP_SETVAL:
+ case OP_SYMADDR:
if (!insn->bb)
continue;
mod |= MOD_ADDRESSABLE;