Skip to content

Commit

Permalink
emcc works now
Browse files Browse the repository at this point in the history
Signed-off-by: Shaw Summa <[email protected]>
  • Loading branch information
ShawSumma committed Mar 26, 2024
1 parent 3487f0a commit 5ff7505
Show file tree
Hide file tree
Showing 8 changed files with 1,976 additions and 2,010 deletions.
2 changes: 1 addition & 1 deletion core.mak
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TB_SRCS_FREEBSD = $(CUIK_DIR)/c11threads/threads_posix.c
TB_SRCS = $(TB_SRCS_BASE) $(TB_SRCS_$(OS_NAME))
TB_OBJS = $(TB_SRCS:%.c=$(OBJ_DIR)/%.o)

BASE_OBJS = $(ALL_OBJS) $(GC_OBJS) $(TB_OBJS) $(TCC_OBJS)
BASE_OBJS = $(TCC_OBJS) $(ALL_OBJS) $(GC_OBJS) $(TB_OBJS)

CFLAGS += -I $(TREE_SITTER_DIR)/lib/include -I $(TREE_SITTER_DIR)/lib/src $(FLAGS)
LDFLAGS += $(FLAGS)
Expand Down
2 changes: 1 addition & 1 deletion main/minivm.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(int argc, char **argv) {
vm_config_t val_config = (vm_config_t){
#if defined(EMSCRIPTEN)
.use_tb_opt = false,
.use_num = VM_USE_NUM_I64,
.use_num = VM_USE_NUM_F64,
.target = VM_TARGET_TB_EMCC,
#else
.use_tb_opt = false,
Expand Down
2 changes: 1 addition & 1 deletion vendor/cuik
Submodule cuik updated 95 files
+5 −8 build.lua
+46 −0 common/arena_array.h
+4 −4 common/buffer.h
+6 −6 common/common.c
+3 −5 common/dyn_array.h
+7 −0 common/new_hash_map.h
+7 −11 common/perf.c
+0 −1 libCuik/include/cuik_driver.h
+1 −1 libCuik/lib/back/ir_gen.c
+29 −21 libCuik/lib/driver/driver.c
+0 −1 libCuik/lib/driver/driver_arg_parse.h
+0 −1 libCuik/lib/driver/driver_args.h
+4 −0 libCuik/lib/front/expr_parser.h
+1 −1 libCuik/lib/targets/wasm_desc.c
+0 −0 out.c
+99 −60 tb/include/tb.h
+2 −2 tb/include/tb_coff.h
+14 −14 tb/include/tb_x64.h
+1 −1 tb/src/aarch64/aarch64_target.c
+2 −2 tb/src/abi.c
+315 −136 tb/src/chaitin.c
+187 −154 tb/src/codegen.h
+273 −464 tb/src/codegen_impl.h
+11 −11 tb/src/debug/cv.c
+1 −1 tb/src/debug/cv_type_builder.c
+1 −1 tb/src/debug/sdg.c
+1 −1 tb/src/emitter.h
+3 −3 tb/src/exporter.c
+16 −16 tb/src/generic_cg.h
+1 −1 tb/src/host.h
+29 −43 tb/src/ir_printer.c
+28 −2 tb/src/jit.c
+26 −1 tb/src/libtb.c
+3 −3 tb/src/linker/linker.c
+8 −8 tb/src/linker/pe.c
+1,122 −569 tb/src/lsra.c
+4 −4 tb/src/mips/mips_target.c
+17 −16 tb/src/new_builder.c
+13 −13 tb/src/objects/coff.c
+1 −1 tb/src/objects/coff_parse.c
+2 −2 tb/src/objects/elf64.c
+1 −1 tb/src/objects/lib_parse.h
+4 −4 tb/src/objects/macho.c
+2 −2 tb/src/objects/wasm_obj.c
+96 −119 tb/src/opt/branches.h
+23 −58 tb/src/opt/cfg.h
+284 −248 tb/src/opt/fold.h
+315 −138 tb/src/opt/gcm.h
+21 −14 tb/src/opt/gvn.h
+294 −163 tb/src/opt/lattice.h
+14 −16 tb/src/opt/legalizer.h
+7 −6 tb/src/opt/libcalls.h
+150 −0 tb/src/opt/list_sched.h
+312 −509 tb/src/opt/loop.h
+198 −148 tb/src/opt/mem2reg.h
+135 −68 tb/src/opt/mem_opt.h
+727 −619 tb/src/opt/optimizer.c
+151 −315 tb/src/opt/passes.h
+51 −25 tb/src/opt/peeps.h
+93 −93 tb/src/opt/print.h
+194 −394 tb/src/opt/print_c.h
+67 −35 tb/src/opt/print_dumb.h
+0 −52 tb/src/opt/properties.h
+60 −59 tb/src/opt/scheduler.h
+20 −20 tb/src/opt/sroa.h
+28 −28 tb/src/reg_alloc.h
+3 −3 tb/src/set.h
+54 −36 tb/src/tb.c
+58 −50 tb/src/tb_builder.c
+170 −25 tb/src/tb_internal.h
+19 −18 tb/src/wasm/wasm_target.c
+23 −23 tb/src/x64/x64.c
+22 −26 tb/src/x64/x64.h
+49 −44 tb/src/x64/x64_disasm.c
+86 −85 tb/src/x64/x64_emitter.h
+138 −138 tb/src/x64/x64_insts.inc
+19 −0 tb/src/x64/x64_nodes.inc
+1,489 −401 tb/src/x64/x64_target.c
+0 −3 tb2c/.gitignore
+0 −14 tb2c/loop.fish
+0 −196 tb2c/tests.py
+0 −15 tb2c/tests/fib.c
+0 −10 tb2c/tests/ints.c
+0 −20 tb2c/tests/load.c
+0 −14 tb2c/tests/loop0.c
+0 −17 tb2c/tests/loop1.c
+0 −20 tb2c/tests/loop2.c
+0 −23 tb2c/tests/loop3.c
+0 −33 tb2c/tests/pow.c
+0 −31 tb2c/tests/primes.c
+0 −14 tb2c/tests/selfref.c
+0 −19 tb2c/tests/string_table.c
+2 −2 tests.lua
+36 −0 tests/daxpy.c
+157 −12 tests/locals.c
Loading

0 comments on commit 5ff7505

Please sign in to comment.