[viewcompiler] Support more than 16 registers in invoke instructions

This was causing the viewcompiler to crash on deeper layout hierarchies.

We fix this by reserving several scratch registers. When an invoke instruction
uses registers that don't fit in a 4-bit field, we move all of these values into
the scratch registers and use an invoke/range instruction instead. The scratch
registers are all above the highest allocated register, so they are guaranteed
not to clobber meaningful values.

Supporting more registers for invoke also required supporting
register-to-register moves, which some how we'd gotten by without so far.

Finally, to make viewcompiler fail more loudly when things go wrong, many
DCHECKs have been changed to CHECKs.

Bug: 123517491
Test: atest
Change-Id: I9eb7c9bcf1fc7d713e664b331804bdcddafc95a4
7 files changed