Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
katef committed Sep 5, 2024
1 parent d60c6b2 commit a5bf040
Show file tree
Hide file tree
Showing 9 changed files with 410 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ jobs:
cc: [ clang, gcc ]
make: [ bmake ]
debug: [ DEBUG, RELEASE ] # RELEASE=1 is a no-op
lang: [ "vm -x v1", "vm -x v2", asm, c, rust, vmc, vmops, go, goasm, llvm ]
lang: [ "vm -x v1", "vm -x v2", asm, c, rust, vmc, vmops, go, goasm, llvm, wabt ]
exclude:
- os: macos
cc: gcc # it's clang anyway
Expand Down Expand Up @@ -512,6 +512,13 @@ jobs:
sudo apt-get install golang
go version
- name: Dependencies (Ubuntu/Wabt)
if: matrix.os == 'ubuntu' && matrix.lang == 'wabt'
run: |
uname -a
sudo apt-get install wabt
go version
- name: Fetch build
uses: actions/cache@v3
id: cache-build
Expand Down
1 change: 1 addition & 0 deletions include/fsm/print.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum fsm_print_lang {
FSM_PRINT_SH, /* Shell script (bash dialect) */
FSM_PRINT_VMC, /* ISO C90 code, VM style */
FSM_PRINT_VMDOT, /* Graphviz Dot format, showing VM opcodes */
FSM_PRINT_WASM, /* Wasm text (desugared wat syntax) */

FSM_PRINT_VMOPS_C, /* VM opcodes as a datastructure */
FSM_PRINT_VMOPS_H,
Expand Down
1 change: 1 addition & 0 deletions src/fsm/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ lang_name(const char *name)
{ "llvm", FSM_PRINT_LLVM },
{ "sh", FSM_PRINT_SH },
{ "go", FSM_PRINT_GO },
{ "wasm", FSM_PRINT_WASM },

{ "amd64", FSM_PRINT_AMD64_NASM },
{ "amd64_att", FSM_PRINT_AMD64_ATT },
Expand Down
1 change: 1 addition & 0 deletions src/libfsm/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ fsm_print(FILE *f, const struct fsm *fsm,
case FSM_PRINT_SH: print_vm = fsm_print_sh; break;
case FSM_PRINT_VMC: print_vm = fsm_print_vmc; break;
case FSM_PRINT_VMDOT: print_vm = fsm_print_vmdot; break;
case FSM_PRINT_WASM: print_ir = fsm_print_wasm; break;

case FSM_PRINT_VMOPS_C: print_vm = fsm_print_vmops_c; break;
case FSM_PRINT_VMOPS_H: print_vm = fsm_print_vmops_h; break;
Expand Down
1 change: 1 addition & 0 deletions src/libfsm/print.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ vm_print_f fsm_print_llvm;
vm_print_f fsm_print_rust;
vm_print_f fsm_print_sh;
vm_print_f fsm_print_vmc;
ir_print_f fsm_print_wasm;

vm_print_f fsm_print_vmdot;
vm_print_f fsm_print_vmops_c;
Expand Down
1 change: 1 addition & 0 deletions src/libfsm/print/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SRC += src/libfsm/print/vmasm.c
SRC += src/libfsm/print/vmc.c
SRC += src/libfsm/print/vmdot.c
SRC += src/libfsm/print/vmops.c
SRC += src/libfsm/print/wasm.c

.for src in ${SRC:Msrc/libfsm/print/*.c}
CFLAGS.${src} += -I src # XXX: for internal.h
Expand Down
Loading

0 comments on commit a5bf040

Please sign in to comment.