On Thu, May 23, 2024 at 7:53 PM Evgeny Karpov
<evgeny.kar...@microsoft.com> wrote:
>
>
> Thursday, May 23, 2024 10:35 AM
> Uros Bizjak <ubiz...@gmail.com> wrote:
>
> > Richard Sandiford <richard.sandif...@arm.com> wrote:
> > >
> > > > This looks good to me apart from a couple of very minor comments
> > > > below, but please get approval from the x86 maintainers as well.  In
> > > > particular, they might prefer to handle ix86_legitimize_pe_coff_symbol 
> > > > in
> > some other way.
> > >
> > > Jan and Uros, could you please review x86 refactoring for mingw part?
> >
> > Yes, perhaps legitimize_pe_coff_symbol should be handled similar to how
> > machopic_legitimize_pic_address is handled.and just use "#if TARGET_PECOFF"
> > at call sites when calling functions from the new winnt-dll.h. This would 
> > also
> > allow us to remove  the early check for !TARGET_PECOFF in
> > legitimize_pe_coff_symbol.
> >
> > Uros.
>
>
> The function legitimize_pe_coff_symbol is now part of mingw and will not be 
> used for linux targets.
> This is why ix86_legitimize_pe_coff_symbol has been introduced, to be 
> available for all platforms.

There is no need for a ix86_legitimize_pe_coff_symbol. This function
is now defined in a header that is not included by default, so the
call sites should use #if TARGET_PECOFF to isolate its use. Please see
how "#if TARGET_MACHO" is used in config/i386/* files for the similar
issue. I think that TARGET_PECOFF should follow this example.

Uros.

Reply via email to