[Vm-dev] Adding CPU specific code for fast bitblt on ARM

David T. Lewis lewis at mail.msen.com
Wed May 29 10:57:08 UTC 2013


On Tue, May 28, 2013 at 08:43:18PM -0700, tim Rowledge wrote:
>  
> 
> On 28-05-2013, at 5:03 PM, "David T. Lewis" <lewis at mail.msen.com> wrote:
> 
> > 
> > If you want me to try it with trunk/platforms/Cross for a Unix build,
> > send a copy of the code and I'll let you know if it works.
> 
> OK, here is a zip of
> a) the files from Ben - it should be fairly obvious where to put them since there is a Cross dir and a platforms/unix dir. There is also a dir currently for the intplugins/BitBltPlugin dir but that needs to move somewhere more sensible. I just can't come up with a place at this time of day.
> b) my changes to the latest vmmaker-dtl.130(?)
> 
> b also adds a copy of wliot's hack for making it possible to add
> #ifdef wotsit
> #include "lunacy.h"
> #endif
> 
> Add -DARM_FAST_BLT to the CFLAGS to get it to try to use the new code, don't to not. It appears to work for me but I'd be much happier to have external confirmation.
> 

I started with a fresh platforms tree and VMMaker image, then added Ben's
Cross/plugins/BitBltPlugin/* and unix/pluginx/BitBltPlugin/config.cmake.
I also filed in your BitBltSimulation changes.

I did not file in the code generator changes, because VMMaker already has
the following C preprocessor methods (http://bugs.squeak.org/view.php?id=5238):

   Object>>isDefined:inSmalltalk:comment:ifTrue:
   Object>>isDefined:inSmalltalk:comment:ifTrue:ifFalse:
   Object>>isDefinedTrueExpression:inSmalltalk:comment:ifTrue:ifFalse:
   Object>>preprocessorExpression:
   Object>>cPreprocessorDirective:

I compiled a VM for x86_64 Linux from this, both with and without the
-DARM_FAST_BLT in CFLAGS. In both cases I got a working VM, and in both
cases the code in Cross/plugins/BitBltPlugin was not compiled.

The configure and make commands that I used were:
   $ cd build
   $ ../platforms/unix/cmake/configure --src=../src --CFLAGS='-DARM_FAST_BLT'
   $ make install

Conclusion: For Linux on a non-ARM platform, nothing bad happened when the
code was added.

I think that Cross/plugins/BitBltPlugin cries out for some naming convention
or new directory structure to distinguish ARM from other platforms. I'm not
sure what to suggest just now...

Regarding the code, is this available under MIT license? And who is this
Ben guy anyhow ;-)

Dave



More information about the Vm-dev mailing list