aboutsummaryrefslogtreecommitdiffstats
path: root/cse.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-22 18:21:24 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:06:16 -0700
commit741bbde940215dd3c9d9d4ea011af4e3764c4a31 (patch)
tree3c6c3422a6aa00547adadf1cbcf57ad0951694ac /cse.c
parente031e2cc87a40797739841be34e75c9ef6e89a99 (diff)
downloadsparse-741bbde940215dd3c9d9d4ea011af4e3764c4a31.tar.gz
sparse-741bbde940215dd3c9d9d4ea011af4e3764c4a31.tar.xz
sparse-741bbde940215dd3c9d9d4ea011af4e3764c4a31.zip
Split the binops where signedness matters into unsigned and signed.
This is OP_MUL/OP_DIV/OP_MOD/OP_SHR. We actually do the constant simplifications still wrong, but now the information is all there.
Diffstat (limited to 'cse.c')
-rw-r--r--cse.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/cse.c b/cse.c
index 758884c..f00c2f2 100644
--- a/cse.c
+++ b/cse.c
@@ -51,9 +51,11 @@ static void clean_up_one_instruction(struct basic_block *bb, struct instruction
/* Binary arithmetic */
case OP_ADD: case OP_SUB:
- case OP_MUL: case OP_DIV:
- case OP_MOD: case OP_SHL:
- case OP_SHR:
+ case OP_MULU: case OP_MULS:
+ case OP_DIVU: case OP_DIVS:
+ case OP_MODU: case OP_MODS:
+ case OP_SHL:
+ case OP_LSR: case OP_ASR:
case OP_AND: case OP_OR:
/* Binary logical */
@@ -166,9 +168,11 @@ static int insn_compare(const void *_i1, const void *_i2)
/* Binary arithmetic */
case OP_ADD: case OP_SUB:
- case OP_MUL: case OP_DIV:
- case OP_MOD: case OP_SHL:
- case OP_SHR:
+ case OP_MULU: case OP_MULS:
+ case OP_DIVU: case OP_DIVS:
+ case OP_MODU: case OP_MODS:
+ case OP_SHL:
+ case OP_LSR: case OP_ASR:
case OP_AND: case OP_OR:
/* Binary logical */