Commit Graph
9533 Commits
Author SHA1 Message Date
Ryan Houdek 40a40b8636 Merge pull request #385 from FEX-Emu/skmp/fix-rol-ror-flags
x86disp: Fix ROL/ROR CF and OF calculation
2020-09-16 12:47:09 -07:00
Stefanos Kornilios Mitsis Poiitidis 38be0f05a3 ROL/ROR: Fix flag calculations 2020-09-16 22:43:05 +03:00
Ryan Houdek bfde44a288 Merge pull request #386 from FEX-Emu/skmp/fix-shld-shrd
x86disp: Fix shld/shrd flags
2020-09-16 12:36:51 -07:00
Stefanos Kornilios Mitsis Poiitidis 79fa103a04 SH*D: Fix shifts by zero, OF calculation 2020-09-16 22:23:53 +03:00
Stefanos Kornilios Mitsis Poiitidis ef111eb287 unittests: Fix SH*D tests 2020-09-16 22:21:41 +03:00
Ryan Houdek 72f4f76212 Merge pull request #393 from Sonicadvance1/remove_fork_die
Removes error and die in multithreaded forks
2020-09-16 11:38:47 -07:00
Ryan Houdek d0de92f97a Removes error and die in multithreaded forks
This can result in some terrible behaviour if something doesn't
immediately execve once it forks. Allow it instead of crashing out
though.
2020-09-16 11:29:57 -07:00
Ryan Houdek d424cf0eee Merge pull request #365 from phire/IR_iterators
Refactor the IR Interface to prevent "foot-shooting"
2020-09-16 11:24:44 -07:00
Ryan Houdek 07ae0e8fc5 Ensures ROL and ROR flag setting is correct
Both OF and CF tested
2020-09-16 21:14:13 +03:00
Stefanos Kornilios Mitsis Poiitidis bddc0a3445 Merge pull request #392 from Sonicadvance1/more_syscalls2
Spam out a wackload more syscalls
2020-09-16 20:55:51 +03:00
Ryan Houdek ddecec12ec Spam out a wackload more syscalls
Almost all of these end up being simple passthrough.
This covers most syscalls, the remaining ones are signal related, exec
related, or rseq required.

