Fix interpreter portability

This commit is contained in:
Přemysl Eric Janouch 2016-12-24 22:42:21 +01:00
parent b846a7a0ea
commit a4390d38b5
Signed by: p
GPG Key ID: B715679E3A361BE6
2 changed files with 6 additions and 5 deletions

View File

@ -2,14 +2,15 @@ bfc
=== ===
'bfc' is a small, fast, self-contained, optimizing Brainfuck compiler for *nix 'bfc' is a small, fast, self-contained, optimizing Brainfuck compiler for *nix
on Intel x86-64. Currently supported targets are Linux and OpenBSD. on Intel x86-64.
Also included are several interpreters in various states of sophistication that Also included are several interpreters in various states of sophistication that
document my progress as I was writing this, from the simplest approach to an document my progress as I was writing this, from the simplest approach to an
optimizing JIT compiler. optimizing JIT compiler.
It's pretty easy to retarget the compiler, it just means redoing half the work. It's pretty easy to retarget the compiler, it just means redoing half the work.
The compiler itself is platform agnostic. Thanks to the unified ABI, adding support for another flavour of *nix only means
changing the syscall numbers. The compiler itself is platform agnostic.
Building Building
-------- --------
@ -27,7 +28,8 @@ To obtain dumps of the intermediate representation, compile with `-DDEBUG`:
Usage Usage
----- -----
./bfc-amd64-linux [INPUT-FILE] [OUTPUT-FILE] $ ./bfc-amd64-linux [INPUT-FILE] [OUTPUT-FILE]
$ ./bfc-amd64-openbsd [INPUT-FILE] [OUTPUT-FILE]
When no input file is specified, standard input is used. Similarly, the default When no input file is specified, standard input is used. Similarly, the default
output filename is `a.out`. After the compilation, the resulting file can be output filename is `a.out`. After the compilation, the resulting file can be

View File

@ -1,5 +1,4 @@
CC = c99 CFLAGS = -std=gnu99 -O3
CFLAGS = -O3
NAMES = bf bf-faster-loops bf-optimizing \ NAMES = bf bf-faster-loops bf-optimizing \
bf-jit bf-jit-opt bf-jit-unsafe bf-jit-unsafe-opt bf-jit bf-jit-opt bf-jit-unsafe bf-jit-unsafe-opt