Skip to content

Commit

Permalink
Add --no-expr disabling experimental features for CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Jul 6, 2024
1 parent 5f77786 commit 5f693f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions emulator/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function usage()
-t, --tcc jit-compile using tcc
--no-bintr disable binary translation
-x, --expr enable experimental features (eg. unbounded 32-bit addressing)
--no-expr disable experimental features
--embed FILE embed binary translated sources into the emulator, produced by CLI -o option
-v, --verbose increase the verbosity of the bash script
Expand Down Expand Up @@ -61,6 +62,7 @@ while [[ "$#" -gt 0 ]]; do
-b|--bintr) OPTS="$OPTS -DRISCV_BINARY_TRANSLATION=ON -DRISCV_LIBTCC=OFF" ;;
-t|--tcc ) OPTS="$OPTS -DRISCV_BINARY_TRANSLATION=ON -DRISCV_LIBTCC=ON" ;;
-x|--expr ) OPTS="$OPTS -DRISCV_EXPERIMENTAL=ON -DRISCV_ENCOMPASSING_ARENA=ON" ;;
--no-expr ) OPTS="$OPTS -DRISCV_EXPERIMENTAL=OFF" ;;
--embed) EMBED_FILES="$EMBED_FILES;$2"; shift ;;
--embed-all) embed_all ;;
-v|--verbose ) set -x ;;
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ if (NOT WIN32 OR MINGW_TOOLCHAIN)
target_compile_options(riscv PRIVATE -Wall -Wextra)
endif()

if (RISCV_ENCOMPASSING_ARENA)
if (RISCV_EXPERIMENTAL AND RISCV_ENCOMPASSING_ARENA)
target_compile_definitions(riscv PUBLIC
RISCV_ENCOMPASSING_ARENA_BITS=${RISCV_ENCOMPASSING_ARENA_BITS}
)
Expand Down

0 comments on commit 5f693f5

Please sign in to comment.