diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-10-12 11:48:36 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-10-12 11:48:36 +0200 |
commit | 3ab947ce345e9d18ddcda57d8f88b2a9b8f5d267 (patch) | |
tree | 41afaa730849b6f9e8116ddc3068044928997d8c /checklink/Safe.ml | |
parent | ef0f69dc1caeab169dcefca4d8b89f4d9e756bb5 (diff) | |
download | compcert-3ab947ce345e9d18ddcda57d8f88b2a9b8f5d267.tar.gz compcert-3ab947ce345e9d18ddcda57d8f88b2a9b8f5d267.zip |
Removal of cchecklink, superseded by AbsInt's Valex tool.
Diffstat (limited to 'checklink/Safe.ml')
-rw-r--r-- | checklink/Safe.ml | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/checklink/Safe.ml b/checklink/Safe.ml deleted file mode 100644 index efcd3bd6..00000000 --- a/checklink/Safe.ml +++ /dev/null @@ -1,25 +0,0 @@ -(* "Hacker's Delight", section 2.12 *) - -let ( + ) x y = - let z = x + y in - (* Overflow occurs iff x and y have same sign and z's sign is different *) - if (z lxor x) land (z lxor y) < 0 - then raise Exc.IntOverflow - else z - -let ( - ) x y = - let z = x - y in - (* Overflow occurs iff x and y have opposite signs and z and x have - opposite signs *) - if (x lxor y) land (z lxor x) < 0 - then raise Exc.IntOverflow - else z - -let ( * ) x y = - let z = x * y in - if (x = min_int && y < 0) || (y <> 0 && z / y <> x) - then raise Exc.IntOverflow - else z - -let of_int32 = Safe32.to_int -let to_int32 = Safe32.of_int |