On 06/24/2011 08:03 AM, Ramana Radhakrishnan wrote:
>>> 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"]        <======= HERE
> }
> 
> +# 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

arm_thumb_ok and arm_thumb2_ok check to see if the target will be as expected
when compiling with -mthumb, and the tests that use it add -mthumb to the
options.  The new ones check to see if the target is thumb with current
multilib options, and it can safely be used for dg-final.

Janis

Janis

Reply via email to