From owner-svn-src-all@freebsd.org Thu Jul 16 05:13:09 2015 Return-Path: Delivered-To: svn-src-all@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 04F509A3C00; Thu, 16 Jul 2015 05:13:09 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 E92471606; Thu, 16 Jul 2015 05:13:08 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6G5D8uM093356; Thu, 16 Jul 2015 05:13:08 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6G5D8iZ093355; Thu, 16 Jul 2015 05:13:08 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201507160513.t6G5D8iZ093355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 16 Jul 2015 05:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285620 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 16 Jul 2015 05:13:09 -0000 Author: jhibbits Date: Thu Jul 16 05:13:08 2015 New Revision: 285620 URL: https://svnweb.freebsd.org/changeset/base/285620 Log: Fix userland program exception handling for powerpc64. It appears that the linker will not handle 64-bit relocations at addresses that are not aligned to 8-byte boundaries. Prior to this change the line: .llong generictrap was aligned to a 4-byte address, and the linker replaced that with an 8-byte 0x0. Aligning that address to 8 bytes caused the linker to generate the proper relocation. As a follow-through, the dblow from trap_subr33.S used the code sequence 'lwz %r1, TRAP_GENTRAP(0)', so this reproduces the analogue of that for 64-bit. Modified: head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Thu Jul 16 04:15:22 2015 (r285619) +++ head/sys/powerpc/aim/trap_subr64.S Thu Jul 16 05:13:08 2015 (r285620) @@ -842,11 +842,7 @@ CNAME(dblow): mflr %r1 /* save LR */ mtsprg2 %r1 /* And then in SPRG2 */ - nop /* Begin branching to generictrap */ - bl 9f - .llong generictrap -9: mflr %r1 - ld %r1,0(%r1) + ld %r1, TRAP_GENTRAP(0) /* Get branch address */ mtlr %r1 li %r1, 0 /* How to get the vector from LR */ blrl /* Branch to generictrap */