From b657f957dadffd2e55c895957d506146997fade6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 3 Nov 2016 14:12:00 +0100 Subject: remove unused file, update tests for arch-field of configuration files --- common/Memdataaux.ml | 18 ------------------ driver/Configuration.ml | 2 +- exportclight/Clightgen.ml | 7 ++++++- 3 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 common/Memdataaux.ml diff --git a/common/Memdataaux.ml b/common/Memdataaux.ml deleted file mode 100644 index 8bfd4349..00000000 --- a/common/Memdataaux.ml +++ /dev/null @@ -1,18 +0,0 @@ -(* *********************************************************************) -(* *) -(* The Compcert verified compiler *) -(* *) -(* Xavier Leroy, INRIA Paris-Rocquencourt *) -(* *) -(* Copyright Institut National de Recherche en Informatique et en *) -(* Automatique. All rights reserved. This file is distributed *) -(* under the terms of the INRIA Non-Commercial License Agreement. *) -(* *) -(* *********************************************************************) - -let big_endian = - match Configuration.arch with - | "powerpc" -> true - | "arm" -> false - | "ia32" -> false - | _ -> assert false diff --git a/driver/Configuration.ml b/driver/Configuration.ml index 85a163bf..5d5b4a2d 100644 --- a/driver/Configuration.ml +++ b/driver/Configuration.ml @@ -117,7 +117,7 @@ let linker = let arch = match get_config_string "arch" with - | "powerpc"|"arm"|"ia32"|"x86_64"|"x86" as a -> a + | "powerpc"|"arm"|"x86" as a -> a | v -> bad_config "arch" [v] let model = get_config_string "model" let abi = get_config_string "abi" diff --git a/exportclight/Clightgen.ml b/exportclight/Clightgen.ml index f272c3ed..eddb36e2 100644 --- a/exportclight/Clightgen.ml +++ b/exportclight/Clightgen.ml @@ -168,7 +168,12 @@ let _ = | "arm" -> if Configuration.is_big_endian then Machine.arm_bigendian else Machine.arm_littleendian - | "ia32" -> Machine.x86_32 + | "x86" -> if Configuration.model = "64" then + Machine.x86_64 + else + if Configuration.abi = "macosx" + then Machine.x86_32_macosx + else Machine.x86_32 | _ -> assert false end; Builtins.set C2C.builtins; -- cgit