From 0c4d9d8c2d28679a3098e28ea9f3838612bd3904 Mon Sep 17 00:00:00 2001 From: jjohnstn Date: Thu, 5 Feb 2009 20:10:21 +0000 Subject: [PATCH] 2009-02-05 Neal H. Walfield * libc/machine/x86_64/memcpy.S (memcpy): Don't use the red zone. --- newlib/ChangeLog | 4 ++++ newlib/libc/machine/x86_64/memcpy.S | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 965f986e5b..d1199f7ba7 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2009-02-05 Neal H. Walfield + + * libc/machine/x86_64/memcpy.S (memcpy): Don't use the red zone. + 2009-01-28 Jeff Johnston * libc/stdio/vfscanf.c (__SVFSCANF_R): Add additional check for diff --git a/newlib/libc/machine/x86_64/memcpy.S b/newlib/libc/machine/x86_64/memcpy.S index 3178dfae27..81dd0c4235 100644 --- a/newlib/libc/machine/x86_64/memcpy.S +++ b/newlib/libc/machine/x86_64/memcpy.S @@ -30,10 +30,10 @@ quadword_aligned: cmpq $256, rdx jb quadword_copy - movq rax, -8 (rsp) - movq r12, -16 (rsp) - movq r13, -24 (rsp) - movq r14, -32 (rsp) + pushq rax + pushq r12 + pushq r13 + pushq r14 movq rdx, rcx /* Copy 128 bytes at a time with minimum cache polution */ shrq $7, rcx @@ -89,10 +89,10 @@ loop: movq rdx, rcx andq $127, rcx rep movsb - movq -8 (rsp), rax - movq -16 (rsp), r12 - movq -24 (rsp), r13 - movq -32 (rsp), r14 + popq r14 + popq r13 + popq r12 + popq rax ret -- 2.11.0