insns: Introduce insns-flags.pl
commitd4e51d3e718a6bcf19151ed90caec1754ea94dec
authorCyrill Gorcunov <gorcunov@gmail.com>
Sat, 26 Oct 2013 21:20:42 +0000 (27 01:20 +0400)
committerCyrill Gorcunov <gorcunov@gmail.com>
Sun, 24 Nov 2013 09:20:52 +0000 (24 13:20 +0400)
tree4ee3b20e996ccd643bf691343f3c479b81316fb4
parentacfb97d3db0b91742465540c4558890e3c80fc8a
insns: Introduce insns-flags.pl

It been found that 64 bits for instruction flags is too small,
so instead we start using indirect addressing scheme to keep
instruction flags in bitvectors instead.

Using one bitvector per instruction template entry is wastefull
(especially if vector grow in future, at moment it's 128 bit length),
so we use indirect addressing, which is generated as follow

 - read instruction flags from insns.dat
 - flag sequence sorted and joined into one key string
 - this key string become a hash index
 - all hash entries are compacted into one array
 - every instruction template uses array offset instead
   of flags bitfield

Just for info, at moment we have 195 unique flags combination,
but since instruction template will use index as unsigned
integer, we can use a way more wider combination of flags
in future.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
insns-iflags.pl [new file with mode: 0644]