Why does V8 in Node.js 0.12.0 release require SSE2 CPU instructions?

帅比萌擦擦* 提交于 2019-12-23 07:43:13

问题


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).

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.

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.


回答1:


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.

Do this:

./configure –dest-cpu=ia32

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

'v8_target_arch': 'x87',

Run make.

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

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



来源:https://stackoverflow.com/questions/29066734/why-does-v8-in-node-js-0-12-0-release-require-sse2-cpu-instructions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!