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, 22 Mar 2012 19:29:10 +0100 Message-ID: References: <20120219211800.0000558f@unknown> <834numv7js.fsf@gnu.org> <83ty2ltep0.fsf@gnu.org> <4F4EEBC2.5070704@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015175d03d2bb6c1e04bbd916b6 X-Trace: dough.gmane.org 1332441003 3777 80.91.229.3 (22 Mar 2012 18:30:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Mar 2012 18:30:03 +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 22 19:29:55 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 1SAmlm-0007Sy-Gy for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2012 19:29:54 +0100 Original-Received: from localhost ([::1]:42268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAmll-0006lG-TZ for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2012 14:29:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAmlf-0006k1-02 for emacs-devel@gnu.org; Thu, 22 Mar 2012 14:29:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SAmlY-0003Ri-I0 for emacs-devel@gnu.org; Thu, 22 Mar 2012 14:29:46 -0400 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:35966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SAmlR-0003QE-D5; Thu, 22 Mar 2012 14:29:33 -0400 Original-Received: by bkwq16 with SMTP id q16so2465272bkw.0 for ; Thu, 22 Mar 2012 11:29:30 -0700 (PDT) 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=AYeDn4okJIyDW2JRp/DLl4hOcglvN7SyipxgWPMZSMo=; b=LWZnVa6P1o67A9qBitEmV9H+kc5qSB/ceFGmUlA1A/SZqkPsiMYb3N+VD7/v5F2xEy C1UqJNpDFPNtBDMj67RlXK7lDjrT0tkTKXVLClxhplIm2+2nNdJw0PyIW0kOMEIXcRf1 01V0SpZJ/xwq/fedZoaJU0aQL3R+3ktNDVr8DrNWXiutN8qlT7p15vwfHycFK3Zq7HAD 3DyeH/LiUvaCJ3Cl44+M/mj4lxolB688dsu0i4ReENhJJePkx9GDnG5Z5GJgxADEs/ad 961IgebyXctnk+LUORqxSF1JlDApULbI8qPZhzWGTyvBV8bFC0G0SVtosyRyJuOY1B7S Nx1Q== Original-Received: by 10.204.154.28 with SMTP id m28mr3430457bkw.102.1332440970521; Thu, 22 Mar 2012 11:29:30 -0700 (PDT) Original-Received: by 10.204.179.143 with HTTP; Thu, 22 Mar 2012 11:29:10 -0700 (PDT) In-Reply-To: <4F4EEBC2.5070704@cs.ucla.edu> X-Google-Sender-Auth: Hf5uMYQC-IlR4KTlAFeZAdpZPkU 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:149178 Archived-At: --0015175d03d2bb6c1e04bbd916b6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2012/3/1 Paul Eggert > > =3D=3D=3D modified file 'src/m/amdx86-64.h' > > --- src/m/amdx86-64.h 2012-01-19 07:21:25 +0000 > > +++ src/m/amdx86-64.h 2012-02-28 07:00:30 +0000 > > @@ -17,7 +17,13 @@ > > You should have received a copy of the GNU General Public License > > along with GNU Emacs. If not, see . */ > > > > -#define BITS_PER_LONG 64 > > +#ifdef _WIN64 > > +# define BITS_PER_LONG 32 > > +# define BITS_PER_LONG_LONG 64 > > +#else > > +# define BITS_PER_LONG 64 > > +#endif > > Since this stuff is normally defined by 'configure', it should be put > into nt/config.nt rather than into a src/m/* file; there shouldn't be > a need to use or to modify src/m/amdx86-64.h. Similarly for the other > changes to src/m/amdx86-64.h. I don't see how that file is used under > Windows 64; but if it is, we should fix that, and not change the file. > I used this file instead of src/m/i386.h because it seemed to have this purpose of holding machine dependent constants. I could probably put this stuff into config.nt, but in this case I wonder what is the purpose of the m/ directory? Surely, every other architecture could also rely on configure to guess the right values? By the way, this is what I have currently : =3D=3D=3D modified file 'src/m/amdx86-64.h' --- src/m/amdx86-64.h 2012-01-19 07:21:25 +0000 +++ src/m/amdx86-64.h 2012-02-28 07:00:30 +0000 @@ -17,7 +17,13 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#define BITS_PER_LONG 64 +#ifdef _WIN64 +# define BITS_PER_LONG 32 +# define BITS_PER_LONG_LONG 64 +#else +# define BITS_PER_LONG 64 +#endif + #define BITS_PER_EMACS_INT 64 /* Now define a symbol for the cpu type, if your compiler @@ -27,9 +33,17 @@ /* __x86_64 defined automatically. */ /* Define the type to use. */ -#define EMACS_INT long -#define pI "l" -#define EMACS_UINT unsigned long +#ifdef _WIN64 +# define EMACS_INT __int64 +# define EMACS_UINT unsigned __int64 +# define pI "ll" +# define VIRT_ADDR_VARIES +# define DATA_START get_data_start () +#else +# define EMACS_INT long +# define pI "l" +# define EMACS_UINT unsigned long +#endif /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ #undef DATA_SEG_BITS --=20 Fabrice Popineau ----------------------------- SUPELEC D=E9partement Informatique 3, rue Joliot Curie 91192 Gif/Yvette Cedex Tel direct : +33 (0) 169851950 Standard : +33 (0) 169851212 ------------------------------ --0015175d03d2bb6c1e04bbd916b6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2012/3/1 Paul Eggert &= lt;eggert@cs.ucla.edu><= br>
> =3D=3D=3D modified file 'src/m/amdx86-64.h'
> --- src/m/amdx86-64.h 2012-01-19 07:21:25 +0000
> +++ src/m/amdx86-64.h 2012-02-28 07:00:30 +0000
> @@ -17,7 +17,13 @@
> =A0You should have received a copy of the GNU Genera= l Public License
> =A0along with GNU Emacs. =A0If not, see <http://www.gnu.org/licenses/>. =A0*= /
>
> -#define BITS_PER_LONG =A0 =A0 =A0 =A0 =A0 64
> +#ifdef _WIN64
> +# define BITS_PER_LONG =A0 =A0 =A0 =A0 =A0 32
> +# define BITS_PER_LONG_LONG =A0 =A0 =A064
> +#else
> +# define BITS_PER_LONG =A0 =A0 =A0 =A0 =A0 64
> +#endif

Since this stuff is normally defined by 'configure', it should be p= ut
into nt/config.nt rather than into a src/m/* file; there shouldn't be a need to use or to modify src/m/amdx86-64.h. =A0Similarly for the other changes to src/m/amdx86-64.h. =A0I don't see how that file is used unde= r
Windows 64; but if it is, we should fix that, and not change the file.
<= /div>

I used this file instead of src/m/i3= 86.h because it seemed to have this purpose of
holding machine dependen= t constants. I could probably put this stuff into config.nt,
but in this case I wonder what is the purpose of the m/ directory? Sur= ely, every
other architecture could also rely on configure to gue= ss the right values?

By the way, this is w= hat I have currently :

=3D=3D=3D modified file 'src/m/amdx86-64.h'= ;
--- src/m/amdx86-64.h =A0 2012-01-19 07:21:25 +0000
+= ++ src/m/amdx86-64.h =A0 2012-02-28 07:00:30 +0000
@@ -17,7 +17,1= 3 @@
=A0You should have received a copy of the GNU General Public License
=A0along with GNU Emacs. =A0If not, see <http://www.gnu.org/licenses/>. =A0*/
-#define BITS_PER_LONG =A0 =A0 =A0 =A0 =A0 64
+#ifdef _WIN64=
+# define BITS_PER_LONG =A0 =A0 =A0 =A0 =A0 32
+# defi= ne BITS_PER_LONG_LONG =A0 =A0 =A064
+#else
+# define BI= TS_PER_LONG =A0 =A0 =A0 =A0 =A0 64
+#endif
+
=A0#define BITS_PER_EMACS_INT =A0 =A0 = =A064

=A0/* Now define a symbol for the cpu type, = if your compiler
@@ -27,9 +33,17 @@
=A0/* __x86_64 defi= ned automatically. =A0*/

=A0/* Define the type to use. =A0*/
-#define = EMACS_INT =A0 =A0 =A0 =A0 =A0 =A0 =A0 long
-#define pI =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "l"
-#define EMACS_UINT= =A0 =A0 =A0 =A0 =A0 =A0 =A0unsigned long
+#ifdef _WIN64
+# define EMACS_INT =A0 =A0 =A0 =A0 =A0 =A0 =A0 __= int64
+# define EMACS_UINT =A0 =A0 =A0 =A0 =A0 =A0 =A0unsigned __= int64
+# define pI =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"l= l"
+# define VIRT_ADDR_VARIES
+# define DATA_START =A0 =A0get_data_start ()
+#else
+# define EMACS_INT =A0 =A0 =A0 =A0 =A0 =A0 =A0 long
+# define= pI =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"l"
+# defin= e EMACS_UINT =A0 =A0 =A0 =A0 =A0 =A0 =A0unsigned long
+#endif

=A0/* Define XPNTR to avoid or'in= g with DATA_SEG_BITS */
=A0#undef DATA_SEG_BITS
<= br>
--
Fabrice Popineau
-----------------------------
SUPELEC
D=E9partement Informatique
3, rue Joliot Curie<= /div>
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
---------------------------= ---


--0015175d03d2bb6c1e04bbd916b6--