From 25343aa241ace456a75301f6deb39ce8349e45ff Mon Sep 17 00:00:00 2001 From: Benedikt Meurer Date: Sat, 29 Dec 2012 00:49:57 +0000 Subject: [PATCH] [arm] Fix arch selection with ARMv6. Rename EABI_VFP to EABI_HF. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13169 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- asmcomp/arm/arch.ml | 40 ++++++++++++++++++++-------------------- asmcomp/arm/proc.ml | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/asmcomp/arm/arch.ml b/asmcomp/arm/arch.ml index fd46f0755..a1d88ecc6 100644 --- a/asmcomp/arm/arch.ml +++ b/asmcomp/arm/arch.ml @@ -15,14 +15,14 @@ open Format -type abi = EABI | EABI_VFP +type abi = EABI | EABI_HF type arch = ARMv4 | ARMv5 | ARMv5TE | ARMv6 | ARMv6T2 | ARMv7 type fpu = Soft | VFPv2 | VFPv3_D16 | VFPv3 let abi = match Config.system with "linux_eabi" -> EABI - | "linux_eabihf" -> EABI_VFP + | "linux_eabihf" -> EABI_HF | _ -> assert false let string_of_arch = function @@ -45,14 +45,14 @@ let (arch, fpu, thumb) = let (def_arch, def_fpu, def_thumb) = begin match abi, Config.model with (* Defaults for architecture, FPU and Thumb *) - EABI, "armv5" -> ARMv5, Soft, false - | EABI, "armv5te" -> ARMv5TE, Soft, false - | EABI, "armv6" -> ARMv6, Soft, false - | EABI, "armv6t2" -> ARMv6T2, Soft, false - | EABI, "armv7" -> ARMv7, Soft, false - | EABI, _ -> ARMv4, Soft, false - | EABI_VFP, "armv6" -> ARMv6, VFPv2, false - | EABI_VFP, _ -> ARMv7, VFPv3_D16, true + EABI, "armv5" -> ARMv5, Soft, false + | EABI, "armv5te" -> ARMv5TE, Soft, false + | EABI, "armv6" -> ARMv6, Soft, false + | EABI, "armv6t2" -> ARMv6T2, Soft, false + | EABI, "armv7" -> ARMv7, Soft, false + | EABI, _ -> ARMv4, Soft, false + | EABI_HF, "armv6" -> ARMv6, VFPv2, false + | EABI_HF, _ -> ARMv7, VFPv3_D16, true end in (ref def_arch, ref def_fpu, ref def_thumb) @@ -60,20 +60,20 @@ let pic_code = ref false let farch spec = arch := (match spec with - "armv4" when abi <> EABI_VFP -> ARMv4 - | "armv5" when abi <> EABI_VFP -> ARMv5 - | "armv5te" when abi <> EABI_VFP -> ARMv5TE - | "armv6" when abi <> EABI_VFP -> ARMv6 - | "armv6t2" when abi <> EABI_VFP -> ARMv6T2 - | "armv7" -> ARMv7 + "armv4" when abi <> EABI_HF -> ARMv4 + | "armv5" when abi <> EABI_HF -> ARMv5 + | "armv5te" when abi <> EABI_HF -> ARMv5TE + | "armv6" -> ARMv6 + | "armv6t2" -> ARMv6T2 + | "armv7" -> ARMv7 | spec -> raise (Arg.Bad spec)) let ffpu spec = fpu := (match spec with - "soft" when abi <> EABI_VFP -> Soft - | "vfpv2" when abi = EABI_VFP -> VFPv2 - | "vfpv3-d16" when abi = EABI_VFP -> VFPv3_D16 - | "vfpv3" when abi = EABI_VFP -> VFPv3 + "soft" when abi <> EABI_HF -> Soft + | "vfpv2" when abi = EABI_HF -> VFPv2 + | "vfpv3-d16" when abi = EABI_HF -> VFPv3_D16 + | "vfpv3" when abi = EABI_HF -> VFPv3 | spec -> raise (Arg.Bad spec)) let command_line_options = diff --git a/asmcomp/arm/proc.ml b/asmcomp/arm/proc.ml index dfd028f94..b8ff779b6 100644 --- a/asmcomp/arm/proc.ml +++ b/asmcomp/arm/proc.ml @@ -123,7 +123,7 @@ let calling_conventions ofs := !ofs + size_int end | Float -> - assert (abi = EABI_VFP); + assert (abi = EABI_HF); assert (!fpu >= VFPv2); if !float <= last_float then begin loc.(i) <- phys_reg !float; @@ -185,7 +185,7 @@ let destroyed_at_c_call = 108;109;110;111;112;113;114;115; 116;116;118;119;120;121;122;123; 124;125;126;127;128;129;130;131] - | EABI_VFP -> (* r4-r7, d8-d15 preserved *) + | EABI_HF -> (* r4-r7, d8-d15 preserved *) [0;1;2;3;8; 100;101;102;103;104;105;106;107; 116;116;118;119;120;121;122;123;