From f4e106d4fc1cce484678b5cdd86ab57d7a43076a Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 27 Jul 2014 07:35:49 +0000 Subject: ARM port: add support for Thumb2. To be tested. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2549 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- driver/Clflags.ml | 1 + driver/Compopts.v | 3 ++- driver/Driver.ml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'driver') diff --git a/driver/Clflags.ml b/driver/Clflags.ml index 610d807..7104c32 100644 --- a/driver/Clflags.ml +++ b/driver/Clflags.ml @@ -28,6 +28,7 @@ let option_falignfunctions = ref (None: int option) let option_falignbranchtargets = ref 0 let option_faligncondbranchs = ref 0 let option_finline_asm = ref false +let option_fthumb = ref false let option_Osize = ref false let option_dparse = ref false let option_dcmedium = ref false diff --git a/driver/Compopts.v b/driver/Compopts.v index 205f768..01109f5 100644 --- a/driver/Compopts.v +++ b/driver/Compopts.v @@ -30,4 +30,5 @@ Parameter va_strict: unit -> bool. (** Flag -ftailcalls. For tail call optimization. *) Parameter eliminate_tailcalls: unit -> bool. - +(** Flag -fthumb. For the ARM back-end. *) +Parameter thumb: unit -> bool. diff --git a/driver/Driver.ml b/driver/Driver.ml index 88871f7..556a476 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -429,6 +429,7 @@ Code generation options: (use -fno- to turn off -f) : -O Optimize for speed [on by default] -Os Optimize for code size -ffpu Use FP registers for some integer operations [on] + -fthumb (ARM only) Use Thumb2 instruction encoding -fsmall-data Set maximal size for allocation in small data area -fsmall-const Set maximal size for allocation in small constant area -ffloat-const-prop Control constant propagation of floats @@ -552,6 +553,7 @@ let cmdline_actions = @ f_opt "inline-asm" option_finline_asm @ f_opt "fpu" option_ffpu @ f_opt "sse" option_ffpu (* backward compatibility *) + @ f_opt "thumb" option_fthumb let _ = Gc.set { (Gc.get()) with -- cgit v1.2.3