This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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,m68k] Get rid of #ifdef MOTOROLA


On Sat, Nov 08, 2003 at 09:10:50AM +0100, Bernardo Innocenti wrote:
> Otherwise, I could do this in m68k.c:
> 
>  /* Force a truth value for MOTOROLA.  */
>  #ifdef MOTOROLA
>  # undef MOTOROLA
>  # define MOTOROLA 1
>  #else
>  # define MOTOROLA 0
>  #endif

  I believe that is necessary. Doing it that way ensures that the 0/1
  change is only done for m68k.c. This means that no header defining
  MOTOROLA has to/should be changed right now.

> >>Regtesting on a MIT target would be highly desiderable before applying,
> >>but I have no easy way to do it.
> >
> >  Since the MD file isn't converted I don't think I can test it.
> >  I have some comments on the patch.
> 
> You can. I'd suggest converting m68k.md later, because it's already
> a massive patch now, and the place where it makes most sense to do
> this change is m68k.c anyway.

  I realized later that only changing m68k.c is safe and that converting
  m68k.md can be done in a separate step. I am going to test the patch.

> I agree, but we can do that only when all of config/m68k/ has been 
> converted.
> Wouldn't it be better to do it in two or more steps?

  Yes, initially I was under the impression that everything must be
  converted at once. I was wrong.

> %O replaces an opcode with its assembler specific version. It shouldn't
> affect MIT syntax output. On the countrary, we could take advantage of
> it to merge more instructions: those where the only difference is in the
> opcode name.

 Does any m68k port really use %O?

> >  Lastly, it might be a good idea to turn most other symbols used in
> >  #if[n]def into 0/1 defines eg. SGS, SGS_CMP_ORDER, USE_GAS, HPUX_ASM.
> >  That might be the next step.
> 
> Yes, I was planning to do that too, but then I noticed that the SGS
> assembler is only used by m68k-*-sysv and m68k-*-hp*, both of which
> are good candidates for obsoletion in 3.5. So it's probably not worth
> doing.

  Lets see what is left after obsoleted systems are removed.

  Gunther


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