hyc

Hydrogen Compiler written in C
git clone git://git.kocotian.pl/hyc.git
Log | Files | Refs | README | LICENSE

commit efbf6f2e21df87b140271dd887661d5f9eba4ac4
parent c7c864fb2f28afc3424c9408878c72440068ecbc
Author: kocotian <kocotian@kocotian.pl>
Date:   Tue, 17 Aug 2021 23:11:20 +0200

Added `leave` on return statement 😩

Diffstat:
Mtarget/x86_64-linux.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/x86_64-linux.c b/target/x86_64-linux.c @@ -416,7 +416,7 @@ compileStatementReturn(Compiler *compiler, ASTStatementReturn stat) { compileExpression(compiler, stat.expr, 0); asmTextAppend(compiler, "\tmov rax, r15"); - asmTextAppend(compiler, "\tret"); + asmTextAppend(compiler, "\tleave\n\tret"); } static void