From owner-svn-src-all@FreeBSD.ORG Fri May 25 15:16:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48050106566C; Fri, 25 May 2012 15:16:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32D438FC0C; Fri, 25 May 2012 15:16:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4PFGfMN017713; Fri, 25 May 2012 15:16:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4PFGf6P017710; Fri, 25 May 2012 15:16:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205251516.q4PFGf6P017710@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 May 2012 15:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236003 - stable/9/contrib/compiler-rt/lib/sparc64 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: Fri, 25 May 2012 15:16:41 -0000 Author: marius Date: Fri May 25 15:16:40 2012 New Revision: 236003 URL: http://svn.freebsd.org/changeset/base/236003 Log: MFC: r235389 Regenerate after r235388 (MFC'ed to stable/9 in r236002). Modified: stable/9/contrib/compiler-rt/lib/sparc64/divsi3.S stable/9/contrib/compiler-rt/lib/sparc64/modsi3.S Directory Properties: stable/9/contrib/compiler-rt/ (props changed) Modified: stable/9/contrib/compiler-rt/lib/sparc64/divsi3.S ============================================================================== --- stable/9/contrib/compiler-rt/lib/sparc64/divsi3.S Fri May 25 15:15:25 2012 (r236002) +++ stable/9/contrib/compiler-rt/lib/sparc64/divsi3.S Fri May 25 15:16:40 2012 (r236003) @@ -47,13 +47,13 @@ */ #include "../assembly.h" .text - .align 4 + .align 32 DEFINE_COMPILERRT_FUNCTION(__udivsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,%g3 ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__divsi3) - save %sp,-64,%sp ! do this for debugging orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative bge divide ! if not, skip this junk xor %o1,%o0,%g3 ! record sign of result in sign of %g3 @@ -126,8 +126,8 @@ do_single_div: nop sub %o3,%o5,%o3 mov 1,%o2 - b end_single_divloop - nop + b,a end_single_divloop + ! EMPTY single_divloop: sll %o2,1,%o2 bl 1f @@ -144,8 +144,8 @@ single_divloop: deccc %g2 bge single_divloop tst %o3 - b end_regular_divide - nop + b,a end_regular_divide + ! EMPTY not_really_big: 1: sll %o5,4,%o5 @@ -317,17 +317,14 @@ end_regular_divide: deccc %o4 bge divloop tst %o3 - bge got_result - nop - ! non-restoring fixup here + bl,a got_result + ! non-restoring fixup if remainder < 0, otherwise annulled dec %o2 got_result: tst %g3 - bge 1f - restore - ! answer < 0 - retl ! leaf-routine return - neg %o2,%o0 ! quotient <- -%o2 + bl,a 1f + ! negate for answer < 0, otherwise annulled + neg %o2,%o2 ! %o2 <- -%o2 1: retl ! leaf-routine return mov %o2,%o0 ! quotient <- %o2 Modified: stable/9/contrib/compiler-rt/lib/sparc64/modsi3.S ============================================================================== --- stable/9/contrib/compiler-rt/lib/sparc64/modsi3.S Fri May 25 15:15:25 2012 (r236002) +++ stable/9/contrib/compiler-rt/lib/sparc64/modsi3.S Fri May 25 15:16:40 2012 (r236003) @@ -47,13 +47,13 @@ */ #include "../assembly.h" .text - .align 4 + .align 32 DEFINE_COMPILERRT_FUNCTION(__umodsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,%g3 ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__modsi3) - save %sp,-64,%sp ! do this for debugging orcc %o1,%o0,%g0 ! are either %o0 or %o1 negative bge divide ! if not, skip this junk mov %o0,%g3 ! record sign of result in sign of %g3 @@ -126,8 +126,8 @@ do_single_div: nop sub %o3,%o5,%o3 mov 1,%o2 - b end_single_divloop - nop + b,a end_single_divloop + ! EMPTY single_divloop: sll %o2,1,%o2 bl 1f @@ -144,8 +144,8 @@ single_divloop: deccc %g2 bge single_divloop tst %o3 - b end_regular_divide - nop + b,a end_regular_divide + ! EMPTY not_really_big: 1: sll %o5,4,%o5 @@ -317,17 +317,14 @@ end_regular_divide: deccc %o4 bge divloop tst %o3 - bge got_result - nop - ! non-restoring fixup here + bl,a got_result + ! non-restoring fixup if remainder < 0, otherwise annulled add %o3,%o1,%o3 got_result: tst %g3 - bge 1f - restore - ! answer < 0 - retl ! leaf-routine return - neg %o3,%o0 ! remainder <- -%o3 + bl,a 1f + ! negate for answer < 0, otherwise annulled + neg %o3,%o3 ! %o3 <- -%o3 1: retl ! leaf-routine return mov %o3,%o0 ! remainder <- %o3