@@ -8,6 +8,8 @@ around abi registers, stack setup, and label plumbing, and it looks less scary.
88
99- ` cj_builder_fn_prologue(cj, stack_bytes, &frame) ` : create a frame and reserve
1010 optional stack space (aligned for both arches).
11+ - ` cj_builder_fn_prologue_with_link_save(cj, stack_bytes, &frame) ` : like above,
12+ but on ARM64 it also saves/restores ` x30 ` for non-leaf functions.
1113- ` cj_builder_fn_epilogue(cj, &frame) ` / ` cj_builder_return(cj, &frame) ` :
1214 restore the frame and emit ` ret ` .
1315
@@ -16,9 +18,20 @@ around abi registers, stack setup, and label plumbing, and it looks less scary.
1618- ` cj_builder_arg_int(cj, index) ` : returns the platform-specific argument
1719 register.
1820- ` cj_builder_scratch_reg(index) ` : picks a caller-saved temporary.
21+ - ` cj_builder_scratch_init ` , ` cj_builder_scratch_acquire ` ,
22+ ` cj_builder_scratch_release ` : managed stack of scratch registers for balanced
23+ temporaries.
1924- ` cj_builder_zero_operand() ` + ` cj_builder_clear(cj, dst) ` : easy zeroing.
2025- ` cj_builder_assign ` , ` cj_builder_add_assign ` , ` cj_builder_sub_assign ` :
2126 assignment sugar.
27+ - ` cj_builder_call(ctx, scratch, label, args, count) ` : loads integer argument
28+ registers (up to the ABI limit), emits the proper call/bl, and optionally
29+ preserves the return value via the scratch stack.
30+ - ` cj_builder_call_unary(ctx, scratch, label, arg) ` : loads the first argument
31+ register, emits the right call/bl, and—when a scratch stack is supplied—moves
32+ the return value into a fresh scratch slot.
33+ - ` cj_resolve_label(ctx, module, label) ` : convert a recorded label to a
34+ callable pointer after finalization.
2235
2336## control flow
2437
0 commit comments