Hi,

This patchset adds initial support for targeting ARM64 in MinGW.

While Windows on ARM64 isn't publicly available yet (but rumored
to be released this fall), it is (somewhat) testable in Wine
(bootstrapped with some arm64 binaries from the windows 10 sdk,
by André Hentschel).

Additionally, MSVC targeting ARM64 isn't publicly available yet
either, but clang/LLVM is getting support for targeting this
OS/arch combo - it is usable already with the current trunk
version since very recently. For using with MinGW, a few other
patches are needed as well:
https://reviews.llvm.org/D36366
https://reviews.llvm.org/D36365
https://reviews.llvm.org/D36364
https://reviews.llvm.org/D36105
https://reviews.llvm.org/D36304
https://reviews.llvm.org/D33880


With this patchset, I have a usable MinGW environment for (some)
C projects (C++ support is still incomplete, and e.g. setjmp is
also yet unimplemented). In particular, I'm able to build all of
libav and run all of their regression tests, without errors, in wine.

Patch 18 adds a few empty structs to winnt.h for arm64 specific
structs - I'd appreciate help with filling them out in a
suitable clean-room manner (they are available in the win10 sdk).

// Martin



Martin Storsjö (19):
  math: Add errors in assembly sources if no implementation exists
  setjmp.h: Add a fallback definition for unsupported architectures
  crt: Add initial support for arm64 in mingw-w64-crt
    Makefile.am/configure.ac
  crt: Add an initial libarm64 directory with def files
  headers: Detection of __aarch64__ in some main locations
  headers: Skip the inline interlocked functions for aarch64 (as on all
    other non-i386 archs)
  fenv: Add aarch64 specific codepaths in fenv functions, add aarch64
    fenv.h header section
  math: Use the same generic codepaths for aarch64 as for arm
  math: Add aarch64 assembly implementations of math functions
  math: Implement the exp2() wrappers using assembly on aarch64
  stdio: Add aarch64 assembly wrappers for the v*scanf functions
  intrin-impl.h: Include compiler builtins based parts on aarch64 as
    well
  intrin-impl.h: Add aarch64 functions corresponding to the arm ones
  crtexe: Skip __initenv on aarch64 just as on arm
  crt: Skip .seh asm directives on aarch64, limit them to x86_64
  crt: Disable __mingw_init_ehandler on aarch64
  winnt.h: Add arm64 specific handling of TEB
  winnt.h: Add empty definition of arch specific structs for arm64
  crt: Disable win64 unwinding on arm64

 mingw-w64-crt/Makefile.am                          |  253 +++++
 mingw-w64-crt/configure.ac                         |   21 +
 mingw-w64-crt/crt/CRT_fp10.c                       |    3 +
 mingw-w64-crt/crt/crt_handler.c                    |    2 +-
 mingw-w64-crt/crt/crtdll.c                         |    2 +-
 mingw-w64-crt/crt/crtexe.c                         |    6 +-
 mingw-w64-crt/crt/gs_support.c                     |    2 +-
 mingw-w64-crt/libarm64/Makefile.am                 | 1164 ++++++++++++++++++++
 mingw-w64-crt/{libarm32 => libarm64}/*.def         |    0
 mingw-w64-crt/math/_chgsignl.S                     |    5 +
 mingw-w64-crt/math/arm/exp2.c                      |   30 +-
 mingw-w64-crt/math/arm/log2.c                      |    2 +-
 mingw-w64-crt/math/arm/scalbn.c                    |    2 +-
 mingw-w64-crt/math/arm/sincos.c                    |    2 +-
 mingw-w64-crt/math/ceil.S                          |    5 +
 mingw-w64-crt/math/ceilf.S                         |    5 +
 mingw-w64-crt/math/ceill.S                         |    5 +
 mingw-w64-crt/math/cephes_mconf.h                  |    4 +-
 mingw-w64-crt/math/copysignl.S                     |    4 +
 mingw-w64-crt/math/fabs.c                          |    4 +-
 mingw-w64-crt/math/fabsf.c                         |    4 +-
 mingw-w64-crt/math/fabsl.c                         |    2 +-
 mingw-w64-crt/math/floor.S                         |    5 +
 mingw-w64-crt/math/floorf.S                        |    5 +
 mingw-w64-crt/math/floorl.S                        |    5 +
 mingw-w64-crt/math/fma.c                           |   12 +
 mingw-w64-crt/math/fmaf.c                          |   12 +
 mingw-w64-crt/math/fmal.c                          |    2 +-
 mingw-w64-crt/math/fpclassifyf.c                   |    2 +-
 mingw-w64-crt/math/fpclassifyl.c                   |    2 +-
 mingw-w64-crt/math/isnan.c                         |    2 +-
 mingw-w64-crt/math/isnanf.c                        |    2 +-
 mingw-w64-crt/math/isnanl.c                        |    2 +-
 mingw-w64-crt/math/lgammal.c                       |    4 +-
 mingw-w64-crt/math/lrint.c                         |    5 +
 mingw-w64-crt/math/lrintf.c                        |    5 +
 mingw-w64-crt/math/lrintl.c                        |    2 +-
 mingw-w64-crt/math/nearbyint.S                     |    7 +
 mingw-w64-crt/math/nearbyintf.S                    |    7 +
 mingw-w64-crt/math/nearbyintl.S                    |    7 +
 mingw-w64-crt/math/rint.c                          |    2 +
 mingw-w64-crt/math/rintf.c                         |    2 +
 mingw-w64-crt/math/rintl.c                         |    2 +-
 mingw-w64-crt/math/signbit.c                       |    2 +-
 mingw-w64-crt/math/signbitf.c                      |    2 +-
 mingw-w64-crt/math/signbitl.c                      |    2 +-
 mingw-w64-crt/math/sqrt.def.h                      |    6 +
 mingw-w64-crt/math/trunc.S                         |    5 +
 mingw-w64-crt/math/truncf.S                        |    5 +
 mingw-w64-crt/math/truncl.c                        |    4 +-
 mingw-w64-crt/misc/feclearexcept.c                 |   12 +-
 mingw-w64-crt/misc/fegetenv.c                      |   10 +-
 mingw-w64-crt/misc/fegetexceptflag.c               |   10 +-
 mingw-w64-crt/misc/fegetround.c                    |    6 +-
 mingw-w64-crt/misc/feholdexcept.c                  |    8 +-
 mingw-w64-crt/misc/feraiseexcept.c                 |    8 +-
 mingw-w64-crt/misc/fesetenv.c                      |   14 +-
 mingw-w64-crt/misc/fesetexceptflag.c               |   13 +-
 mingw-w64-crt/misc/fesetround.c                    |   14 +-
 mingw-w64-crt/misc/fetestexcept.c                  |   10 +-
 mingw-w64-crt/stdio/scanf.S                        |   32 +
 mingw-w64-crt/stdio/scanf2-template.S              |    8 +-
 mingw-w64-crt/stdio/vfscanf.c                      |    3 +-
 mingw-w64-crt/stdio/vfwscanf.c                     |    3 +-
 mingw-w64-crt/stdio/vsscanf.c                      |    3 +-
 mingw-w64-crt/stdio/vswscanf.c                     |    3 +-
 mingw-w64-headers/crt/fenv.h                       |   16 +-
 mingw-w64-headers/crt/malloc.h                     |    2 +-
 mingw-w64-headers/crt/math.h                       |   30 +-
 mingw-w64-headers/crt/setjmp.h                     |    5 +
 mingw-w64-headers/include/interlockedapi.h         |    2 +-
 mingw-w64-headers/include/psdk_inc/intrin-impl.h   |  149 ++-
 mingw-w64-headers/include/winnt.h                  |  129 ++-
 1245 files changed, 2056 insertions(+), 90 deletions(-)
 create mode 100644 mingw-w64-crt/libarm64/Makefile.am
 copy mingw-w64-crt/{libarm32 => libarm64}/*.def (100%)

-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to