 -  cmpq    $16, rdx
 +  movl    esi, esi                /* Only need to do read sandboxing once */
 +  addq    r15 ,rsi
-+  movl    edi, %r9d               /* Save return value */
++  movl    edi, r9d                /* Save return value */
 +  movl    esi, eax
 +  movl    edx, ecx
 +  cmpl    $16, edx

   rep     stosb                   /* Store the remaining bytes */
-  movq    r9, rax
-  ret
+  movl    %r9d, eax
+  pop     r11
+  nacljmp %r11d, r15
 
diff -uNr newlib-1.17.0.orig/newlib/libc/machine/x86_64/setjmp.S newlib-1.17.0/newlib/libc/machine/x86_64/setjmp.S
--- newlib-1.17.0.orig/newlib/libc/machine/x86_64/setjmp.S	2007-08-28 23:56:50.000000000 +0200
+++ newlib-1.17.0/newlib/libc/machine/x86_64/setjmp.S	2009-12-17 13:51:54.000000000 +0100
@@ -33,7 +33,8 @@
   movq    (rsp), rax
   movq    rax, 56 (rdi)
   movq    $0, rax
-  ret
+  pop     r11
+  nacljmp %r11d, r15
 
 SYM (longjmp):
   movq    rsi, rax        /* Return value */
@@ -50,4 +51,5 @@
   movq    40 (rdi), r15
   __STI
 
-  ret
+  pop     r11
+  nacljmp %r11d, r15
diff -uNr newlib-1.17.0.orig/newlib/libc/posix/telldir.c newlib-1.17.0/newlib/libc/posix/telldir.c
--- newlib-1.17.0.orig/newlib/libc/posix/telldir.c	2008-11-27 22:01:40.000000000 +0100
+++ newlib-1.17.0/newlib/libc/posix/telldir.c	2009-12-17 13:51:54.000000000 +0100

+  nacljmp ecx
diff -uNr newlib-1.17.0.orig/newlib/libc/machine/x86_64/memcpy.S newlib-1.17.0/newlib/libc/machine/x86_64/memcpy.S
--- newlib-1.17.0.orig/newlib/libc/machine/x86_64/memcpy.S	2007-08-28 23:56:49.000000000 +0200
+++ newlib-1.17.0/newlib/libc/machine/x86_64/memcpy.S	2009-12-17 15:51:40.000000000 +0100
@@ -14,20 +14,25 @@
   SOTYPE_FUNCTION(memcpy)
 
