Skip to content

Commit

Permalink
fixup! C64-Secure ABI demo.
Browse files Browse the repository at this point in the history
Rename TODO -> NB as discussed in comments.
  • Loading branch information
jacobbramley committed Jan 16, 2025
1 parent 437b84f commit fa21411
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion morello-c64-secure/c64-secure.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ bool maybe_print_abi_desc(enum ABI from, enum ABI to)
// Note: Since this is implemented in C, it uses AAPCS64-cap, which we
// respresent as 'Z'. `can_call()` says that the example ABIs can't call 'Z',
// but in practice they'll all work well enough to call this helper.
// TODO: This might fail if the user requests a large number of locals.
//
// NB: This might fail if the user requests a very large number of locals.
struct Next what_next(uintptr_t cfp, uintptr_t csp, size_t pc)
{
clear();
Expand Down
4 changes: 2 additions & 2 deletions morello-c64-secure/impls.s
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ C:
scvalue cfp, cfp, x16

// Derive a new csp from the new cfp.
// TODO: For now, we just allow 16KB per function, but we could pick the
// NB: For now, we just allow 16KB per function, but we could pick the
// longest length that guarantees 16-byte alignment (E=4).
mov x16, #(16 * 1024)
sub x17, sp, x16
scvalue c17, cfp, x17
scbndse c17, c17, x16
sub x16, sp, w0, uxtw #4 // Allocate locals.
scvalue csp, c17, x16
// TODO: The very last section of stack will be unusable because
// NB: The very last section of stack will be unusable because
// scbnds{e} fails if the required bounds exceed the bounds of <Cn>.

1: mov c0, cfp
Expand Down

0 comments on commit fa21411

Please sign in to comment.