From owner-svn-src-all@FreeBSD.ORG Tue Jan 17 14:55:06 2012 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 C3EE81065676; Tue, 17 Jan 2012 14:55:06 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id EF9AA8FC08; Tue, 17 Jan 2012 14:55:05 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 317192A28CC2; Tue, 17 Jan 2012 15:55:05 +0100 (CET) Date: Tue, 17 Jan 2012 15:55:05 +0100 From: Ed Schouten To: Marius Strobl Message-ID: <20120117145505.GG95413@hoeg.nl> References: <201201121755.q0CHtMA2020344@svn.freebsd.org> <20120113000057.GA23960@alchemy.franken.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tcC6YSqBgqqkz7Sb" Content-Disposition: inline In-Reply-To: <20120113000057.GA23960@alchemy.franken.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r230025 - head/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: Tue, 17 Jan 2012 14:55:06 -0000 --tcC6YSqBgqqkz7Sb Content-Type: multipart/mixed; boundary="L+ofChggJdETEG3Y" Content-Disposition: inline --L+ofChggJdETEG3Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Marius, * Marius Strobl , 20120113 01:00: > Uhm, these are V8-specific, for V9 the C compiler frame size should > be 192 instead of 64 and the function alignment should be 32 instead > of 4 bytes (at least with GCC and US1-optimizations enabled as we > default to on sparc64), see . However, given that > these functions only seem to obtain new register window for > debugging purposes you probably alternatively could just remove > the saves and the corresponding restores completely. Any comments on the attached patch? Thanks, --=20 Ed Schouten WWW: http://80386.nl/ --L+ofChggJdETEG3Y Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="sparc.diff" Content-Transfer-Encoding: quoted-printable Index: modsi3.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modsi3.S (revision 230265) +++ modsi3.S (working copy) @@ -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 @@ -324,7 +324,6 @@ got_result: tst %g3 bge 1f - restore ! answer < 0 retl ! leaf-routine return neg %o3,%o0 ! remainder <- -%o3 Index: divmod.m4 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- divmod.m4 (revision 230265) +++ divmod.m4 (working copy) @@ -59,9 +59,6 @@ =20 #include "../assembly.h" =20 -.text - .align 4 - define(DEVELOP_QUOTIENT_BITS, ` !depth $1, accumulated bits $2 bl L.$1.eval(TWOSUPN+$2) @@ -84,12 +81,14 @@ ifelse( $1, 1, `9:') ') ifelse( ANSWER, `quotient', ` +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__udivsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,SIGN ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__divsi3) - save %sp,-64,%sp ! do this for debugging orcc divisor,dividend,%g0 ! are either dividend or divisor negative bge divide ! if not, skip this junk xor divisor,dividend,SIGN ! record sign of result in sign of SIGN @@ -104,12 +103,14 @@ neg dividend ! FALL THROUGH ',` +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__umodsi3) - save %sp,-64,%sp ! do this for debugging b divide mov 0,SIGN ! result always nonnegative +.text + .align 32 DEFINE_COMPILERRT_FUNCTION(__modsi3) - save %sp,-64,%sp ! do this for debugging orcc divisor,dividend,%g0 ! are either dividend or divisor negative bge divide ! if not, skip this junk mov dividend,SIGN ! record sign of result in sign of SIGN @@ -235,7 +236,6 @@ got_result: tst SIGN bge 1f - restore ! answer < 0 retl ! leaf-routine return ifelse( ANSWER, `quotient', Index: divsi3.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- divsi3.S (revision 230265) +++ divsi3.S (working copy) @@ -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 @@ -324,7 +324,6 @@ got_result: tst %g3 bge 1f - restore ! answer < 0 retl ! leaf-routine return neg %o2,%o0 ! quotient <- -%o2 --L+ofChggJdETEG3Y-- --tcC6YSqBgqqkz7Sb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJPFYvJAAoJEG5e2P40kaK7ZiYP+QHf/DB6spR/Fxhn6r52JOc1 7JM452dFYQfZM6FiQr3t7+u2yJwswq5ioySRCXUlFAAbSLtCM0K8l0yFNRpEh+gh uMS0/JCbjA4vvAtDeZVceCrmExoVR+tQ/r/bUUbPlKIDMEzWjtTi4uB/KhKkleGC i3BKpaL5PDnAxOzzz9EqnD250DNLm+GVohebaFbyt6QDO/tJADJJkR6EiWLpk2zg Ud1atyEEJy3Gt5++Npffv6uk4jly1xIqLvv/g3iXpH0murO8gdwu7v38UdOFTUWz PszwaO5rq2WzlqutXEef0U+1CieEzyXFYXA44kvW8q9wt4TWmjJxtaoqDYNPbC3k 61/shM17YZ4Th1k0RNt4eGGhLQnQJUo/WIIuL/4bqDmGNF+P1aAVBxqnDmGuXqCI BZGdZKQFdTFTPvyp6BGOvlBVEcnJu36JerzlR503AVfCaMXftz6533mae+H28oij KgALguNzIbe/saVzFxZ0YFjt+i/GKdsQolUrKC0ysrgbM93khWbIfYKiF2uUf2zW TeGgPB9Zjpi/0BGezgALRFEsLpA6JaR9YJrooUaUFp2jfUIZUkQEs3k9h076USW8 vAugEWlTCE3BX/gI5UW2aorZYcEpnPU4CrS63EQ0EWuVAdJ7pRksAl9kCdxHesfE 9GOF0eA8Z5qlx4UQscF4 =4kjK -----END PGP SIGNATURE----- --tcC6YSqBgqqkz7Sb--