Fix handling empty returns in aarch64 compiler
This commit is contained in:
parent
788e98409a
commit
e5ce32d25f
1 changed files with 4 additions and 2 deletions
|
|
@ -198,7 +198,8 @@ namespace pslang::jit::aarch64
|
||||||
|
|
||||||
void apply(ast::return_statement const & node)
|
void apply(ast::return_statement const & node)
|
||||||
{
|
{
|
||||||
apply(*node.value);
|
if (node.value)
|
||||||
|
apply(*node.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void apply(ast::field_definition const &)
|
void apply(ast::field_definition const &)
|
||||||
|
|
@ -817,7 +818,8 @@ namespace pslang::jit::aarch64
|
||||||
|
|
||||||
void apply(ast::return_statement const & node)
|
void apply(ast::return_statement const & node)
|
||||||
{
|
{
|
||||||
apply(*node.value);
|
if (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);
|
||||||
builder.ret();
|
builder.ret();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue