On Fri, 2021-08-27 at 15:36 -0600, Jeff Law wrote:

> It's easier when someone has to debug the code later.  
> enums show up in debug output by default, while #defines do not.

> > 
> > switch (mips_isa)
> >    {
> >      case MIPS_ISA_MIPS1: return "mips1";
> >      // ...
> >    }
> > 
> > It looks better, and (maybe) generates better code.  Just my 2 cents
> > though.

> Coding standards would have that as
> 
> switch (mips_isa)
>    {
>    case MIPS_ISA_MIPS_1:
>      return "mips1";
>    ...
>    }

There is some existing code using "case ... : return ..." in one line in
mips.c, so I thought it was standard :(.

> Presumably .module is supported by all reasonably modern versions of
> GAS?

It's added by the commit in binutils-gdb:

> commit 919731affbef19fcad8dddb0a595bb05755cb345
> Author: mfortune <matthew.fort...@imgtec.com>
> Date:   Tue May 20 13:28:20 2014 +0100
> 
>     Add MIPS .module directive
> 

So it should be supported since binutils-2.25.

If we want to support old binutils we'll need something like "-fno-mips-
module-directive" and "--without-mips-module-directive".  My suggestion
is just bumping the binutils requirement for mips*-*-*.


Reply via email to