Commit Graph

12 Commits

Author SHA1 Message Date
Kartik Agaram 04bdbf3178 . 2020-10-24 20:28:06 -07:00
Maxwell Bernstein cff2cd82c2 Use size-specific MAX/MIN constants
Don't rely on platform sizes.
2020-10-22 13:21:07 -07:00
Kartik Agaram c82d149b3f 7089 2020-10-22 00:59:46 -07:00
Kartik Agaram eb45b315b6 7041
Reconcile a few details with the mu-normie fork.
2020-10-15 22:20:12 -07:00
Kartik Agaram 8e607b128c 6924 2020-10-01 21:43:04 -07:00
Kartik Agaram bc3ebe820b 6914 2020-09-30 23:14:57 -07:00
Kartik Agaram d44bd51f90 6912 2020-09-30 22:56:45 -07:00
Kartik Agaram 656b840e7f 6911 - comparing floats
It turns out floating-point operations set different flags than most instructions.
We have to branch on them using unsigned jumps.

https://stackoverflow.com/questions/7057501/x86-assembler-floating-point-compare/7057771#7057771
2020-09-30 22:53:14 -07:00
Kartik Agaram 6b36e4dbc7 6760
Fix a couple of subtle bugs.

- the VM was conditionally reading from the instruction stream, so that
  other bugs got masked by decoding errors.
- push-n-bytes was clobbering eax.
2020-09-08 22:48:47 -07:00
Kartik Agaram 9ee351f37f 5983 - fix an emulator bounds-check bug
It was possible for an instruction to write out of bounds of the memory
data structure. Most of the time this worked fine. However if the block
ever got resized and moved the out-of-bounds bytes no longer went along.
2020-02-05 14:57:52 -08:00
Kartik Agaram c357b103d1 5818 2019-12-22 07:41:52 -08:00
Kartik Agaram 6e1eeeebfb 5485 - promote SubX to top-level 2019-07-27 17:47:59 -07:00