if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
add_compile_options(-mthumb)
- add_compile_options(-mfpu=vfpv3)
- if(TARGET_ARCH_NAME STREQUAL "armel")
+ if (NOT DEFINED CLR_ARM_FPU_TYPE)
+ set(CLR_ARM_FPU_TYPE vfpv3)
+ endif(NOT DEFINED CLR_ARM_FPU_TYPE)
+
+ add_compile_options(-mfpu=${CLR_ARM_FPU_TYPE})
+ if (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+ set(CLR_ARM_FPU_CAPABILITY 0x7)
+ endif(NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+ add_definitions(-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY})
+
+ if(TARGET_ARCH_NAME STREQUAL "armel")
add_compile_options(-mfloat-abi=softfp)
if(DEFINED TIZEN_TOOLCHAIN)
add_compile_options(-Wno-deprecated-declarations) # compile-time option
endif(CLR_CMAKE_PLATFORM_UNIX)
if(CLR_CMAKE_PLATFORM_UNIX_ARM)
+ if (NOT DEFINED CLR_ARM_FPU_TYPE)
+ set(CLR_ARM_FPU_TYPE vfpv3)
+ endif(NOT DEFINED CLR_ARM_FPU_TYPE)
+
# Because we don't use CMAKE_C_COMPILER/CMAKE_CXX_COMPILER to use clang
# we have to set the triple by adding a compiler argument
add_compile_options(-mthumb)
- add_compile_options(-mfpu=vfpv3)
+ add_compile_options(-mfpu=${CLR_ARM_FPU_TYPE})
+ if (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+ set(CLR_ARM_FPU_CAPABILITY 0x7)
+ endif(NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+ add_definitions(-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY})
add_compile_options(-march=armv7-a)
if(ARM_SOFTFP)
add_definitions(-DARM_SOFTFP)
itttt ne
addne r0, CONTEXT_D0
vstmiane r0!, {d0-d15}
+#if CLR_ARM_FPU_CAPABILITY & 0x4
vstmiane r0!, {d16-d31}
+#else
+ addne r0, r0, #128
+#endif
subne r0, CONTEXT_D31
// Make sure sp is restored
itttt ne
addne r0, CONTEXT_D0
vldmiane r0!, {d0-d15}
+#if CLR_ARM_FPU_CAPABILITY & 0x4
vldmiane r0, {d16-d31}
+#else
+ nopne
+#endif
subne r0, CONTEXT_D16
itt ne
add_compile_options(-mfloat-abi=softfp)
endif ()
add_compile_options(-mthumb)
- add_compile_options(-mfpu=vfpv3)
+ if (NOT DEFINED CLR_ARM_FPU_TYPE)
+ set(CLR_ARM_FPU_TYPE vfpv3)
+ endif(NOT DEFINED CLR_ARM_FPU_TYPE)
+
+ add_compile_options(-mfpu=${CLR_ARM_FPU_TYPE})
+ if (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+ set(CLR_ARM_FPU_CAPABILITY 0x7)
+ endif(NOT DEFINED CLR_ARM_FPU_CAPABILITY)
+ add_definitions(-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY})
+
add_compile_options(-march=armv7-a)
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
add_definitions(-DBIT32=1)