Hi!

On Tue, Jan 18, 2022 at 12:51:39PM +0100, Sebastian Huber wrote:
> For some CPUs, the assembler machine directive cannot be determined by ISA
> flags.

That may be the best we can do here, with the current setup, yes.

>       PR 104090/target
>       * config/rs6000/rs6000.cc (rs6000_machine_from_flags): Use also
>       rtems_cpu.

rs6000_cpu you mean :-)

> +  /* For some CPUs, the machine cannot be determined by ISA flags.  We have 
> to
> +     check them first.  */
> +  switch (rs6000_cpu)
> +    {
> +    case PROCESSOR_PPC8540:
> +    case PROCESSOR_PPC8548:
> +      return "e500";

Ah I could not figure out what core those two are.  But you know it :-)

> +    default:
> +      break;

Please don't do that.  You can do

  default:
    break;
    break;
    /* And just to make sure:  */
    break;
    break;

and it will do exactly the same as not having a default at all.  Not
having such useless code is by far the most readable, so please don't
include a default case at all.

Okay with those changes.  Thanks!


Segher

Reply via email to