fix: alignment issue with stack in read

This commit is contained in:
Alex Ling 2025-02-25 18:20:50 +00:00
parent 4f3596b48a
commit 87a239f37c

View File

@ -92,10 +92,12 @@ object asmGenerator {
labelGenerator.getLabel(Builtin.Read),
List(
stack.align(),
stack.reserve(),
stack.push(RSI),
Load(RSI, stack.head),
assemblyIR.Call(CLibFunc.Scanf),
stack.pop(RAX)
stack.pop(RAX),
stack.drop()
)
)
}