[OpenSmalltalk/opensmalltalk-vm] 81cb7e: Cog Processor Simulator Plugins as per Cog-eem.369...

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

[OpenSmalltalk/opensmalltalk-vm] 81cb7e: Cog Processor Simulator Plugins as per Cog-eem.369...

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 81cb7e9083cdb053d1ee8ee77fee9618ce0e88d2
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/81cb7e9083cdb053d1ee8ee77fee9618ce0e88d2
  Author: Eliot Miranda <[hidden email]>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M src/plugins/BochsIA32Plugin/BochsIA32Plugin.c
    M src/plugins/BochsX64Plugin/BochsX64Plugin.c
    M src/plugins/GdbARMPlugin/GdbARMPlugin.c
    M src/plugins/GdbARMv8Plugin/GdbARMv8Plugin.c

  Log Message:
  -----------
  Cog Processor Simulator Plugins as per Cog-eem.369/VMMaker.oscog-eem.2589

Speed up marshalling for the ProcessorSimulatorPlugins by using SmallInteger for
the memory range arguments instead of Unsigned.  Using the latest Slang changes
this inlines a lot of code and reduces function calls to decode the range
arguments.  Given that the memory range arguments are always within the range of
the memory byte array, SmallIntegers provide more than enough range.

More substantively use primitiveFailForOSError: to answer the failure error
code, if any, on simulating.

Slang for plugins.

Fix resultSendAlwaysFails: to include the two new failure sends,
primitiveFailForFFIException:at: primitiveFailForOSError:.

As a micro optimization, if the enclosing method has type #sqInt then return the
falures directly, as they're all typed as sqInt.  Should save an instruction :-)

Generate more efficient code for dereferencing SmallInteger type parameters in
SmartSyntaxPlugins.  Avoid a stack variable access by assigning to the target
variable in the validation expression, and referring to the variable in the
conversion expression, e.g. instead of

    sqInt v;

        if (!(isIntegerObject(stackValue(0))))
                return primitiveFailFor(PrimErrBadArgument);
        v = stackIntegerValue(0);

generate

    sqInt v;

        if (!(isIntegerObject(v = stackValue(0))))
                return primitiveFailFor(PrimErrBadArgument);
        v = integerValueOf(v);

Allow the Cog ProcessorSimulationPlugins to use the inlined macro definitions
for isIntegerObject:, integerObjectOf: & integerValueOf: even though they're
external plugins (since in single steppng, marshalling performance is at a
premium).


  Commit: 7c2325bcb858e52e19296a4f0a8092c1d4f5d54e
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/7c2325bcb858e52e19296a4f0a8092c1d4f5d54e
  Author: Eliot Miranda <[hidden email]>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M src/plugins/BitBltPlugin/BitBltPlugin.c

  Log Message:
  -----------
  Merge Nicolas' BitBltPlugin work with my ProessorSimulatorPlugin work.
Merge branch 'Cog' of https://github.com/OpenSmalltalk/opensmalltalk-vm into Cog


Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/c812fbc619c2...7c2325bcb858