[Vm-dev] Re: ARM Cog progress

Ken.Dickey Ken.Dickey at whidbey.com
Thu May 21 14:58:56 UTC 2015


On Thu, 21 May 2015 05:58:41 -0700
Eliot Miranda <eliot.miranda at gmail.com> wrote:

> Pi2 uses ARMv7 which, so TimR tells me, has a 16-bit literal load instruction, which means a 32-bit literal can be generated using two 32-bit instructions.  ARMv5 either requires 4 32-bit instructions, or 1 32-bit instruction to access 1 32-bit literal out-of-line using PC-relative addressing.  I'd like to know what the situation is for ARMv8 (the 64-bit ISA).
> 
> The temptation is to move to ARMv7 to get that more compact and faster literal generation.  But it would mean either dropping Pi1 or two VMs.  I'm not afraid of two VMs but it is more stuff, with all the headaches for newbies that entails. Another alternative might be to have the JIT test whether the system is v7 or not and generate the appropriate code, but that is problematic; the JIT will bloat and scanning machine code for object references will slow down.

..but the test for ARM5/7/8/.. should happen once, and the codegen could be specialized at that time -- after which the ARM specialization code itself is no longer needed, so no bloat.

Dynamic specialization does work, right?  ;^)

-- 
-KenD


More information about the Vm-dev mailing list