From 8c1a69089bcb0be8ee869a3f83c3151a7083e27c Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 12 May 2019 07:36:18 -0700 Subject: snapshot of carry flag implementation Tests failing. This approach seems wrong. I'm not sure even the tests are correct. Also, some open questions: 1. Should setting the overflow flag always set the carry flag? 2. Should the carry flag only be set on add/subtract/compare, or by all arithmetic ops? 3. Had to turn off the -ftrapv flag in `build`. Is there a way to detect overflow without actually causing overflow? Once we start setting CF correctly we have to implement jump above/below instructions (8- and 32-bit displacement variants). https://github.com/akkartik/mu/issues/30 --- subx/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subx/build') diff --git a/subx/build b/subx/build index 614b07d8..f29518ac 100755 --- a/subx/build +++ b/subx/build @@ -22,7 +22,7 @@ UNTIL_LAYER=${2:-zzz} test "$CXX" || export CXX=c++ test "$CC" || export CC=cc test "$CFLAGS" || export CFLAGS="-g -O3" -export CFLAGS="$CFLAGS -Wall -Wextra -ftrapv -fno-strict-aliasing" +export CFLAGS="$CFLAGS -Wall -Wextra -fno-strict-aliasing" # return 1 if $1 is older than _any_ of the remaining args older_than() { -- cgit 1.4.1-2-gfad0