[Mingw-w64-public] [PATCH] stdio: Share the frontend call wrapper assembly across the v*scanf functions

2017-08-03 Thread Martin Storsjö
The code is already structured as a template, with the file specific definitions at the top. Share the common template content in an included file instead, reducing duplication. --- mingw-w64-crt/Makefile.am | 3 ++- mingw-w64-crt/stdio/scanf2-template.S | 30 +

[Mingw-w64-public] [PATCH 1/5] math: Hook up the return value for sqrt on arm

2017-08-03 Thread Martin Storsjö
--- mingw-w64-crt/math/sqrt.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-crt/math/sqrt.def.h b/mingw-w64-crt/math/sqrt.def.h index 0cd401d..adb7cf8 100644 --- a/mingw-w64-crt/math/sqrt.def.h +++ b/mingw-w64-crt/math/sqrt.def.h @@ -88,7 +88,7 @@ __FLT_ABI (sqr

[Mingw-w64-public] [PATCH 5/5] stdio: Share the v*scanf assembly wrapper in the scanf.S external asm file

2017-08-03 Thread Martin Storsjö
This reduces code duplication. --- mingw-w64-crt/stdio/scanf.S| 30 +- mingw-w64-crt/stdio/vfscanf.c | 35 --- mingw-w64-crt/stdio/vfwscanf.c | 35 --- mingw-w64-crt/stdio/vsscanf.c | 35 -

[Mingw-w64-public] [PATCH 3/5] stdio: Simplify the arm assembly wrapper function for v*scanf

2017-08-03 Thread Martin Storsjö
Don't store below the stack pointer, but decrement it before writing; use loads/stores with post increment to avoid manually incrementing the pointer afterwards. Use subs instead of sub+cmp. --- mingw-w64-crt/stdio/vfscanf.c | 18 ++ mingw-w64-crt/stdio/vfwscanf.c | 18 ++-

[Mingw-w64-public] [PATCH 4/5] stdio: Pass the function to call to the v*scanf asm wrapper

2017-08-03 Thread Martin Storsjö
This unifies the wrappers, allowing to share them as on x86. --- mingw-w64-crt/stdio/vfscanf.c | 14 ++ mingw-w64-crt/stdio/vfwscanf.c | 14 ++ mingw-w64-crt/stdio/vsscanf.c | 14 ++ mingw-w64-crt/stdio/vswscanf.c | 14 ++ 4 files changed, 24 inser

[Mingw-w64-public] [PATCH 2/5] math: Avoid defining full functions with inline assembly

2017-08-03 Thread Martin Storsjö
Whatever compiler issue this tried to work around, it seems like it works with modern clang (which is the only supported compiler for arm in mingw at the moment) in any case. --- mingw-w64-crt/math/lrint.c| 19 +-- mingw-w64-crt/math/lrintf.c | 18 -- mingw-w6

Re: [Mingw-w64-public] [PATCH] Handle __CTOR_LIST__ for clang

2017-08-03 Thread Martell Malone
Hey Martin, Glad to see you following up on my various LLVM adventures :) From what I remember the initialization is done in mingw-w64/crt/gccmain.c. I believe it may be possible to add this code and not make is clang specific. Before the iteration loop check in __do_global_ctors and __do_global

[Mingw-w64-public] [PATCH] Add function aliases in libmsvcrt.a for arm just like on x86/x86_64

2017-08-03 Thread Martin Storsjö
Function aliases aren't supported in genlib though, only in GNU binutils dlltool (which doesn't support arm) and llvm-dlltool. It didn't make sense to do this until now, when we have a dlltool that supports arm. This adds the function aliases from msvcrt-common.def.in, functions without a leading

[Mingw-w64-public] New compiler warnings (unused variable)

2017-08-03 Thread Martin Storsjö
Hi niXman, The recent commit you pushed, "_mingw_no_trailing_slash() for _stat64i32() and _wstat64i32()", added compiler warnings about an unused variable "int start", in case you want to fix it yourself. // Martin -

Re: [Mingw-w64-public] [PATCH] Add the sincos* functions on arm, calling into sin/cos separately

2017-08-03 Thread Martin Storsjö
On Thu, 3 Aug 2017, Kai Tietz via Mingw-w64-public wrote: Hmm, is there a chance that this source file is used for none ARM? If so, we should reject this on top, as other targets (the exisiting ones) are already providing this function. Yes, the other targets already provide this function. T

Re: [Mingw-w64-public] [PATCH] Add the sincos* functions on arm, calling into sin/cos separately

2017-08-03 Thread Kai Tietz via Mingw-w64-public
Hmm, is there a chance that this source file is used for none ARM? If so, we should reject this on top, as other targets (the exisiting ones) are already providing this function. Otherwise patch looks ok for me too. Regards, Kai 2017-08-03 0:48 GMT+02:00 JonY via Mingw-w64-public : > On 07/30/

Re: [Mingw-w64-public] [PATCH] Add a dlltool machine flag for targeting arm

2017-08-03 Thread JonY via Mingw-w64-public
On 08/03/2017 05:51 AM, Martin Storsjö wrote: > On Wed, 2 Aug 2017, JonY via Mingw-w64-public wrote: > >> On 07/30/2017 07:46 PM, Martin Storsjö wrote: >>> The GNU binutils dlltool doesn't actually support this >>> target, but llvm-dlltool does. >>> --- >>> mingw-w64-crt/Makefile.am | 2 +- >>> 1