Skip to content

Commit

Permalink
added naked function asm
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse authored and notGlassySundew committed May 11, 2024
1 parent 2a13ce5 commit 1637b83
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -4348,6 +4348,13 @@ int hl_jit_function( jit_ctx *ctx, hl_module *m, hl_function *f ) {
copy(ctx, &rb->stack, REG_AT(o->p2), rb->size);
scratch(rb->current);
break;
case 4:
if( ctx->totalRegsSize != 0 )
hl_fatal("Asm naked function should not have local variables");
if( opCount != 0 )
hl_fatal("Asm naked function should be on first opcode");
ctx->buf.b -= BUF_POS() - ctx->functionPos; // reset to our function start
break;
default:
ASSERT(o->p1);
break;
Expand Down

0 comments on commit 1637b83

Please sign in to comment.