From owner-svn-src-all@FreeBSD.ORG Sat Oct 31 20:59:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B63B7106566B; Sat, 31 Oct 2009 20:59:13 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EE18FC13; Sat, 31 Oct 2009 20:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9VKxDxD002789; Sat, 31 Oct 2009 20:59:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9VKxDjG002787; Sat, 31 Oct 2009 20:59:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200910312059.n9VKxDjG002787@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Oct 2009 20:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198731 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 20:59:13 -0000 Author: nwhitehorn Date: Sat Oct 31 20:59:13 2009 New Revision: 198731 URL: http://svn.freebsd.org/changeset/base/198731 Log: Unbreak cpu_switch(). The register allocator in my brain is clearly broken. Also, Altivec context switching worked before only by accident, but should work now by design. Modified: head/sys/powerpc/aim/swtch.S Modified: head/sys/powerpc/aim/swtch.S ============================================================================== --- head/sys/powerpc/aim/swtch.S Sat Oct 31 19:22:12 2009 (r198730) +++ head/sys/powerpc/aim/swtch.S Sat Oct 31 20:59:13 2009 (r198731) @@ -99,17 +99,19 @@ ENTRY(cpu_switch) mr %r14,%r3 /* Copy the old thread ptr... */ mr %r15,%r4 /* and the new thread ptr in scratch */ mr %r16,%r5 /* and the new lock */ + mr %r17,%r6 /* and the PCB */ - lwz %r6,PCB_FLAGS(%r5) + lwz %r7,PCB_FLAGS(%r17) /* Save FPU context if needed */ - andi. %r6, %r6, PCB_FPU + andi. %r7, %r7, PCB_FPU beq .L1 bl save_fpu .L1: - lwz %r6,PCB_FLAGS(%r5) + mr %r3,%r14 /* restore old thread ptr */ + lwz %r7,PCB_FLAGS(%r17) /* Save Altivec context if needed */ - andi. %r6, %r6, PCB_VEC + andi. %r7, %r7, PCB_VEC beq .L2 bl save_vec