From 0bac2ab46d722dd6a6354194903e9b213c80806d Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sun, 5 May 2013 17:14:02 +0200 Subject: [Embtk] give ability to specify default FPU to use at configure time Signed-off-by: Abdoulaye Walsimou Gaye (cherry picked from commit 32e1613ce8f734d858831c228c36da70d783c0cd) --- include/llvm/Config/config.h.cmake | 3 +++ include/llvm/Config/config.h.in | 3 +++ include/llvm/Config/llvm-config.h.cmake | 3 +++ include/llvm/Config/llvm-config.h.in | 3 +++ include/llvm/Support/Host.h | 8 ++++++++ 5 files changed, 20 insertions(+) (limited to 'include') diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index 69876d3686..9c7f362493 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -573,6 +573,9 @@ /* Default float abi to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_FLOAT "${LLVM_DEFAULT_TARGET_FLOAT}" +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#cmakedefine LLVM_DEFAULT_TARGET_FPU "${LLVM_DEFAULT_TARGET_FPU}" + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_MCPU "${LLVM_DEFAULT_TARGET_MCPU}" diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index e595aca501..86ed49dea3 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -578,6 +578,9 @@ /* Default float abi to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_FLOAT +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#undef LLVM_DEFAULT_TARGET_FPU + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_MCPU diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index 993a9df69d..a8fcf91560 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -28,6 +28,9 @@ /* Default float abi to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_FLOAT "${LLVM_DEFAULT_TARGET_FLOAT}" +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#cmakedefine LLVM_DEFAULT_TARGET_FPU "${LLVM_DEFAULT_TARGET_FPU}" + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #cmakedefine LLVM_DEFAULT_TARGET_MCPU "${LLVM_DEFAULT_TARGET_MCPU}" diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in index f25af09391..270628d00b 100644 --- a/include/llvm/Config/llvm-config.h.in +++ b/include/llvm/Config/llvm-config.h.in @@ -28,6 +28,9 @@ /* Default float abi to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_FLOAT +/* Default FPU to use to all compiler invocations, in case of hard float. */ +#undef LLVM_DEFAULT_TARGET_FPU + /* Default cpu (-mcpu=cpu) to use to all compiler invocations. */ #undef LLVM_DEFAULT_TARGET_MCPU diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h index 6cca3b2acd..45566302d1 100644 --- a/include/llvm/Support/Host.h +++ b/include/llvm/Support/Host.h @@ -63,6 +63,14 @@ namespace sys { /// otherwise. bool hasDefaultTargetFloat(); + /// getDefaultTargetFpu() - Return the default target FPU for which the + /// compiler is configured to generate code for, or "" if empty. + std::string getDefaultTargetFpu(); + + /// hasDefaultTargetFpu() - Return true if the compiler was configured to + /// generate by default code for a given FPU and false otherwise. + bool hasDefaultTargetFpu(); + /// getProcessTriple() - Return an appropriate target triple for generating /// code to be loaded into the current process, e.g. when using the JIT. std::string getProcessTriple(); -- cgit v1.2.3