[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] CogVM source as per VMMaker.oscog-eem.2502 (f954a91)
Ken.Dickey
Ken.Dickey at whidbey.com
Sun Jan 6 21:57:17 UTC 2019
..
> > v8 is a completely different instruction set and you can't (to the best of
> > my knowledge!) swap between v7 & v8.
..
> > The stack VM does appear to work ok on v8 systems like chromebooks. We'll
> > need to handle both v7 & v8 just as x86 & x64.
I am running 64bit Spur stack VM on aarch64 Chromebook Plus, AML-S905X/LePotato, and backtesting on RasPi3, none of which have 32bit libs installed.
There are a fair number of differences between v7 and v8. E.g. in v8 no thumb, can't access SP or PC directly, different register sets, ..
> Currently the FFI tests don't test callbacks. According to Ken's code for
> the ThreadedFFIARM64Plugin the ARMv8 C ABI uses 8 integer register
> parameters whereas ARMv7/6/5/4 uses 4. So that changes the signature for
> thunkEntry on ARMv8. We won't see the effects of this unless we have a
> callback test with more than 4 arguments. We really need two tests that
> call callbacks with no arguments, a few integer, float or double arguments,
> large numbers of integer, float or double argument, and then calls with
> alternating integer, float and double arguments.
FYI, I am still in confusion w.r.t. getting VMMaker generated FFI code to do the proper thing on ARMv8/aarch64.
Basically, I am in a cycle of writing some ST code in ThreadedARM64FFIPlugin, running FFI unit tests (typically in Cuis -- seem basically same as Squeak), and checking outputs and stepping through with gdb. A slow slog for me.
At this point I feel I need to take a step back and get a better/fuller understanding of ThreadedFFICalloutState usage (ThreadedFFIPlugin>>ffiCallOutTo:SpecOnStack:in) marshaling and interaction with type/representation access via IA32ABIPlugin.
Also FYI, I have been running
[VMMaker generateSqueakSpurStack64VM] valueSupplyingAnswer: false.
VMMaker generateVMPlugins.
In the several attempts I have made, I have been unable to determine the proper usage of VMMakerTool to get a working VM corresponding with the above. The list of plugins available does not seem to match internal/external plugin lists; 64bit gets unchecked during builds, etc. I have not spent much time with this and don't know if this is expected to work for ARM codegen.
> Doug added a few tests when getting ThreadedFFIARMPlugin working. This
> source hasn't made it back into sqFFITestFuncs.c. This code could really
> do with some love. Someone willing to add a few tests, including some
> callback tests. I'm happy to write tip a description of the FFI
> architecture if someone will volunteer to write those tests :-)
As with other things, I am not really the best person to do this, but will certainly need more tests for the aarch64 FFI.
Note also, that I do not run Windows or MacOS [just Linux], so my test environment is limited. I can run RasPi3 in 33bit mode (Raspian/Linix) but am basically running aarch64/Linux.
FYI,
-KenD
More information about the Vm-dev
mailing list