Closed tlively closed 3 years ago
Why are 0xe2
and 0xee
reserved for round
?
IMO we should recycle at least the opcodes where the original reserved instruction is meaningless. E.g. 0x67-0x6a
opcodes are meaningless for widen instructions. Also, AFAICT it is missing v128.any_true
.
@Maratyszcza I moved v128.any_true
to 0x53 because it's now a one-off instruction, but if that renumbering would be disruptive, I could move it back to where it was.
Ok, I pushed a new version based on @ngzhian's suggestion and compacting more instructions into previous opcode holes. This version only uses opcodes up to 0xff, which will simplify V8 at least. The only block of instructions that really got scattered were the f64x2
rounding instructions, which are scattered among the integer operations.
Amazing bin packing work Thomas, thanks!
Why are
0xe2
and0xee
reserved forround
?
TBH I don't remember. I must have thought at the time of the last renumbering that there would be just one floating point rounding instruction for each of f32x4 and f64x2.
256 opcodes was indeed enough for anyone 🚀
Merging because there were no further comments on this at today's meeting.
A draft numbering of the most recently added instructions. I tried to keep related instructions together, so there are still holes in the opcode space. I also could have more aggressively filled holes at the expense of destroying much of the internal structure of the opcode space. There are 236 instructions, so in principle we could fit them all below
0x100
, but it would be ugly. Comments welcome :)