Increased TInstr field sizes: allow long jumps and 65535 VM registers (#12777)
* Increased regBx size from 16 to 24 bits to increase jump range in the VM from 32K to 8M instructions. Fixes #12727 * Increased VM TInst register field sizes to 16 bits to allow up to 65535 VM registers per proc * Added test case for >255 VM registers
This commit is contained in:
parent
b8152b29e8
commit
e61d702206
3 changed files with 35 additions and 5 deletions
|
|
@ -12,14 +12,14 @@
|
|||
|
||||
import ast, idents, options, modulegraphs, lineinfos
|
||||
|
||||
type TInstrType* = uint32
|
||||
type TInstrType* = uint64
|
||||
|
||||
const
|
||||
regOBits = 8 # Opcode
|
||||
regABits = 8
|
||||
regBBits = 8
|
||||
regCBits = 8
|
||||
regBxBits = 16
|
||||
regABits = 16
|
||||
regBBits = 16
|
||||
regCBits = 16
|
||||
regBxBits = 24
|
||||
|
||||
byteExcess* = 128 # we use excess-K for immediates
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue