From 04d0d602ef7245fd566debd91bcb148acd9ed067 Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 28 Jul 2014 12:13:15 +0000 Subject: 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 --- checklink/Fuzz.ml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'checklink/Fuzz.ml') 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 -- cgit v1.2.3