>> I introduced 2 new arm-related effective targets to accomplish this.
>> - arm_thumb2: Tests if we're compiling for thumb2.
>> - arm_nothumb: Tests if we're not compiling for any thumb.
>> I don't know how to get the same effect with the existing arm-related
>> effective
>> targets.
>
> That looks good to me, and those effective targets will be very useful.
How is this different from arm_thumb2_ok and !arm_thumb2_ok ?
If l Iook at arm_thumb2 that appears to be identical to what
arm_thumb2_ok does.
proc check_effective_target_arm_thumb2_ok { } {
return [check_no_compiler_messages arm_thumb2_ok assembly {
#if !defined(__thumb2__)
#error FOO
#endif
} "-mthumb"]
}
+# Return 1 is this is an ARM target where is Thumb-2 used.
+
+proc check_effective_target_arm_thumb2 { } {
+ return [check_no_compiler_messages arm_thumb2 assembly {
+ #if !defined(__thumb2__)
+ #error FOO
+ #endif
+ } ""]
+}
+
Or am I missing something ?
Ramana