From owner-svn-src-stable@freebsd.org Sat Jan 9 18:19:20 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A9B4A69FC7; Sat, 9 Jan 2016 18:19:20 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5B771A3B; Sat, 9 Jan 2016 18:19:19 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u09IJJeA075422; Sat, 9 Jan 2016 18:19:19 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u09IJInU075421; Sat, 9 Jan 2016 18:19:18 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201601091819.u09IJInU075421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 9 Jan 2016 18:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293604 - stable/10/sys/amd64/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2016 18:19:20 -0000 Author: dchagin Date: Sat Jan 9 18:19:18 2016 New Revision: 293604 URL: https://svnweb.freebsd.org/changeset/base/293604 Log: MFC r284159: Futex is an aligned 32-bit integer. Use the proper instruction and operand when dereferencing futex pointer. Modified: stable/10/sys/amd64/linux/linux_support.s Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/linux/linux_support.s ============================================================================== --- stable/10/sys/amd64/linux/linux_support.s Sat Jan 9 18:17:58 2016 (r293603) +++ stable/10/sys/amd64/linux/linux_support.s Sat Jan 9 18:19:18 2016 (r293604) @@ -45,9 +45,9 @@ ENTRY(futex_xchgl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - xchgq %rdi,(%rsi) - movq %rdi,(%rdx) - xorq %rax,%rax + xchgl %edi,(%rsi) + movl %edi,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -60,9 +60,9 @@ ENTRY(futex_addl) #ifdef SMP lock #endif - xaddq %rdi,(%rsi) - movq %rdi,(%rdx) - xorq %rax,%rax + xaddl %edi,(%rsi) + movl %edi,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -72,16 +72,16 @@ ENTRY(futex_orl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - movq (%rsi),%rax -1: movq %rax,%rcx - orq %rdi,%rcx + movl (%rsi),%eax +1: movl %eax,%ecx + orl %edi,%ecx #ifdef SMP lock #endif - cmpxchgq %rcx,(%rsi) + cmpxchgl %ecx,(%rsi) jnz 1b - movq %rax,(%rdx) - xorq %rax,%rax + movl %eax,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -91,16 +91,16 @@ ENTRY(futex_andl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - movq (%rsi),%rax -1: movq %rax,%rcx - andq %rdi,%rcx + movl (%rsi),%eax +1: movl %eax,%ecx + andl %edi,%ecx #ifdef SMP lock #endif - cmpxchgq %rcx,(%rsi) + cmpxchgl %ecx,(%rsi) jnz 1b - movq %rax,(%rdx) - xorq %rax,%rax + movl %eax,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret @@ -110,15 +110,15 @@ ENTRY(futex_xorl) movq $VM_MAXUSER_ADDRESS-4,%rax cmpq %rax,%rsi ja futex_fault - movq (%rsi),%rax -1: movq %rax,%rcx - xorq %rdi,%rcx + movl (%rsi),%eax +1: movl %eax,%ecx + xorl %edi,%ecx #ifdef SMP lock #endif - cmpxchgq %rcx,(%rsi) + cmpxchgl %ecx,(%rsi) jnz 1b - movq %rax,(%rdx) - xorq %rax,%rax + movl %eax,(%rdx) + xorl %eax,%eax movq %rax,PCB_ONFAULT(%r8) ret