Building for 64-bit OS

9 views
Skip to first unread message

anthony....@gmail.com

unread,
Sep 29, 2008, 3:54:58 PM9/29/08
to v8-users
Hi,
I am the lead dev for FreeSWITCH http://www.freeswitch.org

I was playing around with the v8 code today and I noticed it forces -
m32 into any build on a 64 bit machine.
I disabled that check so I can see why and noticed it's actually
covering up several 32 bit assumptions such as being able to cast a
pointer into and int etc..

A few of them look easy enough to fix because they are just error
printfs but some other ones probably would need a bit more
understanding of the repercussions to fix.

Are there plans to fix that so the code can build properly on 64
bit? It's a pretty big limitation to not be able to link against it
when the rest of your code is 64 bit compat.



Jey Kottalam

unread,
Sep 29, 2008, 4:03:44 PM9/29/08
to v8-u...@googlegroups.com
On Mon, Sep 29, 2008 at 12:54 PM, <anthony....@gmail.com> wrote:
>
> Are there plans to fix that so the code can build properly on 64
> bit? It's a pretty big limitation to not be able to link against it
> when the rest of your code is 64 bit compat.
>

I think the V8 code generator only supports ia32 and ARM targets, and
there is no support in the code generator for x86-64 nor an
interpreted mode.

-Jey Kottalam

Simon Ask Ulsnes

unread,
Sep 29, 2008, 5:58:24 PM9/29/08
to v8-u...@googlegroups.com
Also, and I don't think this is an official standpoint, but I've heard
prominent figures within the V8/Chromium teams express reluctance to
support x86-64 code generation anytime soon, since it would roughly
double the amount of memory needed for V8 applications (it uses *a
lot* of pointers), and is not currently necessary to support at all,
since all major operating systems for x86-64 CPUs can run x86 code
just fine.

Look into your heart and ask yourself the question: Am I wanting to
compile V8 for x86-64 for any other reason than vanity, pride, and
cosmetics? ;-)

Joking aside, it would be "nice" with a native x86-64 version of V8,
but I don't believe it's a priority for the Google teams. V8 is open
source, however, so if you feel like it, I'm sure it would be
considered a very valuable addition to the code base. :-)

Sincerely,
Simon

2008/9/29 Jey Kottalam <jeyko...@gmail.com>:

Morgain...@googlemail.com

unread,
Oct 9, 2008, 6:08:55 PM10/9/08
to v8-users
If V8 devs have good technical reasons why V8 should not run in 64-bit
mode (double the pointer size is a pretty flimsy reason, since the
vast majority of Javascript programs are too small for it to matter),
then that's fine. However, this is not a good reason for abandoning
everyone whose applications are 64-bit for solid technical reasons,
eg. thousands of scientific programmers, but who still want to run V8
for their scripting.

If V8 isn't going to be made available in a 64-bit version, then at
the very least a compatibility or 32-bit emulation/interfacing library
should be created, so that 64-bit applications can run with 32-bit V8
in some way other than by direct linkage.

Morgaine.

Pete Gontier

unread,
Oct 9, 2008, 9:06:43 PM10/9/08
to v8-u...@googlegroups.com
I doubt the V8 tail will ever wag the Chrome dog.


Pete Gontier <http://pete.gontier.org/>


Morgain...@googlemail.com

unread,
Oct 11, 2008, 1:59:32 AM10/11/08
to v8-users
But the tail is allowed to wag independently for 20% of the day at
Google. ;-)

Morgaine.

Pete Gontier

unread,
Oct 11, 2008, 2:45:40 PM10/11/08
to v8-u...@googlegroups.com
On Oct 9, 2008, at 6:06 PM, Pete Gontier wrote:

I doubt the V8 tail will ever wag the Chrome dog.

On Oct 10, 2008, at 10:59 PM, Morgain...@googlemail.com wrote:

But the tail is allowed to wag independently for 20% of the day at Google. ;-)

It's conceivable, though "independently" isn't the word I would use. The bottom line is that there would need to be something resembling a business reason to add 64-bit support to V8. If there is one, you and I are not in a position to know what it is (though obviously we could speculate). In fact, if any such reason does exist, I expect it has little if anything to do with you and I.


Pete Gontier <http://pete.gontier.org/>

Feng Qian

unread,
Oct 16, 2008, 12:04:00 PM10/16/08
to v8-u...@googlegroups.com
You missed most complicated part of porting V8 to 64-bit platform:
garbage collection.

During GC, pointers are encoded using 32-bit address. To make V8 work on 64-bit,
there might be fair amount of work to get GC right.

We'd like to see V8 run on more platforms, but limited by the time and
energy, we can
only support 32-bit and ARM at moment.

Simon Ask Ulsnes

unread,
Oct 16, 2008, 2:59:39 PM10/16/08
to v8-u...@googlegroups.com
Adding to that, there is also a fair amount of 32-bit assumptions in
the code (such as the assumption that sizeof(int) == sizeof(void*)),
which aren't guaranteed to hold on 64-bit platforms. Fixing these may
turn out to be easy, or it may turn out to require a major
restructuring (I certainly hope not).

Feng, or anyone from the V8 or Chromium team, what's your gut feeling
about this?

- Simon

2008/10/16 Feng Qian <fe...@chromium.org>:

Reply all
Reply to author
Forward
0 new messages