Commit graph

1388 commits

Author SHA1 Message Date
Fabian 7db37fa6e2 Make dumping of wasm code configurable, and default to false 2020-07-21 20:10:13 -05:00
Fabian 3c976a1c5a Fix some warnings 2020-07-21 20:10:13 -05:00
Fabian 0cac6ee087 Suppress unused variable warnings 2020-07-21 20:10:13 -05:00
Fabian 1faec0e669 Remove math_pow, move declarations from shared.h to cpu.h 2020-07-21 20:10:13 -05:00
Fabian b8b5f78dba Fix indentation 2020-07-21 20:10:13 -05:00
Fabian 5c2eb24832 Port writable_or_pagefault, do_page_translation and trigger_pagefault to C 2020-07-21 20:10:13 -05:00
Fabian e9f803e148 Don't log uninteresting cpuid calls 2020-07-21 20:10:13 -05:00
Fabian c7af4d3607 Comment out unused functions 2020-07-21 20:10:13 -05:00
Fabian 636d404470 Use *p over p[0] 2020-07-21 20:10:13 -05:00
Fabian 626b2729be Spelling & code style 2020-07-21 20:10:13 -05:00
Fabian 2c13ee7f7e Move convert_f64_to_i32 declaration to js_imports.h 2020-07-21 20:10:13 -05:00
Fabian 9ad9693cdd Port fpu to C 2020-07-21 20:10:13 -05:00
Fabian d3d729a895 Use local union over global memory for casting 2020-07-21 20:10:13 -05:00
Fabian 32fc91c7be Disable bad assertion 2020-07-21 20:10:13 -05:00
Fabian 93f54ca0cc Add missing writable_or_pagefault to fpu_store_m80 2020-07-21 20:10:13 -05:00
Fabian 4f2a4bb403 Move finding cache entry to function 2020-07-21 20:10:13 -05:00
Fabian a4428be4be Fix warnings 2020-07-21 20:10:13 -05:00
Fabian d771b7bc7f Remove more unused JS 2020-07-21 20:10:13 -05:00
Awal Garg 9aea3c391f remove all modrm usage from cpu.js 2020-07-21 20:10:13 -05:00
Awal Garg 8222d2e6e0 Squash
restore memcpy comment
delete all the things!
fix jshint issues
restore memcpy comment
remove duplicate fxsave assignment
Count cache drops
Use already available physical address instead of calling read_imm8
Remove useless assertion
Just move around to reduce later diff
Run jit paging test with assertions enabled
Run jit-paging test on CI
Extend jit-paging test
Fix deleting invalidated code across memory pages
Add jit-paging test to gitlab ci
Remove jit_in_progress
Clean up old comments, use bool for jit_jump
Fix state image not begin garbage collected
Add ENABLE_PROFILER_TIMES to configure slow profiling times
Move to jit_generate and jit_run_interpreted to separate function
Add missing struct field
Fix: Don't write jit cache entry until no more faults can happen
Download image for jit paging test
Add missing initialiser
Mark jit_{generate,run_interpreted} as static
Specify full path to profiler.h
Clean up duplicate/missing declaration after rebase
mmap error handling, line length and fix some warnings
remove further unused code
move js imports to single header file
2020-07-21 20:10:13 -05:00
Awal Garg 5da2f98bfe extract const GROUP_DIRTINESS_LENGTH 2020-07-21 20:10:13 -05:00
Awal Garg 93926f0c31 enable separate compilation 2020-07-21 20:10:13 -05:00
Fabian 0b32b05deb Address review 2020-07-21 20:10:13 -05:00
Fabian 5e21d68d83 Clean up 2020-07-21 20:10:13 -05:00
Fabian 30f7442d4d Codegen changes for jit (after rebase) 2020-07-21 20:10:13 -05:00
Fabian df600f4957 Optimise cache clearing for small writes 2020-07-21 20:10:13 -05:00
Fabian cbcbeb6a3a Profiler: Record stat counters 2020-07-21 20:10:13 -05:00
Fabian 3a1b4078d7 Count executed instructions in generated code 2020-07-21 20:10:13 -05:00
Fabian cbb056726a Add profiling annotations 2020-07-21 20:10:13 -05:00
Fabian 23d168eb09 Enable new sse instructions for jit (mark as non-static and regenerate code) 2020-07-21 20:10:13 -05:00
Fabian 3fede5c1fd Quote for closure compiler 2020-07-21 20:10:13 -05:00
Fabian d410f567a7 Temp: Amaan's improvements 2020-07-21 20:10:13 -05:00
Fabian 96c6da294c Fix popf handling for jit 2020-07-21 20:10:13 -05:00
Fabian 815c7a33bf Fix STI handling for jit 2020-07-21 20:10:13 -05:00
Fabian 54266041c8 Fix wm exports after rebase 2020-07-21 20:10:13 -05:00
Fabian de04aa4c44 Remove unused file 2020-07-21 20:10:13 -05:00
Fabian 2a2f898a2a Generate jit, integrated it with the code generator and main loop, and enable it 2020-07-21 20:10:13 -05:00
Fabian 0c34310c99 Codegen changes for jit 2020-07-21 20:10:13 -05:00
Fabian d6e3f6534d Clear instruction cache when default operand/address size changes 2020-07-21 20:10:13 -05:00
Fabian 005d992808 More elf sections to ignore for kvm-unit-tests 2020-07-21 20:10:13 -05:00
Fabian 136fad7e01 Include capstone.js and libwabt.js for debugging 2020-07-21 20:10:13 -05:00
Fabian f3f6c7801b Improve failing assertion message from C 2020-07-21 20:10:13 -05:00
Fabian 6d0ad25973 Make instruction functions non-static, so they can be called from generated code 2020-07-21 20:10:13 -05:00
Fabian ed1fef1b28 Reduce verbosity unless CPU_LOG_VERBOSE is set 2020-07-21 20:10:13 -05:00
Fabian 247bdf96c2 Disable useless missing element warning 2020-07-21 20:10:13 -05:00
Fabian e19e71386b Revert "Replace prefix_call with custom_resolve_modrm"
This reverts commit c7c42065ac4e8cdc2f8653b36a32d1df9cb26a2e.
2020-07-21 20:10:13 -05:00
Awal Garg 85a67caaa7 nit fixes 2020-07-21 20:10:13 -05:00
Awal Garg 74e6500bf1 refactor codegen to use writer struct 2020-07-21 20:10:13 -05:00
Awal Garg 89f35b33de remove codegen_test file 2020-07-21 20:10:13 -05:00
Awal Garg 51b6bc4e63 reenable separate compilation for codegen 2020-07-21 20:10:13 -05:00