summaryrefslogtreecommitdiff
path: root/checklink/Fuzz.ml
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-07-28 12:13:15 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-07-28 12:13:15 +0000
commit04d0d602ef7245fd566debd91bcb148acd9ed067 (patch)
tree77a11f3e551303521aa72af1e63cea0285bcd1bc /checklink/Fuzz.ml
parentb8e535ccf82385573f80f6d146c04892b25ea0a6 (diff)
PowerPC port: refactored the expansion of built-in functions and
pseudo-instructions so that it does not need to be re-done in cchecklink. cchecklink: updated accordingly. testsuite: compile with -sdump and run cchecklink if supported. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2553 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'checklink/Fuzz.ml')
-rw-r--r--checklink/Fuzz.ml19
1 files changed, 3 insertions, 16 deletions
diff --git a/checklink/Fuzz.ml b/checklink/Fuzz.ml
index d7947ee..dc98493 100644
--- a/checklink/Fuzz.ml
+++ b/checklink/Fuzz.ml
@@ -75,7 +75,6 @@ let fuzz_check elfmap bs byte old sdumps =
let ok_fuzz elfmap str byte fuzz =
let (a, b, _, r) = full_range_of_byte elfmap byte in
let a = Safe32.to_int a in
- let b = Safe32.to_int b in
let old = Char.code str.[byte] in
let fuz = Char.code fuzz in
match r with
@@ -98,13 +97,7 @@ let ok_fuzz elfmap str byte fuzz =
&& ((old land 0xf = 0) || (fuz land 0xf = 0))
)
| Symtab_function(_) -> true
- | Data_symbol(_) ->
- (* False positive: 0. becomes -0. *)
- not (
- (byte + 7 <= b)
- && (fuz = 0x80) (* sign bit *)
- && String.sub str byte 8 = "\000\000\000\000\000\000\000\000"
- )
+ | Data_symbol(_) -> true
| Function_symbol(_) ->
let opcode = Char.code str.[byte - 3] in
(* False positive: rlwinm with bitmask 0 31 = bitmask n (n - 1) *)
@@ -113,14 +106,8 @@ let ok_fuzz elfmap str byte fuzz =
| Zero_symbol -> false
| Stub(_) -> true
| Jumptable -> true
- | Float_literal(_) -> (* FIXME: this shouldn't be a false positive! *)
- (* False positive: 0. becomes -0. *)
- not (
- (byte = a)
- && (fuz = 0x80) (* sign bit *)
- && String.sub str byte 8 = "\000\000\000\000\000\000\000\000"
- )
- | Float32_literal(_) -> true
+ | Float_literal(_) -> true
+ | Float32_literal(_) -> true
(* padding is allowed to be non-null, but won't be recognized as padding, but
as unknown, which is not an ERROR *)
| Padding -> false