Add load and store instructions.

Define a MemFlags class, currently holding a notrap and aligned flag.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-11 09:54:55 -07:00
parent 0c3771bccb
commit aad6ebebb5
12 changed files with 227 additions and 45 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
from .immediates import intcc, floatcc, memflags
from .entities import ebb, sig_ref, func_ref, jump_table, stack_slot
Nullary = InstructionFormat()
@@ -53,6 +53,9 @@ IndirectCall = InstructionFormat(
sig_ref, VALUE, VARIABLE_ARGS,
multiple_results=True)
Load = InstructionFormat(memflags, VALUE, offset32)
Store = InstructionFormat(memflags, VALUE, VALUE, offset32)
StackLoad = InstructionFormat(stack_slot, offset32)
StackStore = InstructionFormat(VALUE, stack_slot, offset32)