All of these syscalls exist prior to Linux 5.0. We are using these with
the expectation still that the host Linux implementation is 5.0 or
higher.
Once we implement newer syscalls we will need to start checking for host
Linux version. We don't really have a care about devices shipping older
4.x kernels atm.
2020-09-16 10:48:56 -07:00
Ryan Houdek addcb824e2 Merge pull request #390 from FEX-Emu/skmp/add-pendatic-smc
SMC: Add --smc-full-checks, implement frontend, irint, irjit, unit test
2020-09-16 09:26:35 -07:00
Stefanos Kornilios Mitsis Poiitidis df3bdf361f SMC: Add --smc-full-checks, implement frontend, irint, irjit, unit test 2020-09-16 01:15:21 +03:00
Ryan Houdek 703c6833fc Merge pull request #389 from FEX-Emu/skmp/asr32-should-zext
OP_ASR: Fix zext semantics
2020-09-15 10:12:18 -07:00
Ryan Houdek aa3b42da10 Merge pull request #388 from FEX-Emu/skmp/fix-cmpxchg8b-zext
x86disp: cmpxchg8b should only zext on register write
2020-09-15 10:08:06 -07:00
Ryan Houdek 605a774bc4 Merge pull request #387 from FEX-Emu/skmp/fix-dividiv-zext
x86disp: Fix div32/idiv32 zext behavior
2020-09-15 10:07:31 -07:00
Ryan Houdek 4e2c4f71f9 Merge pull request #384 from FEX-Emu/skmp/fix-shrasr-cf
x86disp: Fix LSR/ASR CF calculation
2020-09-15 10:06:38 -07:00
Ryan Houdek ded48258d6 Merge pull request #378 from FEX-Emu/skmp/fix-BT-offsets
x86disp: BT/BTR/BTS/BTC make bit index signed
2020-09-15 10:05:47 -07:00
Ryan Houdek 5a31cc9aa1 Merge pull request #383 from FEX-Emu/skmp/fix-fld-sti
x86disp: Fix FLD st(i)
2020-09-15 10:04:40 -07:00
Ryan Houdek b5e354d341 Merge pull request #380 from FEX-Emu/skmp/fix-movhlps
x86disp: Add movhlps special case
2020-09-15 10:04:17 -07:00
Ryan Houdek e11d3ed83a Merge pull request #382 from FEX-Emu/skmp/fix-xadd-regreg
x86disp: fix xadd reg,reg
2020-09-15 10:02:04 -07:00
Ryan Houdek 29cb5d1821 Merge pull request #381 from FEX-Emu/skmp/fix-8bit-idiv
x86disp: Fix 8 bit IDIV
2020-09-15 10:01:29 -07:00
Ryan Houdek c6f69e158c Merge pull request #379 from FEX-Emu/skmp/fix-inc-dec
x86disp: Fix locked INC/DEC flags
2020-09-15 10:00:53 -07:00
Ryan Houdek a6addcee5e Merge pull request #377 from FEX-Emu/skmp/fix-movd
x86tables: fix mmx movd src/dst sizes for gprs
2020-09-15 10:00:14 -07:00
Ryan Houdek d8eeccc931 Merge pull request #376 from FEX-Emu/skmp/fix-test-simm32
x86tables: Fix test simm32 extension
2020-09-15 09:58:17 -07:00
Stefanos Kornilios Mitsis Poiitidis 69d5324197 Merge pull request #375 from Sonicadvance1/rotate_with_carry
Implements RCR and RCL x86 ops
2020-09-15 19:21:26 +03:00
Stefanos Kornilios Mitsis Poiitidis 8bdcb762f7 x86disp: Fix movhlps to write all 128 bits to context 2020-09-15 18:16:33 +03:00
Stefanos Kornilios Mitsis Poiitidis b512a98c7b OP_VEXTRACTELEMENT: Fix irint size calculation 2020-09-15 18:15:56 +03:00
Stefanos Kornilios Mitsis Poiitidis c875beb74b OP_ASHR: Fix zext semantics after sext 2020-09-15 17:02:09 +03:00
Ryan Houdek c819afebea Unit test to ensure ASHR Sexts to the correct sizes 2020-09-15 16:57:10 +03:00
Ryan Houdek ac297d4b59 Unit test to ensure cmpxchg8b doesn't corrupt registers
On mem != expected it'll zext the memory value to the full 64bits
on mem = expected RAX and RDX aren't touched, so they maintain the upper
32bits
2020-09-15 13:47:05 +03:00
Stefanos Kornilios Mitsis Poiitidis 92ad556534 cmpxchg8b: Only set registers if compare failed 2020-09-15 13:46:52 +03:00
Ryan Houdek ad70f2fa81 Unit test to ensure 32bit IDIV/DIV ZExts to 64bit result 2020-09-15 13:45:05 +03:00
Stefanos Kornilios Mitsis Poiitidis c99cc9c6d3 DIV/IDIV: Fix Zext for 32 bit divides 2020-09-15 13:44:49 +03:00
Ryan Houdek cadf53c9d9 SHRD and SHLD unit tests for flag setting
Tests all flags aside from PF
2020-09-15 13:42:57 +03:00
Stefanos Kornilios Mitsis Poiitidis d441ebe489 SHLD/SHRD: Less broken flags, correct zero shifts 2020-09-15 13:42:43 +03:00
Ryan Houdek 809828f480 Adds unit tests for shr/asr imm for ensuring correct flags 2020-09-15 13:37:33 +03:00
Stefanos Kornilios Mitsis Poiitidis dd7f3ddef3 SHR/ASR,imm: Fix CF calculation 2020-09-15 13:36:37 +03:00
Ryan Houdek 705c9a2633 Fixes st(i) unit test
This needs to pull the value off the stack /prior/ to pushing
2020-09-15 13:34:21 +03:00
Stefanos Kornilios Mitsis Poiitidis 0cc9ecfab4 OpDispatcher: FLD ST(i) should read before stack push 2020-09-15 13:34:07 +03:00
Ryan Houdek 9e055d9ba7 Ensures xadd stores the correct result in to the destiation register
For when both source and destination is GPR
2020-09-15 13:32:24 +03:00
Stefanos Kornilios Mitsis Poiitidis af99407228 xadd: fix xaddb reg,reg & xadd reg,same reg
Found via qemu's test-x86_64
2020-09-15 13:32:04 +03:00
Ryan Houdek db6c62c213 Ensures that 8bit idiv dividend is 16bit 2020-09-15 13:29:50 +03:00
Stefanos Kornilios Mitsis Poiitidis 611499d0ee IDIV: Fix 16 by 8 divide 2020-09-15 13:28:57 +03:00
Ryan Houdek 68752de97c Fixes missing movhlps test and moves current to correct file
movhlps moves from top 64bits of second argument to bottom 64bits of
destination

Only supports reg<->reg movement
2020-09-15 13:26:28 +03:00
Stefanos Kornilios Mitsis Poiitidis 4ea5457734 movhps: reg,reg should be movhlps special case 2020-09-15 13:26:17 +03:00
Ryan Houdek ad37555d70 Ensures inc/dec flags match between locked and non locked memory 2020-09-15 13:23:42 +03:00
Stefanos Kornilios Mitsis Poiitidis 5704ce4db9 INC/DEC: Fix atomicity and flags for locked variants 2020-09-15 13:23:30 +03:00
Ryan Houdek 1b6767fbac Adds BT/BTC/BTR/BTS unit tests to test negative offset
The offsets are signed integers, not unsigned
2020-09-15 13:19:17 +03:00
Stefanos Kornilios Mitsis Poiitidis 75b70b8e13 BT/BTC/BTR/BTS: Should use signed offset for bit index 2020-09-15 13:19:01 +03:00