This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add new model m32r2 of Renesas M32R.


Hi Kazuhiro,

> I send a miss patch about  -error-explicit-parallel-conflicts.
> I made the -error-explicit-parallel-conflicts option to generate an
> illegal parallel code for chip test only. It's not for general
> users.

In which case shouldn't the switch be removed entirely ?


I am not going to apply your patch yet, because I have some questions
about it:

>       case OPTION_WARN_PARALLEL:
>         warn_explicit_parallel_conflicts = 1;
> -       error_explicit_parallel_conflicts = 0;
>         break;
>   
>       case OPTION_NO_WARN_PARALLEL:
>         warn_explicit_parallel_conflicts = 0;
> -       error_explicit_parallel_conflicts = 0;
>         break;
>   
>       case OPTION_ERROR_PARALLEL:
> -       warn_explicit_parallel_conflicts = 1;
>         error_explicit_parallel_conflicts = 1;
>         break;
>   
>       case OPTION_NO_ERROR_PARALLEL:
>         error_explicit_parallel_conflicts = 0;
> -       warn_explicit_parallel_conflicts = 0;
>         break;

Why have you removed these lines ?  Surely the --warn... and
--error... options are incompatible ?  You cannot both warn about a
parallel conflict and generate an error for it.

> +   if ( check_outputs && !error_explicit_parallel_conflicts )
> +     return 0;

What is the purpose of this ?  It appears to mean that if
error_explicit_parallel_conflicts is not true, then the code will not
check for parallel conflicts, even if warn_explicit_parallel_conflicts
it true.

>     if (parallel_p && warn_explicit_parallel_conflicts)
>       {
>         if (first_writes_to_seconds_operands (&first, &second, FALSE))
>   	/* xgettext:c-format  */
> ! 	as_warn (_("%s: output of 1st instruction is the same as an input to 2nd instruction - is this intentional ?"), str2);
>   
>         if (first_writes_to_seconds_operands (&second, &first, FALSE))
>   	/* xgettext:c-format  */
> ! 	as_warn (_("%s: output of 2nd instruction is the same as an input to 1st instruction - is this intentional ?"), str2);
>       }

Where are the error messages ?  If error_explicit_parallel_conflicts
is true, then shouldn't an error message be generated rather than a
warning ?

Cheers
        Nick
        




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]