[PATCH] msvcrt: Improve memmove performance on i386 and x86_64 architectures.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49663 Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> --- dlls/msvcrt/math.c | 2 +- dlls/msvcrt/msvcrt.h | 2 + dlls/msvcrt/string.c | 264 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 266 insertions(+), 2 deletions(-)
Piotr Caban <piotr(a)codeweavers.com> writes:
+#define MEMMOVE_INIT \ + "movl " __ASM_NAME( "sse2_supported" ) ", %eax\n\t" \ + "cmp $0, %eax\n\t" \
In general you can't access global variables that way, it's not compatible with PIC. I'd suggest doing that part from C code. -- Alexandre Julliard julliard(a)winehq.org
On 1/26/21 5:25 PM, Alexandre Julliard wrote:
Piotr Caban <piotr(a)codeweavers.com> writes:
+#define MEMMOVE_INIT \ + "movl " __ASM_NAME( "sse2_supported" ) ", %eax\n\t" \ + "cmp $0, %eax\n\t" \
In general you can't access global variables that way, it's not compatible with PIC. I'd suggest doing that part from C code.
I've sent a fixed version that does the check on C side. It has some impact on performance but I guess it can be ignored. Thanks, Piotr
participants (2)
-
Alexandre Julliard -
Piotr Caban