Add RISC-V encodings for spill and fill.

Add a Stack() class for specifying operand constraints for values on the
stack.

Add encoding recipes for RISC-V spill and fill instructions. Don't
implement the encoding recipe functions yet since we don't have the
stack slot layout yet.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-13 13:39:52 -07:00
parent ea8a8a95a8
commit 5336bbd4cc
6 changed files with 53 additions and 6 deletions

View File

@@ -340,3 +340,15 @@ class Register(object):
# type: (RegClass, int) -> None
self.regclass = rc
self.unit = unit
class Stack(object):
"""
An operand that must be in a stack slot.
A `Stack` object can be used to indicate an operand constraint for a value
operand that must live in a stack slot.
"""
def __init__(self, rc):
# type: (RegClass) -> None
self.regclass = rc