Define stack_load, stack_store, and stack_addr instructions.

This commit is contained in:
Jakob Stoklund Olesen
2017-04-10 13:20:41 -07:00
parent af2516e996
commit c52e3e0b3f
10 changed files with 163 additions and 56 deletions

View File

@@ -8,8 +8,8 @@ in this module.
from __future__ import absolute_import
from cdsl.formats import InstructionFormat
from cdsl.operands import VALUE, VARIABLE_ARGS
from .immediates import imm64, uimm8, ieee32, ieee64, intcc, floatcc
from .entities import ebb, sig_ref, func_ref, jump_table
from .immediates import imm64, uimm8, ieee32, ieee64, offset32, intcc, floatcc
from .entities import ebb, sig_ref, func_ref, jump_table, stack_slot
Nullary = InstructionFormat()
@@ -52,5 +52,8 @@ IndirectCall = InstructionFormat(
sig_ref, VALUE, VARIABLE_ARGS,
multiple_results=True)
StackLoad = InstructionFormat(stack_slot, offset32)
StackStore = InstructionFormat(VALUE, stack_slot, offset32)
# Finally extract the names of global variables in this module.
InstructionFormat.extract_names(globals())