[Vm-dev] ARM Cog progress
Ryan Macnak
rmacnak at gmail.com
Wed Jun 10 05:58:41 UTC 2015
On Tue, Jun 9, 2015 at 8:36 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:
>
> Hi Ryan,
>
> IMO the likely issue is register usage in trampoline calls. The JIT
> tries to reduce register saving and restoring across trampoline calls by
> using a notion of the ABI's caller-saved registers. Callee-saved registers
> shouldn't be an issue because either a run-time call returns to the same
> trampoline that invoked it, hence restoring callee-saved registers, or
> enters machine code via an enlopmart which assumes no registers are live
> and restores any and all registers as appropriate. But there could be bugs
> here, and certainly gcc could change over versions, perhaps becoming more
> aggressive in register saving, and surfacing previously undetected bugs
> here.
>
I've been using the same compiler versions though, did this change recently
in Cog?
The runtime entries should be marked "extern". Compare a VM that works at
-O3.
<https://github.com/dart-lang/sdk/blob/6542a451c38c650a5ce9323e474982384a5daf31/runtime/vm/runtime_entry.h#L67>
Some quick and dirty sed hacking and this partially fixes NSVM on clang 3.4
(can now complete the test suite without crashing about half of the time).
find ns*src -name '*.c' -o -name '*.h' -print0 | xargs -0 sed -i '' -e
's/void ce/extern void ce/'
find ns*src -name '*.c' -o -name '*.h' -print0 | xargs -0 sed -i '' -e
's/void (\*ce/extern void (\*ce/'
find ns*src -name '*.c' -o -name '*.h' -print0 | xargs -0 sed -i '' -e
's/sqInt ce/extern sqInt ce/'
find ns*src -name '*.c' -o -name '*.h' -print0 | xargs -0 sed -i '' -e
's/VM_EXPORT extern/extern/'
find ns*src -name '*.c' -o -name '*.h' -print0 | xargs -0 sed -i '' -e
's/static extern/static/'
find ns*src -name '*.c' -o -name '*.h' -print0 | xargs -0 sed -i '' -e
's/extern sqInt cesoRetAddr/sqInt cesoRetAddr/'
One thing to do is compare a StackInterpreter VM against Cog, at least to
> locate the blame.
The stack VM is fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150609/822257f1/attachment.htm
More information about the Vm-dev
mailing list