Fix handling empty returns in aarch64 compiler

This commit is contained in:
Nikita Lisitsa 2026-03-13 12:53:03 +03:00
parent 788e98409a
commit e5ce32d25f

View file

@ -198,6 +198,7 @@ namespace pslang::jit::aarch64
void apply(ast::return_statement const & node) void apply(ast::return_statement const & node)
{ {
if (node.value)
apply(*node.value); apply(*node.value);
} }
@ -817,6 +818,7 @@ namespace pslang::jit::aarch64
void apply(ast::return_statement const & node) void apply(ast::return_statement const & node)
{ {
if (node.value)
apply(*node.value); apply(*node.value);
if (stack_offset > 0) if (stack_offset > 0)
builder.add_imm(31, 31, stack_offset); builder.add_imm(31, 31, stack_offset);