Commit graph

2961 commits

Author SHA1 Message Date
Fabian 7d48636dda Integration tests: Use debug bios 2020-12-31 19:14:29 -06:00
Fabian 861aea3157 Add recording serial adapter 2020-12-31 19:14:29 -06:00
Fabian e2eecc7295 task_switch_test*_jit: assert that jit agrees 2020-12-31 19:14:29 -06:00
Fabian 492a2cf78e Update previous_ip only if page fault is going to happen 2020-12-31 19:14:29 -06:00
Fabian 0c922cea95 Add config::LOG_PAGE_FAULTS 2020-12-31 19:14:29 -06:00
Fabian cd0b6ce753 Fix off-by-on in assertion in write_blob/read_blob 2020-12-31 19:14:29 -06:00
Fabian 0d76a7e99a Correctly set previous_ip before #nm (fixes segfaults in Linux) 2020-12-31 19:14:29 -06:00
Fabian 4e9fa5e783 refactor 2020-12-31 19:14:29 -06:00
Fabian c47b4b252c Optimise cr0 access in task_switch_test (only low byte needed) 2020-12-31 19:14:29 -06:00
Fabian d2c01c31a3 Fix memory dumps 2020-12-31 19:14:29 -06:00
Fabian 5e73b6f21b Remove invalid assertion on sfence/mfence/lfence (low bits of modrm byte are ignored) 2020-12-31 19:14:29 -06:00
Fabian 7f41e6fe48 Test for mov [mem], sreg 2020-12-31 19:14:29 -06:00
Fabian 1c474eabdb Fix mov [mem], sreg in 32-bit mode (should be 16-bit write) 2020-12-31 19:14:29 -06:00
Fabian 17f2488684 Fix uses of writable_or_pagefault from JS 2020-12-31 19:14:29 -06:00
Fabian c207400922 Fix Rust warnings 2020-12-31 19:14:29 -06:00
Fabian 753f67bfab Makefile: Clean up and add all-tests target 2020-12-31 19:14:29 -06:00
Fabian 17cca458fa Print stdout/stderr before failing 2020-12-31 19:14:29 -06:00
Fabian c97600f5cb Also prepare gen_safe_read{64,128} for later optimisations 2020-12-31 19:14:29 -06:00
Fabian b23c4a9db2 Optimise pop reg 2020-12-31 19:14:29 -06:00
Fabian c5cd93678e Pass local to gen_safe_read, add single function for modrm_resolve and gen_safe_read (preparation for later optimisations) 2020-12-31 19:14:29 -06:00
Fabian aad8072aa7 Optimise push reg 2020-12-31 19:14:28 -06:00
Fabian f620aceb5d Use LocalOrImmediate for other arithmetic instructions 2020-12-31 19:14:28 -06:00
Fabian 43fcdf9fc2 Introduce LocalOrImmediate for more efficient parameter passing to cmp/test instructions 2020-12-31 19:14:28 -06:00
Fabian 1fa0430cb5 Remove unused macro rules 2020-12-31 19:14:28 -06:00
Fabian bc3c73a607 wasm state machine: Fallthrough 2020-12-31 19:14:28 -06:00
Fabian 1278672998 Split modrm stat into reg_with_offset and complex 2020-12-31 19:14:28 -06:00
Fabian 1de8fe1888 Fix unnecessary push to stack 2020-12-31 19:14:28 -06:00
Fabian f98f423d1b Comment 2020-12-31 19:14:28 -06:00
Fabian 78ef12be68 Custom implementations for several sse instructions
- mov dword/qword [mem], xmm
- mov xmm, dword/qword [mem]
- some arithmetic
2020-12-31 19:14:28 -06:00
Fabian 4bb3c14e57 Comment 2020-12-31 19:14:28 -06:00
Fabian 4619d4dd6d Add info to assertion 2020-12-31 19:14:28 -06:00
Fabian 63afa77167 Global pointers: Align general purpose registers, sse registers and flags 2020-12-31 19:14:28 -06:00
Fabian 6e005a2058 Integration test: Mark Windows 3 as slow test, print diff output in qemu tests 2020-12-31 19:14:28 -06:00
Fabian e99da40215 Make std/cld custom (FC/FD), remove unused unguarded_register and no_register properties from x86 table 2020-12-31 19:14:28 -06:00
Fabian 732cc2ee1c generate_interpreter: Don't stop after custom sse instructions (synchronised with check in generate_jit) 2020-12-31 19:14:28 -06:00
Fabian 0263764a5c Remove unused unguarded_register property during analysis 2020-12-31 19:14:28 -06:00
Fabian 0e8c8a1dda More opstats 2020-12-31 19:14:28 -06:00
Fabian 5f31a8aba2 Update expect tests for flags and arithmetic code generation (last two commits) 2020-12-31 19:14:28 -06:00
Fabian d98e1b2f70 Generate code (instead of call) for 32-bit arithmetic operations 2020-12-31 19:14:28 -06:00
Fabian 970739f60b Generate custom code for getzf/getcf/test_be 2020-12-31 19:14:28 -06:00
Fabian af5d01fff6 Makefile: Add tests-release target 2020-12-31 19:14:28 -06:00
Fabian e0473dae18 profiler: Count generated simple/complex modrm address expressions 2020-12-31 19:14:28 -06:00
Fabian 5da6cde13f Custom codegen for cbw/cwde/cwd/cdq/pushf/sahf (98/99/9C/9E) 2020-12-31 19:14:28 -06:00
Fabian 701d59e0dd Custom codegen for absolute cli (FA) 2020-12-31 19:14:28 -06:00
Fabian ff64866e25 Custom codegen for absolute cmpxchg (0FB1) 2020-12-31 19:14:28 -06:00
Fabian b5a72061fb Custom codegen for absolute jmp/call (FF_2/FF_4) 2020-12-31 19:14:28 -06:00
Fabian fb7e4d376a Custom codegen for lfence (0FAE_5) 2020-12-31 19:14:28 -06:00
Fabian b240a8fde9 Custom codegen for push sreg (06/0E/16/1E/0FA0/0FA8) 2020-12-31 19:14:28 -06:00
Fabian a9dac09ceb Custom codegen for xchg (91-98) 2020-12-31 19:14:28 -06:00
Fabian 091b2324d9 Custom codegen for 8C 2020-12-31 19:14:28 -06:00