if(WIN32)
test_target_arch(arm "" "" "")
else()
+ test_target_arch(armv4t "" "-march=armv4t" "-mfloat-abi=soft")
+ test_target_arch(armv6m "" "-march=armv6m" "-mfloat-abi=soft")
test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft")
test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard")
- test_target_arch(armv6m "" "-march=armv6m" "-mfloat-abi=soft")
endif()
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "avr")
test_target_arch(avr "__AVR__" "--target=avr")
set(i386_SOURCES ${GENERIC_SOURCES} ${x86_ARCH_SOURCES})
endif () # if (NOT MSVC)
-set(arm_SOURCES
+
+# builtin support for Targets that have Arm state or have Thumb2
+set(arm_or_thumb2_base_SOURCES
arm/fp_mode.c
arm/bswapdi2.S
arm/bswapsi2.S
arm/divmodsi4.S
arm/divsi3.S
arm/modsi3.S
+ arm/udivmodsi4.S
+ arm/udivsi3.S
+ arm/umodsi3.S
+ ${GENERIC_SOURCES}
+)
+
+set(arm_sync_SOURCES
arm/sync_fetch_and_add_4.S
arm/sync_fetch_and_add_8.S
arm/sync_fetch_and_and_4.S
arm/sync_fetch_and_umin_8.S
arm/sync_fetch_and_xor_4.S
arm/sync_fetch_and_xor_8.S
- arm/udivmodsi4.S
- arm/udivsi3.S
- arm/umodsi3.S
- ${GENERIC_SOURCES}
)
-set(thumb1_SOURCES
+# builtin support for Thumb-only targets with very limited Thumb2 technology,
+# such as v6-m and v8-m.baseline
+set(thumb1_base_SOURCES
arm/divsi3.S
arm/udivsi3.S
arm/comparesf2.S
set(arm_Thumb1_icache_SOURCES
arm/sync_synchronize.S
)
+
+# thumb1 calling into Arm to cover support
set(arm_Thumb1_SOURCES
${arm_Thumb1_JT_SOURCES}
${arm_Thumb1_SjLj_EH_SOURCES}
${arm_Thumb1_icache_SOURCES}
)
+# base functionality for Arm Targets prior to Arm v7-a and Armv6-m such as v6,
+# v5t, v4t
+set(arm_min_SOURCES
+ ${arm_or_thumb2_base_SOURCES}
+ ${arm_EABI_SOURCES}
+)
+
if(MINGW)
set(arm_SOURCES
arm/aeabi_idivmod.S
arm/aeabi_uidivmod.S
arm/aeabi_uldivmod.S
arm/chkstk.S
- ${arm_SOURCES}
+ ${arm_or_thumb2_base_SOURCES}
+ ${arm_sync_SOURCES}
+ )
+
+ set(thumb1_SOURCES
+ ${thumb1_base_SOURCES}
)
elseif(NOT WIN32)
# TODO the EABI sources should only be added to EABI targets
set(arm_SOURCES
- ${arm_SOURCES}
+ ${arm_or_thumb2_base_SOURCES}
+ ${arm_sync_SOURCES}
${arm_EABI_SOURCES}
${arm_Thumb1_SOURCES}
)
set(thumb1_SOURCES
- ${thumb1_SOURCES}
+ ${thumb1_base_SOURCES}
${arm_EABI_SOURCES}
)
endif()
)
endif()
+set(armv4t_SOURCES ${arm_min_SOURCES})
set(armhf_SOURCES ${arm_SOURCES})
set(armv7_SOURCES ${arm_SOURCES})
set(armv7s_SOURCES ${arm_SOURCES})