Project

General

Profile

MicroTESK 2.3.20 beta released

MicroTESK 2.3.20 beta has been released.
Added by Andrei Tatarnikov over 8 years ago

The new release contains the following changes:

  • Support for randomizing preparators (random selection between several preparator variants) was implemented (*)
  • Some issues in the branch generation engine were fixed

The MicroTESK distribution package can be downloaded from here: http://forge.ispras.ru/projects/microtesk/files

What's new (*):

Preparator Randomization

Now it is possible to specify several variants of a preparator, which can be selected at random when the preparator is instantiated. Syntax is the following:

preparator(:target => 'REG') {
  variant(:name => '1', :bias => 50) {
    comment 'Variant 1'
    lui target, value(16, 31)
    ori target, target, value(0, 15)
  }

  variant(:name => '2', :bias => 50) {
    comment 'Variant 2'
    ori target, zero, value(16, 31)
    sll target, target, 16
    addi target, target, value(0, 15)
  }
}

A variant description has two optional parameters: name and bias.

The name attribute allows specifying a preferred preparator variant when a preparator is explicitly inserted by using the prepare function. For example:

prepare t1, 0xdeadbeef, :variant => '1' # Preparator '1' is chosen.
prepare t2, 0xbaadf00d, :variant => '2' # Preparator '2' is chosen.

Search by variant name is performed after a suitable preparator is chosen according to value mask and argument values. So if a variant with the specified name is not defined for the chosen preparator, MicroTESK reports a warning and uses a randomly chosen variant of the given preparator.

The bias attribute is used set up a bias for the current variant. It works in a similar way as the dist construct which is for selecting random values. The atribute can be skipped if you want to define equally probable variants.


Comments