diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-12 07:36:18 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-12 07:41:34 -0700 |
commit | 8c1a69089bcb0be8ee869a3f83c3151a7083e27c (patch) | |
tree | 319e3b04bb5d94b0306e336dff573d6685e8d683 /subx/build | |
parent | d5d43e044d16335a3a865a8c9f5aea5cbad73360 (diff) | |
download | mu-8c1a69089bcb0be8ee869a3f83c3151a7083e27c.tar.gz |
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
Diffstat (limited to 'subx/build')
-rwxr-xr-x | subx/build | 2 |
1 files changed, 1 insertions, 1 deletions
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() { |