Commit Graph

1088 Commits

Author SHA1 Message Date
NPCompete da66c68bf6 [CPU] Made xe::cpu::StackWalker destructor virtual since it is an abstract class. 2018-11-17 14:50:30 -08:00
Dr. Chat aa14741e74 [x64] Fix unwind info bug; Cleanup win code cache 2018-11-17 14:40:25 -06:00
Triang3l 55fa9e6917 Merge branch 'master' into d3d12 2018-11-17 20:06:55 +03:00
Dr. Chat 69af4a21ac [x64] Fill unwind reservation info bytes with 0xCC as well 2018-11-17 11:04:25 -06:00
Triang3l 1f33c221a2 Merge branch 'master' into d3d12 2018-11-10 11:47:13 +03:00
emoose ab53cf2a82 [CPU] Fix some compressed XEXs decompressing past the image size 2018-11-05 19:47:18 +00:00
Triang3l d55a2a586f Merge branch 'master' into d3d12 2018-11-02 09:30:53 +03:00
emoose bbb5c938ec [CPU] Fix XexModule::FindSaveRest not finding functions properly 2018-11-01 15:50:56 +00:00
Triang3l c7befee395 Merge branch 'master' into d3d12 2018-10-28 20:31:49 +03:00
Dr. Chat 7443b7e61f [CPU] Rename ImportLibrary fields to follow naming conventions 2018-10-28 09:41:31 -05:00
emoose 6e74ba93d6 [CPU] Add support for delta patches using *_offset fields 2018-10-22 12:26:14 +01:00
emoose d2fd109af3 [CPU] Add more asserts for XEXP descriptor (+ log a warning) 2018-10-20 05:08:14 +01:00
emoose 265903fe66 [CPU] Add XEXP support to XexModule, if XEXP is in same folder as XEX
This was a headache to work out, big thanks to the lack of documentation on .xexp files... a ton of guesswork was involved here but luckily it turned out well.

I did have to make some pretty major changes to the way XEX files are loaded though.
Previously it'd just load everything in one go: XEX headers -> decrypt/decompress data -> load imports/symbols -> set loader data table entries, etc...

Now it's changed to something like this:
- Load base XEX headers + decrypted/decompressed image data, return X_STATUS_PENDING
- In the LoadFromFile call used to load the XEX, search for XEXP patch file (only .xexp in same folder atm)
- If patch exists: load XEXP, decrypt headers/data, apply patch to base XEX, dispose of XEXP
- Finish XEX load via LoadXexContinue() (handles imports/symbols/loader data...)

This saves us from needing to reset the imports/function/symbol stuff after patching (since all the XEX code will be a lot different), but I'm not really sure if I went about it the best way.
2018-10-20 04:36:21 +01:00
emoose 0b7f7e1657 [CPU] Move XEX2 code into XexModule class, autodetect XEX key
Code is mainly just copy/pasted from kernel/util/xex2.cc, I've tried fixing it up to work better in a class, but there's probably some things I missed.

Also includes some minor improvements to the XEX loader, like being able to try both XEX keys (retail/devkit) automatically, and some fixes to how the base address is determined.

(Previously there was code that would get base address from optional header, code that'd get it from xex_security_info, code that'd use a stored base address value...
Now everything reads it from a single stored value instead, which is set either from the xex_security_info, or if it exists from the optional header instead.
Maybe this can help improve compatibility with any weird XEX's that don't have a base address optional header?)

