[OpenSmalltalk/opensmalltalk-vm] 0f0b53: CogVM source as per Name: VMMaker.oscog-eem.2659

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] 0f0b53: CogVM source as per Name: VMMaker.oscog-eem.2659

Nicolas Cellier-4
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 0f0b5324b6e41cda7f92c335d45e563d41285ccd
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0f0b5324b6e41cda7f92c335d45e563d41285ccd
  Author: Eliot Miranda <[hidden email]>
  Date:   2020-01-09 (Thu, 09 Jan 2020)

  Changed paths:
    M nsspur64src/vm/cogit.h
    M nsspur64src/vm/cogitX64SysV.c
    M nsspur64src/vm/cogitX64WIN64.c
    M nsspur64src/vm/cointerp.c
    M nsspur64src/vm/cointerp.h
    M nsspur64src/vm/gcc3x-cointerp.c
    M nsspursrc/vm/cogit.h
    M nsspursrc/vm/cogitARMv5.c
    M nsspursrc/vm/cogitIA32.c
    M nsspursrc/vm/cogitMIPSEL.c
    M nsspursrc/vm/cointerp.c
    M nsspursrc/vm/cointerp.h
    M nsspursrc/vm/gcc3x-cointerp.c
    M nsspurstack64src/vm/gcc3x-interp.c
    M nsspurstack64src/vm/interp.c
    M nsspurstacksrc/vm/gcc3x-interp.c
    M nsspurstacksrc/vm/interp.c
    M spur64src/vm/cogit.h
    M spur64src/vm/cogitX64SysV.c
    M spur64src/vm/cogitX64WIN64.c
    M spur64src/vm/cointerp.c
    M spur64src/vm/cointerp.h
    M spur64src/vm/cointerpmt.c
    M spur64src/vm/cointerpmt.h
    M spur64src/vm/gcc3x-cointerp.c
    M spur64src/vm/gcc3x-cointerpmt.c
    M spurlowcode64src/vm/cogit.h
    M spurlowcode64src/vm/cogitX64SysV.c
    M spurlowcode64src/vm/cogitX64WIN64.c
    M spurlowcode64src/vm/cointerp.c
    M spurlowcode64src/vm/cointerp.h
    M spurlowcode64src/vm/gcc3x-cointerp.c
    M spurlowcodesrc/vm/cogit.h
    M spurlowcodesrc/vm/cogitARMv5.c
    M spurlowcodesrc/vm/cogitIA32.c
    M spurlowcodesrc/vm/cogitMIPSEL.c
    M spurlowcodesrc/vm/cointerp.c
    M spurlowcodesrc/vm/cointerp.h
    M spurlowcodesrc/vm/gcc3x-cointerp.c
    M spurlowcodestack64src/vm/gcc3x-interp.c
    M spurlowcodestack64src/vm/interp.c
    M spurlowcodestacksrc/vm/gcc3x-interp.c
    M spurlowcodestacksrc/vm/interp.c
    M spursista64src/vm/cogit.h
    M spursista64src/vm/cogitX64SysV.c
    M spursista64src/vm/cogitX64WIN64.c
    M spursista64src/vm/cointerp.c
    M spursista64src/vm/cointerp.h
    M spursista64src/vm/gcc3x-cointerp.c
    M spursistasrc/vm/cogit.h
    M spursistasrc/vm/cogitARMv5.c
    M spursistasrc/vm/cogitIA32.c
    M spursistasrc/vm/cogitMIPSEL.c
    M spursistasrc/vm/cointerp.c
    M spursistasrc/vm/cointerp.h
    M spursistasrc/vm/gcc3x-cointerp.c
    M spursrc/vm/cogit.h
    M spursrc/vm/cogitARMv5.c
    M spursrc/vm/cogitIA32.c
    M spursrc/vm/cogitMIPSEL.c
    M spursrc/vm/cointerp.c
    M spursrc/vm/cointerp.h
    M spursrc/vm/cointerpmt.c
    M spursrc/vm/cointerpmt.h
    M spursrc/vm/gcc3x-cointerp.c
    M spursrc/vm/gcc3x-cointerpmt.c
    M spurstack64src/vm/gcc3x-interp.c
    M spurstack64src/vm/interp.c
    M spurstack64src/vm/validImage.c
    M spurstacksrc/vm/gcc3x-interp.c
    M spurstacksrc/vm/interp.c
    M spurstacksrc/vm/validImage.c
    M src/vm/cogit.h
    M src/vm/cogitARMv5.c
    M src/vm/cogitIA32.c
    M src/vm/cogitMIPSEL.c
    M src/vm/cointerp.c
    M src/vm/cointerp.h
    M src/vm/cointerpmt.c
    M src/vm/cointerpmt.h
    M src/vm/gcc3x-cointerp.c
    M src/vm/gcc3x-cointerpmt.c
    M stacksrc/vm/gcc3x-interp.c
    M stacksrc/vm/interp.c

  Log Message:
  -----------
  CogVM source as per Name: VMMaker.oscog-eem.2659

