From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: Windows 64 port Date: Thu, 1 Mar 2012 21:05:51 +0100 Message-ID: References: <20120219211800.0000558f@unknown> <834numv7js.fsf@gnu.org> <83ty2ltep0.fsf@gnu.org> <4F4EEBC2.5070704@cs.ucla.edu> <4F4F3A1A.4020808@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00151740169cd1084c04ba33fd54 X-Trace: dough.gmane.org 1330632390 7768 80.91.229.3 (1 Mar 2012 20:06:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Mar 2012 20:06:30 +0000 (UTC) Cc: Eli Zaretskii , ajmr@ilovetortilladepatatas.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 01 21:06:29 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S3CGh-00047Y-Ug for ged-emacs-devel@m.gmane.org; Thu, 01 Mar 2012 21:06:28 +0100 Original-Received: from localhost ([::1]:42514 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3CGh-0006gG-9B for ged-emacs-devel@m.gmane.org; Thu, 01 Mar 2012 15:06:27 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51555) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3CGc-0006ck-Pf for emacs-devel@gnu.org; Thu, 01 Mar 2012 15:06:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S3CGX-0002Ju-Qw for emacs-devel@gnu.org; Thu, 01 Mar 2012 15:06:22 -0500 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:47564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S3CGU-0002Iv-AW; Thu, 01 Mar 2012 15:06:14 -0500 Original-Received: by bkwq16 with SMTP id q16so1114704bkw.0 for ; Thu, 01 Mar 2012 12:06:11 -0800 (PST) Received-SPF: pass (google.com: domain of fabrice.popineau@gmail.com designates 10.205.129.137 as permitted sender) client-ip=10.205.129.137; Authentication-Results: mr.google.com; spf=pass (google.com: domain of fabrice.popineau@gmail.com designates 10.205.129.137 as permitted sender) smtp.mail=fabrice.popineau@gmail.com; dkim=pass header.i=fabrice.popineau@gmail.com Original-Received: from mr.google.com ([10.205.129.137]) by 10.205.129.137 with SMTP id hi9mr3472977bkc.131.1330632371416 (num_hops = 1); Thu, 01 Mar 2012 12:06:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=OADckAAFtJTp9h/2NJanqgOFDk2+wJvso4sQyEk3mNA=; b=F9jx/DuASXSuRMftWyufHcNIjdoxxh7e5VUhfTyM9Oe0X9FYTDFJK+AvwS192tafwU MGM0TSMhF0cBK58V3HtCAUrPhzCmZKPwVIaNbcLP5O8qdYAVwamsUKvMEYG7/BNd4HXY hv45l4k1O8BncDKXFUnR+9OEGCsrWgB6HhB7rLmMdxLJI9JsgwkWN6m0ws8Zsw99e5YM 4VguFY+/Lo/ev+lKyqajxt0THIfkbU5T0e2wmkcP1Vbk1F4/LOer4ntwfOHDD2S8Xthz dgJmLQmS/PNMRxluee7OM0qXrcwFhtIcLzyKp/vpacer9kD2V7pe3c46ypc37K2BRxC1 RpJA== Original-Received: by 10.205.129.137 with SMTP id hi9mr2797450bkc.131.1330632371275; Thu, 01 Mar 2012 12:06:11 -0800 (PST) Original-Received: by 10.204.60.3 with HTTP; Thu, 1 Mar 2012 12:05:51 -0800 (PST) In-Reply-To: <4F4F3A1A.4020808@cs.ucla.edu> X-Google-Sender-Auth: gftxIoYfxsoVMCHEsLCxLg4P9BY X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148864 Archived-At: --00151740169cd1084c04ba33fd54 Content-Type: text/plain; charset=ISO-8859-1 > > > Here is a more-detailed review of the latest patch you sent. > > > > > - int i = 0, aligned = (intptr_t) ABLOCKS_BUSY (abase); > > > + int i = 0, aligned = (ABLOCKS_BUSY (abase) != NULL); > > > > Not needed for Windows 64. The change slows the code down a bit, and > > > > > > Prove it. > > I compiled it both ways (x86-64 GCC 4.6.2), and the "!= NULL" version > has an extra "cmpl" instruction, so it is indeed a bit fatter. > > Just for fun : version with != NULL : ; Line 1156 xor edx, edx test rax, rax lea rcx, OFFSET FLAT:free_ablock setne dl add rdx, 15 shl rdx, 10 add rdx, rdi version without it : ; Line 1156 xor edx, edx lea rcx, OFFSET FLAT:free_ablock cmp DWORD PTR [rdi+1016], edx setne dl add rdx, 15 shl rdx, 10 add rdx, rdi cmp on one side, test on the other side. Fabrice --00151740169cd1084c04ba33fd54 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> =A0 =A0 Here is a more-detailed review of the latest patch you sent.<= br> >
> =A0 =A0 > - =A0 =A0 =A0int i =3D 0, aligned =3D (intptr_t) ABLOCKS_= BUSY (abase);
> =A0 =A0 > + =A0 =A0 =A0int i =3D 0, aligned =3D (ABLOCKS_BUSY (abas= e) !=3D NULL);
>
> =A0 =A0 Not needed for Windows 64. =A0The change slows the code down a= bit, and
>
>
> Prove it.

I compiled it both ways (x86-64 GCC 4.6.2), and the "!=3D NULL&q= uot; version
has an extra "cmpl" instruction, so it is indeed a bit fatter.

=A0
Just for fun :<= /div>

version with !=3D NULL :

= ; Line 1156
xor edx, edx
test<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> rax, rax
le= a rcx, OFFS= ET FLAT:free_ablock
setne= dl
add rdx, 15
shl rdx, 10
add<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> rdx, rdi

version without it :

; Line 11= 56
xor edx,= edx
lea rcx, OFFSET = FLAT:free_ablock
cmp DWORD PTR [rdi+1016], edx
setne= dl
add rdx, 15
shl rdx, 10
add<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> rdx, rdi

cmp on one side, test on the other side.

=
Fabrice
--00151740169cd1084c04ba33fd54--