From owner-p4-projects@FreeBSD.ORG Fri Aug 21 19:28:09 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 01CBA106568D; Fri, 21 Aug 2009 19:28:09 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA70F106568C for ; Fri, 21 Aug 2009 19:28:08 +0000 (UTC) (envelope-from stas@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A956D8FC12 for ; Fri, 21 Aug 2009 19:28:08 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7LJS8ps076338 for ; Fri, 21 Aug 2009 19:28:08 GMT (envelope-from stas@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7LJS8TD076336 for perforce@freebsd.org; Fri, 21 Aug 2009 19:28:08 GMT (envelope-from stas@freebsd.org) Date: Fri, 21 Aug 2009 19:28:08 GMT Message-Id: <200908211928.n7LJS8TD076336@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to stas@freebsd.org using -f From: Stanislav Sedov To: Perforce Change Reviews Cc: Subject: PERFORCE change 167580 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2009 19:28:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=167580 Change 167580 by stas@stas_yandex on 2009/08/21 19:27:33 - Restore registers in syscall handler. Affected files ... .. //depot/projects/valgrind/coregrind/m_syswrap/syscall-amd64-freebsd.S#8 edit Differences ... ==== //depot/projects/valgrind/coregrind/m_syswrap/syscall-amd64-freebsd.S#8 (text+ko) ==== @@ -73,7 +73,7 @@ /* from vki_arch.h */ #define VKI_SIG_SETMASK 3 - + .globl ML_(do_syscall_for_client_WRK) ML_(do_syscall_for_client_WRK): /* save callee-saved regs */ @@ -102,7 +102,7 @@ jb 7f /* sigprocmask failed */ /* OK, that worked. Now do the syscall proper. */ - + /* 6 register parameters */ movq -16(%rbp), %r11 /* r11 = VexGuestAMD64State * */ movq OFFSET_amd64_RDI(%r11), %rdi @@ -150,7 +150,7 @@ movq $__NR_sigprocmask, %rax // syscall # movq $VKI_SIG_SETMASK, %rdi // how - movq %rcx, %rsi // postmask + movq -32(%rbp), %rsi // postmask xorq %rdx, %rdx // NULL syscall @@ -158,13 +158,23 @@ 5: /* now safe from signals */ - xor %rax,%rax + xorq %rax,%rax + movq -8(%rbp), %rdi + movq -16(%rbp), %rsi + movq -24(%rbp), %rdx + movq -32(%rbp), %rcx + movq -40(%rbp), %r8 movq %rbp, %rsp popq %rbp ret 7: /* failure: return 0x8000 | error code */ orq $0x8000, %rax + movq -8(%rbp), %rdi + movq -16(%rbp), %rsi + movq -24(%rbp), %rdx + movq -32(%rbp), %rcx + movq -40(%rbp), %r8 movq %rbp, %rsp popq %rbp ret