StackInterpreter:
Fix awful bug in Context printing (wot I wrote) where the sanitised sp is
printed rather than the awful truth.  Have the CoInterpreter's interpret
use the Cogit;s breakBlock if it has none and the Cogit has one.

CoInterpreter:
Fix a major policy violation.  To make doits fast I had made CoInterpreter>>
executeNewMethod always JIT.  But executeNewMethod is used in many more places
than primitiveExecuteMethod[ArgsArray], which meant that methods were being
over-eagerly jitted (such as in perform:).  The Cog policy is only to JIT on
second use, or several loop iterations, except for executeMewthod, where we
need eager jitting to have jit speed doit performance.

So introduce executeNewMethodJitting, using it in primitiveExecuteMethod
[ArgsArray] to do what it says, and revert executeNewMethod to not JIT (if
the method is already jitted it will of course run the jit version).

Rename activateCoggedNewMethod: to the more comprehensible
activateNewCogMethod:inInterpreter:, requiring all clients to pass
in the newMethod methodHeader, which is the pointer to the cogMethod.

Cogit:
Use LoadEffectiveAddressMw:r:R: in place of MoveR:R:, AddCq:R: in as many places
as possible, including to set SmallInteger tags.

Improve the IMMUTABILITY store check/immutability trampolines by sharing the
stack switch code between the two c ases and oinly taking the branch in the
immutable/uncommon case. Hence extract trampoline return in to its own routine.

Refactor  genWriteCResult[High]IntoReg: to do all the necessary checking.
Move genLoadStackPointers to Cogit from the backEnd.

Fix old bug in ARM32 LoadEffectiveAddressMwrR
Improve the ARM32 trampoline marshalling code fractionally.

Fix a slip in Lowcode FFI trampoline generation.

Gazillions of registers on ARMv8 => add Extra8Reg

Fix bug in genAlignCStackSavingRegisters:numArgs:wordAlignment:.  Must ignore
register arguments.

No need to flush the cache on rewriting prim invocaton if out-of-line literals
are used.

A number of small improvements to context creation as part of reversing the
order of comparison of the SPReg with anythin g else, to suit ARMv8.

Implement and use a full set of ShiftCqRR. Use three argument shifts to save an
instruction in converting the result of a division primitive into a SmallInteger,
and save an instruction getting the format of an object in at:[put:].

In calling machine code primitives on RISCs we must save & restore the link
register around the call. We haven't noticed this issue before because we only
have one mcprim (hashMultiply) and that gets implemeted entirely in generated
machine code if a processor implements MulRR.

Since we're interested in performance and there are typically registers to
spare, on RISC define saveAndRestoreLinkRegUsingCalleeSavedRegNotLiveAtPointOfSendAround:
instead of using saveAndRestoreLinkRegAround: so that the Linkreg gets written
and read from an available callee-saved reg (if available).

Split the generation of translated hashMultiply into a SmallInteger version and
a Large(Positive)Integer version. hashMultiply never fails in SmallInteger.

Get the ARMv5 "stop" instruction (BKPT) correct.

Generalize OutOfLineLiteralsManager to function for 64 bits via
OutOfLineLiteralsManagerFor64Bits. OutOfLineLiteralsManagerFor64Bits's job is
to segregate 32-bit from 64-bit literals for better packing. Change the hack of
using operand 1 in a literal to hold the "isSharable/isUnique not" flag to
holding both the flag (now as an integer in the LSB) and the literal size
(in a four bit field above the LSB).

Send trampolines must save & restore the link register around the
selectorIndexDereferenceRoutine if on a 64-bit RISC.

Fix poor code for locating the last jump in the PIC prototype.