Commit graph

2322 commits

Author SHA1 Message Date
Awal Garg 853bf477cc minor fixes 2020-08-30 19:27:07 -05:00
Awal Garg e462e0aaf1 add quickcheck test for {un}pack_str 2020-08-30 19:27:07 -05:00
Awal Garg e33cc8f072 rust restructuring, some refactoring 2020-08-30 19:27:07 -05:00
Fabian b37a086cb2 Delete dead code 2020-08-30 19:27:07 -05:00
Fabian 87c762414c clang-tidy: All warnings are errors 2020-08-30 19:27:07 -05:00
Fabian 81b8b27bc2 Update .clang-tidy 2020-08-30 19:27:07 -05:00
Fabian f8d1c8f61b JIT: Fix case when creating an entry overrides existing entry with the same table index 2020-08-30 19:27:07 -05:00
Fabian 2a983fb83f Reorder invariant checking to avoid infinite loops 2020-08-30 19:27:07 -05:00
Fabian 65bb81f66f Check invariants after remove_jit_cache_wasm_index 2020-08-30 19:27:07 -05:00
Awal Garg 9fa6ef5f63 rename travis-run-codegen.sh 2020-08-30 19:27:07 -05:00
Awal Garg ca2486391a remove unused bindings 2020-08-30 19:27:07 -05:00
Awal Garg 5d0d683bbc fix deps and remove trailing space 2020-08-30 19:27:07 -05:00
Awal Garg bb60a99d9a fix clang-tidy warnings 2020-08-30 19:27:07 -05:00
Awal Garg c33cdbd04e fix rustup commands in dockerfile 2020-08-30 19:27:07 -05:00
Awal Garg 044b9553eb fix bounds check in Safe* traits 2020-08-30 19:27:07 -05:00
Awal Garg 9177cab5db use cfg!(debug_assertions) to set DEBUG 2020-08-30 19:27:07 -05:00
Awal Garg e654c761c4 safe numeric downcasts 2020-08-30 19:27:07 -05:00
Awal Garg bca32cb310 use align_of instead of null_mut
more magic!
2020-08-30 19:27:07 -05:00
Awal Garg f3a6c98895 refactoring dbg macros, remove codegen.rs 2020-08-30 19:27:07 -05:00
Awal Garg eb322bcddf rename get_cs 2020-08-30 19:27:07 -05:00
Awal Garg 2b9244aaef use NonNull instead of plain ptr::null_mut
holy amazing black magic
2020-08-30 19:27:07 -05:00
Awal Garg 6841703e17 deglob imports 2020-08-30 19:27:07 -05:00
Awal Garg a62573fa01 minor rust fixes 2020-08-30 19:27:07 -05:00
Awal Garg 43832da920 remove unused binding 2020-08-30 19:27:07 -05:00
Awal Garg 7be3803590 add wg_ prefix to rust exports 2020-08-30 19:27:07 -05:00
Awal Garg 75ed04e959 copy wasmgen bins instead of moving 2020-08-30 19:27:07 -05:00
Awal Garg 863c020785 delete codegen test 2020-08-30 19:27:07 -05:00
Awal Garg 345f979287 use a sane number of pages in wasmgen memory 2020-08-30 19:27:07 -05:00
Awal Garg 2aeb9960a3 fix fn type in rust 2020-08-30 19:27:07 -05:00
Awal Garg e96792ca84 increase fn name length limit to 24 2020-08-30 19:27:07 -05:00
Awal Garg fc7f4b468c add wasmgen tests to makefile 2020-08-30 19:27:07 -05:00
Awal Garg 95a65153f4 fix commit_instruction_body_to_cs 2020-08-30 19:27:07 -05:00
Awal Garg 03f0da9525 use wg_ prefix for wasmgen, add tests to makefile 2020-08-30 19:27:07 -05:00
Awal Garg 6251730fee added wasmgen init changes 2020-08-30 19:27:07 -05:00
Awal Garg d094bdf6ee add more wasm_util functions, use 2 bytes for storing import count 2020-08-30 19:27:07 -05:00
Awal Garg 6cb022e403 add new wasm_util functions 2020-08-30 19:27:07 -05:00
Awal Garg e5e827d923 import wasmgen from original oxidation branch 2020-08-30 19:27:07 -05:00
Fabian 5e1e3ea06d Remove unused constants 2020-08-30 19:27:07 -05:00
Fabian 94b0376186 Remove timing profiler 2020-08-30 19:27:07 -05:00
Fabian 44642c6e30 Add missing void to argument list 2020-08-30 19:27:07 -05:00
Fabian 950ae53dde Optimisation: Allow safe_{read,write} fast path for cpl<3
This also adds cpl==3 into the state flags, which might cause some code
to be compiled twice (once for cpl<3 and once for cpl==3), but this is
assumed to be an uncommon case compared to memory accesses for cpl<3.
2020-08-30 19:27:07 -05:00
Fabian 0cc47d72d1 nasmtests: Catch general protection error / sigsegv 2020-08-30 19:27:07 -05:00
Fabian 423cfbea65 Check for potential faults before doing port io 2020-08-30 19:27:07 -05:00
Fabian 7c666596fe Remove superfluous invariants check (is checked by the caller) 2020-08-30 19:27:07 -05:00
Fabian 8a682f4076 jit_cache_array: Check more invariants 2020-08-30 19:27:07 -05:00
Fabian 2f9078040f The stack segment can't be null 2020-08-30 19:27:07 -05:00
Fabian c898611196 Regression tests for 8-bit jumps 2020-08-30 19:27:07 -05:00
Fabian 9b2b3250df Fix 8-bit jumps in 16-bit mode 2020-08-30 19:27:07 -05:00
Fabian c40a5ccf25 nasmtests: Put multiboot section early into binary 2020-08-30 19:27:07 -05:00
Fabian 718f27114a Don't call get_seg from modrm_skip 2020-08-30 19:27:07 -05:00