[PATCH] chkstk for Windows

Yaron Keren yaron.keren at gmail.com
Wed Oct 23 14:27:54 PDT 2013


Michael,
you can generate ELF object and load with the ELF dynamic linker on
Windows. Use -target i686-pc-mingw32-elf.

Anton,
With regard to win64_alloca_dynalloca.ll, I understood from the previous
discussion that _chkstk is required under Windows regardless of object
format but not required for other OS, so the Mach-O condition on purpose
was omitted on purpose.

It's easy to bring back the  !Subtarget->isTargetEnvMacho()  condition but
is it correct?

I still do not understand the other test mingw-alloca.ll failure. It does
not target Mach-O.

mingw32 is COFF by default (unless -elf) so results should have been the
same as before, right?

Do the standard regression tests run at all under Windows? I'll try
building them right now.

I'm fairly new at this, sorry for any trouble!

Yaron



2013/10/23 Anton Korobeynikov <anton at korobeynikov.info>

> Actually, no. It looks like you changed the behavior:
>
> -  if (Subtarget->isTargetCOFF() && !Subtarget->isTargetEnvMacho())
> +  if (Subtarget->isTargetWindows())
>
> Previously we have not emitted stack probe for x86_64-win32-macho and
> now we do. This looks incorrect.
>
> However, this should be caught by the standard set of regression
> tests.... Have you run them after the patch?
>
>
> On Thu, Oct 24, 2013 at 12:08 AM, Yaron Keren <yaron.keren at gmail.com>
> wrote:
> > Hi,
> >
> > I am getting build failures for x86_64_debian, x86_64_ubuntu,
> s390-linux1,
> > ppc2-linux2.
> >
> >
> >
> http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-debian-fast/builds/8571
> >
> >
> http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-ubuntu-13.04/builds/8268
> >  http://lab.llvm.org:8011/builders/llvm-ppc64-linux2/builds/7807
> >
> > The failing tests are:
> >
> > LLVM::mingw-alloca.ll
> > LLVM::win64_alloca_dynalloca.ll
> >
> > I think that the tests should be updated to reflect the change, right?
> >
> > Yaron
> >
> >
> >
> > 2013/10/23 Anton Korobeynikov <anton at korobeynikov.info>
> >>
> >> LGTM
> >>
> >> On Wed, Oct 23, 2013 at 10:51 PM, Yaron Keren <yaron.keren at gmail.com>
> >> wrote:
> >> > Calling _chkstk is required on ELF as well as COFF on Windows. Without
> >> > _chkstk functions requiring large stack crash in initialization code.
> >> > Previous code tested for COFF format but not Mach-O and this patch
> >> > modifies
> >> > the code to test for Windows OS.
> >> >
> >> > Credits to Andrew MacPherson.
> >> >
> >> > Yaron
> >> >
> >> >
> >> > _______________________________________________
> >> > llvm-commits mailing list
> >> > llvm-commits at cs.uiuc.edu
> >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >> >
> >>
> >>
> >>
> >> --
> >> With best regards, Anton Korobeynikov
> >> Faculty of Mathematics and Mechanics, Saint Petersburg State University
> >
> >
>
>
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131024/6a848398/attachment.html>


More information about the llvm-commits mailing list