为什么Node.js 0.12.0版本中的V8需要SSE2 CPU指令? [英] Why does V8 in Node.js 0.12.0 release require SSE2 CPU instructions?

查看:117
本文介绍了为什么Node.js 0.12.0版本中的V8需要SSE2 CPU指令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将Node.js从0.10.x升级到0.12.0.注意到的第一件事是,我收到一个错误消息,说我的CPU不支持SSE2指令(实际上不支持).

Trying to upgrade Node.js from 0.10.x to 0.12.0. The first thing noticed is that I am getting an error that SSE2 instructions are not supported by my CPU (indeed they are not).

试图从源代码编译Node.js,但由于相同的原因而失败.在deps/v8/src/ia32/assembler-ia32.cc中有一行说明

Tried to compile Node.js from sources but it failed for the same reason. In deps/v8/src/ia32/assembler-ia32.cc there is a line stating

CHECK(cpu.has_sse2());  // SSE2 support is mandatory.

我想知道是否有一种方法可以摆脱Node.js 0.10.x中不需要的SSE2依赖关系.仅注释掉此行无济于事,它会在制作过程中引发Illegal instruction错误.

I wonder if there is a way to get rid of this SSE2 dependency which was not required in Node.js 0.10.x. Just commenting out this line does not help, it throws an Illegal instruction error during make process.

推荐答案

此演示文稿的幻灯片14中:

From slide 14 of this presentation: V8 engine of Node.js on IA: JavaScript-JITTED x86 machine code mapping profiling support and X87 Quark processor enabling

您需要从源代码进行编译.

You'll need to compile from sources.

执行此操作:

./configure –dest-cpu=ia32

并将此行添加到 config.gypi 文件中的选项中:

And add this line to the options in config.gypi file:

'v8_target_arch': 'x87',

运行make.

该CPU基本上有V8端口,与旧奔腾(i586)的指令集相同.

Basically there is port of V8 to this CPU, it's with the instruction set of old Pentiums (i586).

它适用于Node v5.11.0和CPU AMD Geode LX800 .

It works for me with Node v5.11.0 and CPU AMD Geode LX800.

这篇关于为什么Node.js 0.12.0版本中的V8需要SSE2 CPU指令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