Add a regmove instruction.

This will be used to locally change the register locations of values in
order to satisfy instruction constraints.
This commit is contained in:
Jakob Stoklund Olesen
2017-05-02 11:32:12 -07:00
parent 71128611a7
commit 950838c489
11 changed files with 114 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ from __future__ import absolute_import
from cdsl.formats import InstructionFormat
from cdsl.operands import VALUE, VARIABLE_ARGS
from .immediates import imm64, uimm8, ieee32, ieee64, offset32, uoffset32
from .immediates import intcc, floatcc, memflags
from .immediates import intcc, floatcc, memflags, regunit
from .entities import ebb, sig_ref, func_ref, jump_table, stack_slot
Nullary = InstructionFormat()
@@ -57,5 +57,7 @@ StackStore = InstructionFormat(VALUE, stack_slot, offset32)
HeapLoad = InstructionFormat(VALUE, uoffset32)
HeapStore = InstructionFormat(VALUE, VALUE, uoffset32)
RegMove = InstructionFormat(VALUE, ('src', regunit), ('dst', regunit))
# Finally extract the names of global variables in this module.
InstructionFormat.extract_names(globals())