Compressed XEX loader also has some extra checks to make sure the compressed data hash matches what's expected.
Might increase loading times by a fraction, but could save reports from people unknowingly using corrupt XEXs.
(still no checks for non-compressed data though, maybe need to compare data with xex_security_info->ImageHash?)
2018-10-20 04:18:18 +01:00
Christian Hawley add23849bf [CPU] Implement lmw and stmw instructions 2018-10-14 13:57:45 -04:00
Triang3l 6e36101b42 [D3D12] Experimental write watch implementation for shared memory 2018-09-24 23:18:16 +03:00
Triang3l db625892ea [D3D12] Shared memory typo fix and improvements 2018-08-01 01:09:51 +03:00
Triang3l 4f7edff19d [D3D12] SHM: Watches prototype, some uploading 2018-07-26 22:52:26 +03:00
Triang3l dd19701dc4 [CPU] Unify constant operand checks in pack/unpack 2018-06-18 13:55:46 +03:00
Triang3l c89cc6a229 [CPU] vupkd3d: NaN on negative overflow and tests 2018-06-11 21:34:13 +03:00
Triang3l 0378f532ab [CPU] Fix W in 2101010 vupkd3d and revert untested saturation 2018-06-11 17:22:15 +03:00
Triang3l 06fcdef968 [CPU] Bring back saturation in D3DCOLOR vpkd3d128 2018-05-31 16:17:27 +03:00
Triang3l d61aff4389 [CPU] v(u)pkd3d128: Support UINT_2101010 and don't saturate D3DCOLOR
Fix broken mesh polygons in the Call of Duty series. Also remove saturation of D3DCOLOR when packing because values near 3 may be accepted, while unpacking D3DCOLOR gives values near 1.
2018-05-31 14:42:11 +03:00
gibbed 452c58149a [CPU] Some extra srw tests. 2018-05-22 05:56:20 -05:00
Dr. Chat 198cc9b9b9 [CPU] Print a message and crash if the CPU does not support AVX. 2018-05-03 22:12:36 -05:00
DrChat 14abe1a407 Fixup 360 support 2018-04-03 19:02:49 -05:00
DrChat 157c7780af [JIT] Add V128 ADD/SUB (fixes #1095) 2018-03-03 18:24:57 -06:00
DrChat 1c1fdb4ccd [JIT] Properly mask NaNs in vctsxs 2018-03-03 14:06:45 -06:00
DrChat 894bbf9e26 [JIT] Fix incorrect definition for constant VectorConvertX2X 2018-03-02 19:03:48 -06:00
DrChat 3a8f8f2ecb [JIT] Fix OPCODE_SELECT V128 with certain combinations of constants 2018-03-02 18:56:28 -06:00
DrChat 2af0a3c2f4 [JIT] Mask extraction constants in Value::Extract 2018-03-02 18:55:52 -06:00
DrChat 49866e970b [JIT] VectorConvertX2X unsigned support 2018-03-02 16:34:57 -06:00
DrChat fd0d2185ef [JIT] Full support for vcfux 2018-03-02 15:11:29 -06:00
DrChat b0b920c040 Linting. 2018-03-02 12:14:09 -06:00
DrChat 6c97dbaf81 [JIT] Simplify VECTOR_ADD/SUB i32 with saturate 2018-03-02 11:48:19 -06:00
DrChat 131fcd1320 [JIT] Kill a couple instructions in VECTOR_CONVERT_F2I 2018-03-02 11:41:04 -06:00
DrChat 04d20e33a5 [JIT] Add another test case to vctuxs 2018-03-02 00:05:43 -06:00
DrChat 0577b6c9be [JIT] Full vctuxs support 2018-03-01 23:49:44 -06:00
DrChat 4766a5ec24 [JIT] Add FIXME on constant Vector F2I (saturation unsupported) 2018-03-01 21:15:54 -06:00
DrChat 6fd75cea91 [CPU] Handle constant multiply in fmadd/fmsub in constant propagation pass 2018-03-01 20:04:56 -06:00
DrChat db53559611 Merge branch 'master' 2018-02-16 16:34:17 -06:00
DrChat 43f9cebb0c [JIT] Rewrite CNTLZ and remove one branch 2018-02-16 12:51:39 -06:00
DrChat ec501a32c6 [JIT] Apply the same ZeroExtend/Truncate to rlwimix and rlwnmx 2018-02-14 22:05:54 -06:00
DrChat e54c24e150 [JIT] New opcodes: OPCODE_LOAD_OFFSET and OPCODE_STORE_OFFSET
These take full advantage of x86 addressing, and eliminate extra add operations.
2018-02-14 16:26:49 -06:00
DrChat 1de598e4ce [JIT] Comment the offsets in PPCContext 2018-02-14 16:22:14 -06:00
DrChat 7818cdab60 [CPU] Check for RawModule memory allocation success 2018-02-14 16:21:16 -06:00
DrChat 02b5a07bc9 [JIT] rlwinmx: Use Truncate/ZeroExtend instead of And 0xFFFFFFFF 2018-02-14 13:50:57 -06:00
DrChat 1d0b290c3d [JIT] Remove all calls to ReloadMembase / ReloadContext (rcx/rdx free now) 2018-02-13 13:33:39 -06:00
DrChat e2bbae3896 [JIT] Don't bother using a temp for constant addresses < 0x80000000 2018-02-13 13:09:40 -06:00
DrChat a1677d34e1 [CPU] MMIOHandler IsRangeWatched now returns true if the entire range is watched. 2018-02-09 19:23:24 -06:00
DrChat 190108dab6 [CPU] Add some more docs to MMIO handler functions 2018-02-09 18:26:12 -06:00
DrChat 7da973d9e6 [CPU] Handle cases in access watches where base addresses overlap 2018-02-09 17:21:35 -06:00
DrChat 9e79babde0 Formatting. 2018-02-07 18:55:26 -06:00
DrChat 26212bffb0 [x64 seq] Reuse the source variable rather than re-specifying the destination (to make things less confusing) 2018-01-24 20:57:11 -06:00
DrChat 9395b73217 [Travis] Enable full Xenia build on linux 2017-12-20 16:27:01 -06:00
DrChat aaf281351d Format all code with new clang-format 2017-12-14 20:44:43 -06:00
DrChat 02e37be4e5 Merge branch 'linux' of git://github.com/dougvj/xenia into linux
# Conflicts:
#	.travis.yml
2017-12-14 19:20:02 -06:00
scribam b6e7e66fbe Fix travis LINT 2017-09-20 23:29:39 +02:00
Dr. Chat 8d261ca73d x64 JIT: Simplify splats 2017-08-08 00:12:38 -05:00
Doug Johnson 48a2435bde Add header dependencies that prevented linux build
There were several files with dependancies on vector and cmath that
caused compiler errors under linux. In addition, there was a printf
formatting error that threw a compiler error as well
2017-07-11 11:47:24 -06:00
Parker Lamb 4b607a68ba PPC: Fix typo in instruction disassembly for mtspr. 2017-06-11 14:40:59 -05:00
Parker Lamb 3117d737ed PPC: Fixed padding for FormatDS instruction decode data. 2017-06-11 14:28:07 -05:00
Dr. Chat e8f55d8ff2 PPC: Support FPSCR[RN] (rounding mode) 2017-05-20 12:15:19 -05:00
Dr. Chat 7a3af9b2c4 PPC: Fix vsl[b/h/w] and vsr[b/h/w] with variable shift amounts. 2017-05-15 11:08:09 -05:00
Dr. Chat 6ea6b8b51d x64: Change binary strings to actual binary numbers. 2017-05-14 09:28:58 -05:00
gibbed e2434e50a0 Updated to latest Xbyak. 2017-05-14 02:03:01 -05:00
Dr. Chat 16cff62d36 Base: Remove memory::DeallocationType::kDecommitRelease (an invalid combination) 2017-05-14 00:59:52 -05:00
Dr. Chat 66dbd86989 PPC: Support NaN in fcmp[o/u]x. 2017-05-14 00:24:35 -05:00
gibbed eff9ba31d2 Fixed PPCContext::cr() returning incorrectly shifted state. 2017-05-14 00:02:47 -05:00
Dr. Chat 6e2bf0b4b1 Native test runner: Support FPSCR 2017-05-13 23:12:53 -05:00
Dr. Chat 6990d21a8d Update test framework documentation 2017-05-12 18:34:01 -05:00
Dr. Chat d3ed53c43e PPC: Support v[u]pkd3d128 VPACK_NORMSHORT4 2017-05-12 17:55:52 -05:00
Dr. Chat 82efbd7bc5 HIR: Add opcode SET_ROUNDING_MODE (taking FPSCR as an argument) 2017-05-12 14:05:27 -05:00
Dr. Chat dbece71945 native-tests: Add altivec save/restore support (only up to 32 registers) 2017-05-12 12:00:35 -05:00
Dr. Chat 7e9d63e33d Gracefully handle test suites failing to load without exiting. 2017-05-11 15:59:34 -05:00
Dr. Chat 747f7d65d8 PPC-nativetests: Zero out the context between runs 2017-05-11 15:59:34 -05:00
Dr. Chat 737b78ad49 Last stretch to get PPC native tests working 2017-05-11 15:09:43 -05:00
Dr. Chat 7eceb9db09 PPC nativetests require gflags! 2017-05-11 11:41:34 -05:00
Dr. Chat cf838439b7 Whoops! Fix formatting. 2017-05-11 11:38:50 -05:00
Dr. Chat ccd6d4b199 (WIP) Add a native PowerPC testing frontend 2017-05-08 22:21:43 -05:00
DrChat cff80bd782 fctiw[z]x: Sign-extend the result (verified by HW) 2017-04-26 12:28:35 -05:00
Cesys d2605bce18 Fixing Altivec lvrx and stvrx 2017-03-31 11:00:51 -07:00
DrChat e699be0118 Logging: Add a flag to specify the minimum log level
--log_level = (0=error, 1=warning, 2=info, 3=debug)
2017-03-24 16:28:41 -05:00
DrChat f012845cb6 JIT: Propagate mul/div by constant one 2017-03-16 18:49:55 -05:00
Dr. Chat 5ed086f03f x64 Code Cache: Notify Intel VTune of generated functions. 2017-03-16 17:45:47 -05:00
Dr. Chat c4b728b121 MMIO Handler: Don't allow more than one watch to occupy the same region (fire old watches if a new one overlaps) 2017-03-11 20:55:01 -06:00
Dr. Chat 257fbfc408 ELF Loader: Fix linux build 2017-03-07 12:33:18 -06:00
Dr. Chat cbab45c4b7 Improve ELF loading 2017-03-06 17:59:19 -06:00
Dr. Chat 098d23c3d4 JIT - fctidz: Properly saturate 2017-03-06 01:06:32 -06:00
Dr. Chat d8ed251ad1 Tests: Handle integer floating point numbers 2017-03-06 01:04:59 -06:00
Dr. Chat 31766eaf8d JIT: oops 2017-03-05 18:06:39 -06:00
Dr. Chat d5e7bc8dca JIT - vctsxs: Properly saturate signed integers 2017-03-05 17:45:17 -06:00
Dr. Chat ea89a5d179 JIT - fctixx: Properly handle numbers > INT_MAX 2017-03-05 15:04:26 -06:00
Dr. Chat ad5748f3e7 Handle cases where the optional import header isn't present :P 2017-02-25 20:28:45 -06:00
Dr. Chat c08d4e862e PPC Testing: Don't discover . and .. 2017-02-18 00:43:45 -06:00
Justin Moore 591e581a70 Merge pull request #663 from resetnow/linux-build-fixes
Linux + clang build fixes
2017-02-11 20:32:33 -06:00
DrChat d43e2c7ff8 xenia-cpu-ppc-tests is now building on linux 2017-02-10 23:54:10 -06:00
DrChat 11ae05155d Fix casting between XThread and Thread causing pointer misalignment 2017-02-10 23:35:35 -06:00
DrChat 1334656c6a xenia-cpu-ppc-tests: Adjust link order for clang 2017-02-07 18:15:30 -06:00
Vlad Ivanov f0ba717142 Fix a bunch of missing cmath includes
...as well as missing std:: namespace specifiers
2017-02-07 20:26:08 +03:00
Dr. Chat 4c55039c22 Remove xenia-cpu dependency on xenia-kernel 2017-02-06 21:57:18 -06:00
Dr. Chat b66f10f2b8 Testing travis xenia powerpc testing 2017-02-06 00:40:06 -06:00
Dr. Chat 8947a7626e Linting fixes :) 2017-02-05 22:53:30 -06:00
Dr. Chat 803f0be049 Linux header fixes 2017-02-05 22:45:01 -06:00
gibbed d730784efb Added XBDM stubs. 2017-01-09 04:51:55 -06:00
Dr. Chat 691c3d1021 EXTRACT_I32: Support constant src1 2016-11-11 16:50:42 -06:00
Dr. Chat a148b965f1 KernelState should handle module launching 2016-10-24 11:01:10 -05:00
Dr. Chat 52c75c8dbc x64 backend: Pass guest return address as first argument to guest functions. 2016-08-26 13:46:21 -05:00
Dr. Chat 7683069f6c Set context/membase registers to rsi/rdi respectively.
Use offsetof for the backend thunks.
2016-08-26 11:00:42 -05:00
Dr. Chat 5f4416ee2f x64 backend: Save nonvolatile XMM registers on host -> guest transitions
Define the context and membase registers in the x64 emitter.
2016-08-22 14:55:16 -05:00
Dr. Chat e3fdb08ad7 x64 JIT: Allocate constant data outside of the guest heap. 2016-08-18 18:26:55 -05:00
Dr. Chat 22794902f3 CNTLZ: Invert the result using xor rather than subtraction 2016-08-01 13:25:44 -05:00
Dr. Chat a72f1d949f Constant propagation for vector SGT/UGE/UGT
Constant rounding (and fixed vec128 rounding only doing x)
2016-07-25 11:57:14 -05:00
Dr. Chat 8427acfada Use vpminud to saturate rather than bitwise ops (shaves 6 instructions per 16 in 32 saturated pack) 2016-07-23 19:19:40 -05:00
Dr. Chat 2d55b12cc9 Fix a race condition in x64 code cache involving RtlGrowFunctionTable 2016-07-19 13:59:40 -05:00
Dr. Chat 18ff97e6b6 OPCODE_IS_NAN 2016-07-11 20:44:12 -05:00
Dr. Chat 3d1d4dea47 OPCODE_DOT_PRODUCT_4 constant propagation 2016-06-28 19:39:22 -05:00
Dr. Chat f2ad6b8cb8 OPCODE_RECIP 2016-06-26 13:03:42 -05:00
gibbed 8965fda402 RSqrt for VEC128_TYPE. 2016-06-20 13:31:11 -05:00
gibbed 53e37c3167 Constant propogation for DOT_PRODUCT_3. 2016-06-20 13:30:19 -05:00
gibbed 450ca87120 Added comparison operator for --break_on_instruction. 2016-06-19 21:01:18 -05:00
gibbed b5bef8c54d Undoing the previous commit in favor of finding a better solution (xmm1/xmm2 can't safely be used here). 2016-06-19 02:33:52 -05:00
gibbed d04a6cc983 Added support for when both src1 and src2 are constants in EmitCommutativeBinaryXmmOp and EmitAssociativeBinaryXmmOp. 2016-06-19 02:10:40 -05:00
Dr. Chat d5865740e2 Add a few more vector tests 2016-06-12 21:45:51 -05:00
Dr. Chat 0ef16b10e2 Constant Propagation for OPCODE_VECTOR_ADD 2016-06-12 21:41:02 -05:00
Dr. Chat 841f6fe239 Merge branch 'vulkan' 2016-06-11 19:23:23 -05:00
Dr. Chat 32011a841e Formatting. 2016-06-05 17:48:06 -05:00
Haydn Trigg ff5529714c clang-format to Google Standards
Added formatting to code
2016-05-29 13:22:14 +09:30
Haydn Trigg f2ca689ea0 Expanded vec128 and VectorSub
Added double precision (f64) values to the vec128 structure
Added cases for all formats of data for vector subtraction in the
Value::VectorSub function

NOTE: Unsure what the saturate function is for however maintained
original functionality
2016-05-17 05:34:09 +09:30
Dr. Chat 0e3c113375 Physical write watches -> access watches (read and/or write watching) 2016-03-17 21:55:16 -05:00
Ben Vanik 06ba273492 Warn and be ok with symbol services failing. 2016-02-21 14:26:16 -08:00
Ben Vanik 05107d2d3e Skeleton xenia::gpu::vulkan implementation, enough to start trace viewer. 2016-02-18 16:43:41 -08:00
sephiroth99 5d9a4b6830 Handle all other cases in switch statements 2016-01-20 11:00:37 -05:00
sephiroth99 4c0f9e6342 Add missing includes 2016-01-20 10:36:01 -05:00
Ben Vanik 6777ce6668 Reconcile debugger and save state stuff into a single implementation.
Fixes #497 and fixes #496.
Still rough edges, but at least less duplication.
2016-01-18 11:48:21 -08:00
Ben Vanik 9473f20c7f Fixing travis lint diff. 2016-01-13 22:55:28 -08:00
Ben Vanik 2e826f9321 Supporting constants in Haswell codepaths for mul_add/sub. 2016-01-13 22:29:39 -08:00
Dr. Chat 0771eea0b3 Change comments to comply with local regulations. 2016-01-13 19:41:15 -06:00
Dr. Chat bd6bf16bd1 New flag: disable_global_lock - Disables global lock usage in guest code. 2016-01-13 19:40:00 -06:00
Dr. Chat 14c5e48120 Enable speculative PACK_TYPE_FLOAT16_3 2016-01-13 01:48:18 -06:00
Dr. Chat 36372d1eae Enforce xex memory protections 2016-01-13 01:47:06 -06:00
Dr. Chat f0802d75fa Use atomic compare exchange in stdcx/stwcx (still under the global lock) 2016-01-13 01:45:31 -06:00
Dr. Chat 51dde62f09 x64 backend vector optimizations 2016-01-13 01:43:23 -06:00
Dr. Chat 7b6f1388d6 OPCODE_ATOMIC_COMPARE_EXCHANGE 2016-01-13 01:41:58 -06:00
Dr. Chat 3ccb2a978d Propagate vector constants. 2016-01-13 01:40:44 -06:00
Dr. Chat 6d2f083b09 Up the maximum function count to 50,000 2016-01-13 01:30:15 -06:00
Ben Vanik 86b706d87c Merge pull request #509 from x1nixmzeng/xex-resources
Rebrand the Xenia window with module metadata
2016-01-10 08:55:47 -08:00
x1nixmzeng 3eb602c93a Assert library name index is in range of the string table
As suggested by @DrChat
2016-01-09 17:55:57 +00:00
x1nixmzeng 6530b9dc49 Added callback when new module is launched
This avoids having to guess the display window title format
Also manually fixed the linting errors picked out by travis which do not
get picked up using xb format locally
2016-01-09 17:36:46 +00:00
x1nixmzeng 06f259c87d Mask the name index instead
The maximum number of import libraries (32) is already asserted
2016-01-09 02:43:29 +00:00
x1nixmzeng 7e4fdf7669 Fixed rare crash when accessing library import by name
The library name index may only be 8-bits.

This bug was not present in the previous implementation due to a bitmask
(0xFF) - see
ea99ba8e3b/src/xenia/kernel/util/xex2.cc (L272)
2016-01-09 01:19:05 +00:00
Ben Vanik a95be25e2f Merge branch 'linuxfix' of https://github.com/sephiroth99/xenia into sephiroth99-linuxfix 2015-12-31 14:39:23 -08:00
Ben Vanik 952d35911c Folding build_tools back into the main repo for simplicity. 2015-12-30 16:53:14 -08:00
Ben Vanik 214532a3e8 Fiddling with FPSCR and such. Still not implemented, but wiring done. 2015-12-30 16:53:14 -08:00
Ben Vanik c296d581cf Readback CA in XER. 2015-12-30 16:53:12 -08:00
sephiroth99 9451c0b1cf Fix different types in std::min arguments 2015-12-30 17:42:18 -05:00
sephiroth99 3f49aa3cef Add default case for unhandled target_type values 2015-12-30 17:42:18 -05:00
sephiroth99 da71bc26a2 Use correct value in unhandled case assert 2015-12-30 17:42:18 -05:00
Ben Vanik cbc74c92f4 Fixing CR update for divwu/divdu/mulhwu. 2015-12-30 10:04:57 -08:00
Ben Vanik 69c7bac8db Fixing branch address calculation. 2015-12-30 09:47:24 -08:00
Ben Vanik 3c332ef1f5 Adding/removing saturate checks where required. 2015-12-30 09:31:03 -08:00
Ben Vanik 74d71f7a4a Fixing the rlw* instructions. 2015-12-30 09:02:29 -08:00
Ben Vanik b09e32ec15 Adding tests for broken rlwnm and rliwnm. Not yet fixed. 2015-12-29 20:58:38 -08:00
Ben Vanik 321e2663ef Fixing mullw. 2015-12-29 20:42:20 -08:00
Ben Vanik d7eff7c9e3 Marking some memory instructions as kM. 2015-12-29 17:53:49 -08:00
Ben Vanik cc37fb1358 Updating to the latest capstone. Fixes #440. 2015-12-29 15:19:08 -08:00
Ben Vanik 9c694f07b3 Better trap message. 2015-12-29 13:40:53 -08:00
Ben Vanik 948aa2400d Formatting all code. Too gnarly to rebase properly. 2015-12-29 13:13:34 -08:00
Dr. Chat b9159ddee8 X64CodeCache: Add a couple of overflow debug asserts 2015-12-29 13:09:52 -08:00
Ben Vanik 383a173a18 REBASE: fixing xthread instruction decoding. 2015-12-29 13:09:50 -08:00
Dr. Chat 1442f50058 X64Backend: Take a reference of the pair rather than a copy (and formatting) 2015-12-29 13:09:40 -08:00
Dr. Chat 0f82e0d090 Make the processor automatically generate any ungenerated functions when installing a breakpoint. 2015-12-29 13:09:37 -08:00
Dr. Chat ce2d6da2a1 Processor breakpoints: Change iterators to C++11 syntax where necessary 2015-12-29 13:09:35 -08:00
Dr. Chat 1ce6a7580b Fix CaptureStackTrace with null out_stack_hash 2015-12-29 12:35:59 -08:00
Dr. Chat d99008bfac RawModule::SetAddressRange - Notify the backend about this range. 2015-12-29 12:35:58 -08:00
Dr. Chat 38a09cbcc2 ExecuteRaw: Pass in 0xBC... magic so Xenia will return to the guest caller. 2015-12-29 12:35:57 -08:00
Dr. Chat 6d98628962 Remove Function::Call extern handler shortcut (as we need old behavior for savestates) 2015-12-29 12:35:56 -08:00
Dr. Chat 67a45203e3 Uninstall the X64 backend exception callback on exit. 2015-12-29 12:35:56 -08:00
Dr. Chat e206d13af7 Flag mfmsr/mtmsr/mtmsrd as context-synchronizing instructions 2015-12-29 12:35:04 -08:00
Dr. Chat 87cdce1440 Export kBlocking tag 2015-12-29 12:32:48 -08:00
Dr. Chat db8eb83057 Track export data on Guest Functions 2015-12-29 12:32:47 -08:00
Dr. Chat 42c657c40a Remove processor dependency on XThread for breakpoints 2015-12-29 12:32:47 -08:00
Dr. Chat 666f5543a8 Cleanup ThreadState and XThread 2015-12-29 12:32:46 -08:00
Dr. Chat 41d5b41523 Automatically install any CPU breakpoints in any newly-defined functions if necessary. 2015-12-29 12:32:01 -08:00
Dr. Chat d09e3b7953 Fix incorrect backend breakpoints implementation 2015-12-29 12:32:00 -08:00
Dr. Chat 28468f8a18 cpu::Processor now tracks a pointer to the emulator. 2015-12-29 12:32:00 -08:00
Dr. Chat 7d59258839 Processor::ExecuteRaw
Changed the breakpoint lock to a recursive mutex.
2015-12-29 12:28:57 -08:00
Dr. Chat ac706f6923 Allow breakpoint addresses to be changed after creation 2015-12-29 12:28:56 -08:00
Dr. Chat e383e2f101 Processor breakpoint support 2015-12-29 12:28:56 -08:00
Ben Vanik 214957da3a Adding finer-grained instruction classification. 2015-12-29 11:02:00 -08:00
Ben Vanik cc72de0f64 Moving disasm to new tables.
Also adding useful CPU docs.
2015-12-28 20:49:22 -08:00
Ben Vanik cd938be678 Removing all uses of the old PPC tables besides disasm. 2015-12-28 10:08:38 -08:00
Ben Vanik 990d973c74 New ppc opcode decoder.
Seems to work and match up with the old decoder (which may be bad).
Old decoder remains until all functionality is replaced.
2015-12-27 22:53:05 -08:00
Ben Vanik ca8d658ffe Speeding up PPC tests significantly. 2015-12-27 12:03:30 -08:00
Ben Vanik 0e58208add Dropping elemental-forms and swapping out with imgui.
Too much code for such little use. This should simplify porting.
2015-12-26 20:25:24 -08:00
Ben Vanik 15816327b4 Renaming xe::cpu::frontend to xe::cpu::ppc. 2015-12-14 21:17:55 -08:00
Ben Vanik 9273359cdd Removing vestigial ContextInfo. 2015-12-14 20:57:14 -08:00
Ben Vanik 5e6c1f5a50 Removing some dead code. 2015-12-14 20:49:50 -08:00
Dr. Chat 3ebd53ba11 Fix crandc/crnand/crnor/crorc not properly taking the complement of the CR fields. 2015-12-13 18:32:57 -06:00
Ben Vanik 81d0376106 Fixing use before check for null. 2015-12-05 23:24:40 -08:00
Dr. Chat bc1e7684ca Pass rounding mode from i->flags for OPCODE_CONVERT 2015-12-02 14:03:15 -06:00
Dr. Chat 17d18f7154 Implement a few cases for Value::Cast/Convert 2015-12-02 14:01:28 -06:00
Dr. Chat 57a823ae39 Add (commented out) code to setup page protections for xex modules. 2015-12-01 19:53:17 -06:00
Dr. Chat 525d62d437 constant OPCODE_CONVERT and more cases for OPCODE_LOAD 2015-12-01 19:51:28 -06:00
Dr. Chat 873016f06f Fix double-swap in constant load 2015-12-01 19:03:51 -06:00
Ben Vanik 82fe65475e Fixing sqrt/rsqrt mixup.
Queue the 'how did this ever work?!'
2015-11-30 17:22:08 -08:00
Ben Vanik 51c3df1e2e Making mtmsr & co synchronize the context. 2015-11-25 17:37:20 -08:00
Ben Vanik dfd92757a9 Adding CONTEXT_BARRIER to force the PPC context to synchronize.
This is just an annotation right now, as it's not actually needed.
2015-11-25 14:48:36 -08:00
Ben Vanik 1956b8708e Fixing include orders and whitelisting others.
Will be broken until clang SVN 253772 is available on travis/snapshots.
2015-11-21 11:34:46 -08:00
Dr. Chat 529227e4e6 MMIOHandler::InvalidateRange 2015-11-08 18:18:28 -06:00
Ben Vanik 4af6c41740 Moving profiling.h to base - UI could be separated for cleanliness. 2015-11-07 12:31:07 -08:00
Dr. Chat aeb635e31d vcmpbfp tests 2015-11-07 14:27:24 -06:00
Dr. Chat abf37ed9be Fix vcmpbfp returning that the value is out of bounds for values equal to the bounds. 2015-11-06 19:04:59 -06:00
Ben Vanik 35a9697af7 Merge pull request #446 from AlexAltea/master
Fixed mtcrf which was wrongly implemented as mtcr
2015-11-06 15:11:10 -08:00
Dr. Chat 9985187b23 Implement vpkuwum/vpkuhum
Fixed vpkuwus with signed numbers
Implement some constant sources for vec average/unpack
2015-11-06 15:18:48 -06:00
Dr. Chat 64b0cc9d5e Enabled tests for vpkuhum/vpkuwum and added test with negative numbers for vpkuwus 2015-11-06 14:57:42 -06:00
Ben Vanik 5087ccd565 Tracking capstone next. 2015-11-05 18:43:15 -08:00
Ben Vanik 5525f6c0a2 Tracking master xbyak. 2015-11-05 17:17:52 -08:00
Dr. Chat 430d4c7182 Fix rare deadlock in the MMIO handler. 2015-11-05 18:13:15 -06:00
Dr. Chat f3fe260a17 Fallback case if indirection table could not be allocated. 2015-11-04 06:46:52 -06:00
Ben Vanik e0b3d24a50 Merge pull request #445 from DrChat/kernel_trampolines
Generate trampoline functions for GetProcAddress on kernel modules
2015-10-24 17:16:33 -07:00
Alexandro Sánchez Bach c6751c1e5f Fixed mtcrf which was wrongly implemented as mtcr 2015-10-25 00:44:33 +01:00
Dr. Chat 729f762c5d RawModule SetAddressRange/set_name 2015-10-24 14:02:08 -05:00
Dr. Chat 55e811450d Lint 2015-10-22 20:22:34 -05:00
Dr. Chat 407d79cf3e Fix MMIO handler race condition by rechecking page access protections under the global lock. 2015-10-22 20:18:08 -05:00
Ben Vanik 91dfb6a8a0 Merge pull request #436 from DrChat/misc_changes
Misc changes
2015-10-17 01:15:20 -07:00
sephiroth99 9dfabba583 Fix compile error uncovered by Clang 3.8. 2015-09-25 23:50:05 -04:00
Dr. Chat c33e95981b Formatting. 2015-09-25 18:46:50 -05:00
Dr. Chat bf39e33dc0 Raw modules need to commit an executable range too! 2015-09-25 18:35:33 -05:00
Dr. Chat a9b557e8b9 Allow passing of >7 arguments through Processor::Execute
Set entry status to failed if LookupFunction failed
2015-09-25 18:24:12 -05:00
Ben Vanik ee92f75a84 Updating to the latest clang-format. Make sure to update yourselves! 2015-09-22 08:26:19 -07:00
sephiroth99 08ae855e07 It seems 'export' is a reserved keyword for clang. 2015-09-22 07:45:52 -07:00
sephiroth99 542f5ba8e5 Move GetTempReg higher in the source file, before its first usage. 2015-09-22 07:39:26 -07:00
Ben Vanik 4c8634bc31 Fixing breakpoints. 2015-09-21 21:10:57 -07:00
Ben Vanik 5d033f9cb3 A new debugger.
Lots of bugs/rough edges/etc - issues will be filed.
Old-style debugging still works (just use --emit_source_annotations to get
the helpful movs back and --break_on_instruction will still fire).
2015-09-20 21:31:05 -07:00
Dr. Chat a2bc0443f2 Quick-kill the MMIO handler if the fault address is above the mapping range. 2015-09-07 21:26:33 -05:00
Ben Vanik e5fbf840d2 Shuffling kernel/. 2015-09-06 18:07:52 -07:00
Ben Vanik 790ce8aee1 Switch back to std:: muteces. mutices. mutexen. 2015-09-06 13:34:08 -07:00
Ben Vanik 9ae807e56e Initialize builtins to 0. 2015-09-06 10:07:27 -07:00
Ben Vanik 3c96b6fa0a DANGER DANGER. Switching to global critical region.
This changes almost all locks held by guest threads to use a single global
critical region. This emulates the behavior on the PPC of disabling
interrupts (by calls like KeRaiseIrqlToDpcLevel or masking interrupts),
and prevents deadlocks from occuring when threads are suspended or
otherwise blocked.
This has performance implications and a pass is needed to ensure the
locking is as granular as possible. It could also break everything
because it's fundamentally unsound. We'll see.
2015-09-06 09:30:54 -07:00
Ben Vanik 33270cd2a0 Making tracing use the fast logger path. 2015-09-05 21:12:10 -07:00
Ben Vanik f5e374f9b5 Changing the way the global lock works. Some things are better, I think.
Regressions are likely.
2015-09-01 09:45:32 -07:00
Ben Vanik 5355183590 Don't double-break on debugbreak. 2015-09-01 09:45:32 -07:00
Dr. Chat 51e70be054 Don't assert on VRSAVE mfspr/mtspr (used by gcc) 2015-08-31 10:51:51 -05:00
Ben Vanik a4ed79695d WSACreateEvent/CloseEvent/SetEvent. 2015-08-30 21:31:52 -07:00
Ben Vanik 7233df2778 Switch default --ignore_undefined_externs to true. 2015-08-30 20:48:41 -07:00
Ben Vanik 2f9b37c142 Logging unimplemented instructions. 2015-08-30 20:46:06 -07:00
Ben Vanik 82a72e1974 Adding MemoryBarrier opcode. 2015-08-30 17:25:02 -07:00
Ben Vanik 65812438c4 Short-circuiting lvrx/stvrx. Should help bad accesses in many games.
Fixes #411.
2015-08-30 16:38:01 -07:00
Ben Vanik dfa5b90c36 Fixing test output. 2015-08-30 16:26:36 -07:00