Hi all,

I'm working on a project that tries to use V8 as a js engine on
multiple platforms.

I was able to compile and run app with V8 on WinCE. V8 was compiled
with modified projects with visual studio 2005 without many problems.
Some of the sources needed to be changed too, like platform_win32.cc
and cpu_arm.cc function CPU::FlushICache(), which I implemented with
FlushInstructionCache(GetCurrentProcess(), start, size); API call. So
far so good. Even some pretty complex scripts run without any
problems.

Except ...

Simple script:

var x = 7;
var z = x * 0.1;

Generates exception 0xC0000001D in host application.

After some investigation I found that this happens due to the code
generated in function HandleBinaryOpSlowCases (codegen_arm.cc). Line
in question is:

  __ stc(p1, cr8, MemOperand(r5, HeapNumber::kValueOffset));

It tries to emit stc (store from coprocessor to memory) instruction
which is (obviously) not supported on my arm. Machine in question has
MTK ARM11 @ 468MHz and runs Microsoft Windows CE version 5.0. This one
obviously doesn't have fp coprocessor, like many others.

Something else seems to be broken too. Actual multiplication ends up
in mul_two_doubles(x,y) (assembler.cc). But in this particular case
parameters are not correct. Instead of 7.0, x is 0.0.

Is there any solution to this, or I'm doing something wrong?

BTW. As far as I can tell __ stc is used only in this place and
nowhere else.

Any help is highly appreciated.

Thanks,

-mvv.

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to