Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 984 Bytes

CONTRIBUTING.md

File metadata and controls

33 lines (30 loc) · 984 Bytes

Introduction

EXODUS forbids the use of uintptr_t, intptr_t, size_t, ptrdiff_t and the like. Use u64 or i64 instead.

Adding an FFI routine

In src/ffi.c:

i64 STK_FunctionName(i64* stk) {
  /* function body */
}

in BootstrapLoader():

  S(FunctionName, <function's argument count in HolyC>),

STK_FunctionName MUST return void OR a value that is 8 bytes big.

In T/KERNELA.HH:

...after #ifdef IMPORT_BUILTINS
import <type> FunctionName(<arguments>);
...#else...
extern <type> FunctionName(<arguments>);

Build HCRT.BIN using ./exodus -c -t T BuildHCRT.HC, copy HCRT.BIN to HCRT_BOOTSTRAP.BIN

Check if you forgot to add symbols

If you want to add a HolyC native function, add a file and include it in T/HCRT_TOS.HC.

Sometimes you forget to add it to KERNELA.HH, so here's how to see if you missed anything:

In T/FULL_PACKAGE.HC:

#define GEN_HEADERS 1

Rebuild HCRT -> Run EXODUS -> copy functions from T/unfound.DD to T/KERNELA.HH