Commit graph

3050 commits

Author SHA1 Message Date
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
Fabian c04ca292b9 Run latest rustfmt 2020-12-31 19:14:28 -06:00
Fabian aadaf13854 Update expect tests 2020-08-30 19:37:15 -05:00
Fabian 93ffd50969 Custom codegen for more sse move aliases (660F29/660F6F/F30F7F) 2020-08-30 19:37:15 -05:00
Fabian 75e5c2a56f Codegen for 8-bit shifts (D0/D2) 2020-08-30 19:37:15 -05:00
Fabian 815e5d338e Codegen more fpu instructions and run their tests (D9_6, DA_5) 2020-08-30 19:37:15 -05:00
Fabian fdd1dc377d Custom codegen for xadd (0FC1) 2020-08-30 19:37:15 -05:00
Fabian 874818866a Codegen for mul32 + custom mul/imul (F7_[45]) 2020-08-30 19:37:15 -05:00
Fabian 2a3e4bfa86 Minor: Remove unused 2020-08-30 19:37:15 -05:00
Fabian 1f74ee534c Simplify cmpxchg using SAFE_READ_WRITE macro 2020-08-30 19:37:15 -05:00
Fabian 58292cfbc8 namstests: Handle pagefaults 2020-08-30 19:37:15 -05:00
Fabian 8eae31295d nasmtests: Handle exceptions in forced-jit mode 2020-08-30 19:37:15 -05:00