Jason Moxham on Thu, 02 Jul 2009 17:02:12 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Pari 64bit on Windows

----- Original Message ----- From: "Bill Allombert" <Bill.Allombert@math.u-bordeaux1.fr>
To: <pari-dev@list.cr.yp.to>
Sent: Thursday, July 02, 2009 1:40 PM
Subject: Re: Pari 64bit on Windows

On Wed, Jul 01, 2009 at 11:10:16PM +0100, Jason Moxham wrote:
On Wednesday 01 July 2009 17:35:09 Bill Allombert wrote:
> On Wed, Jul 01, 2009 at 03:39:03PM +0100, Jason Moxham wrote:
> > Hi
> >
> > I've got Pari-svn running on Windows with/without GMP/MPIR in 64bit > > mode. > > This is with MSVC , and when MinGW/MSYS goes 64bit it will work with > > that
> > :) The main problem with Windows64 is that it uses a LLP data model
> > rather than the usual LP data model , this means that long's are 32 > > bit.
> > I'm doing this
> Is there no way to tell the compiler to use the LP model nevertheless ?

I'm afraid not , Microsoft has made the bed , and we have to lie in it :)

I do not have to lie in it. Sorry to insist on that point.

I should of said "I have to lie in it"

If there was , it presumably would only work for a statically linked exe with
NO external dependences (even libc)

Not really: we would be restricted to libc functions that does not use long arguments. But since we would have most of our data as 64bit, we would not be
able to use libc functions that deal with 32bit long integers anyway.
For example consider the function labs. This function takes a long integer and returns a long integer. If we were to apply your change to use paritemplong_t, this function would still take a long and not a paritemplong_t (a long long) so
we would need to change labs to llabs.

Yes , I forgot to mention this , and of course printf() etc, I assuming that there are not many of these , and at a quick look this appears so.

 In the LP model, we would still be
allowed to call llabs((long long) x) so it would still be far less trouble.

Yes , but we dont have that choice for Win64 , all present compilers for Win64 are LLP , and as far as I can make out there are no plans for a LP compiler.

The LLP model make much of the traditional C library useless for 64bit objects.

I agree

Secondly, MS could provide a libc built for the LP model.

They could , but I can't see that happening anytime soon.