Som v 5.1

The previous release (Som v 5.0) introduced t2-code.  It is the fastest Som vm to date.  t2-code has quite a wide instruction, 96 bits.  The aim of this version is simple:  to design the instructions to fit into 64 bits and to achieve that without sacrificing the performance. 64-bit is a more natural size for today's machine (year 2010).

The design for t2-64 code is straightforward.  It is similar to t2 code, only the format is changed. The new format has two arguments fit into the first 32-bit word and one argument in the second 32-bit word. To allow as many bits as possible to the two argument fields, it is divided into 16-bit, 10-bit and 6-bit (opcode). The argument that is too large to fit into 16-bit or 10-bit needed to be "mov"ed to a smaller size by an extra "mov" instruction that has large argument size: 26-bit and 32-bit.

The result:  the executable size for all benchmarks are smaller by 30% than t2-code (not surprising!). In terms of execution speed, for small size benchmarks, t2-64 is slower (noi) by 2% and for medium size benchmarks, by 10%. In wall clock time, t2-64 is 12% slower averaged over all benchmarks.  

The main difficulty in doing this cross-compilation (from som v5 to som v5.1) is always the intricacy of the immediate execution (especially "loadfile").  I should rethink how to make this "cross" simpler or at least easier to understand.

25 December 2010
Merry Christmas
