fix: add opSize back in to stack
This commit is contained in:
@@ -23,7 +23,7 @@ class Stack {
|
||||
|
||||
/** Push an expression onto the stack. */
|
||||
def push(expr: mw.Expr, src: Register): AsmLine = {
|
||||
stack += expr -> StackValue(src.size, sizeBytes)
|
||||
stack += expr -> StackValue(expr.ty.size, sizeBytes)
|
||||
Push(src)
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class Stack {
|
||||
|
||||
/** Get an MemLocation for a variable in the stack. */
|
||||
def accessVar(ident: mw.Ident): MemLocation =
|
||||
MemLocation(RSP, sizeBytes - stack(ident).bottom)
|
||||
MemLocation(RSP, sizeBytes - stack(ident).bottom, opSize = Some(stack(ident).size))
|
||||
|
||||
def contains(ident: mw.Ident): Boolean = stack.contains(ident)
|
||||
def head: MemLocation = MemLocation(RSP, opSize = Some(stack.last._2.size))
|
||||
|
||||
Reference in New Issue
Block a user