Commit Graph

178 Commits

Author SHA1 Message Date
Dr. Chat
691c3d1021 EXTRACT_I32: Support constant src1 2016-11-11 16:50:42 -06: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
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
f2ad6b8cb8 OPCODE_RECIP 2016-06-26 13:03:42 -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
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
2e826f9321 Supporting constants in Haswell codepaths for mul_add/sub. 2016-01-13 22:29:39 -08:00
Dr. Chat
51dde62f09 x64 backend vector optimizations 2016-01-13 01:43:23 -06:00
Dr. Chat
6d2f083b09 Up the maximum function count to 50,000 2016-01-13 01:30:15 -06:00
Ben Vanik
952d35911c Folding build_tools back into the main repo for simplicity. 2015-12-30 16:53:14 -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
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
67a45203e3 Uninstall the X64 backend exception callback on exit. 2015-12-29 12:35:56 -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
e383e2f101 Processor breakpoint support 2015-12-29 12:28:56 -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
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
4af6c41740 Moving profiling.h to base - UI could be separated for cleanliness. 2015-11-07 12:31:07 -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
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
f3fe260a17 Fallback case if indirection table could not be allocated. 2015-11-04 06:46:52 -06:00
Ben Vanik
ee92f75a84 Updating to the latest clang-format. Make sure to update yourselves! 2015-09-22 08:26:19 -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
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
5355183590 Don't double-break on debugbreak. 2015-09-01 09:45:32 -07:00
Ben Vanik
7233df2778 Switch default --ignore_undefined_externs to true. 2015-08-30 20:48:41 -07:00
Ben Vanik
82a72e1974 Adding MemoryBarrier opcode. 2015-08-30 17:25:02 -07:00
Ben Vanik
b80a028589 Much better errors on undefined externs. 2015-08-30 15:27:12 -07:00
Ben Vanik
764b11fa04 Formatting premake files. 2015-08-29 20:57:31 -07:00
Dr. Chat
f2b2a22687 Add gflags to projects that need it only 2015-08-29 21:16:57 -05:00
Ben Vanik
b7203c2989 Logging to with a ringbuffer. Much faster. 2015-08-29 18:06:30 -07:00
Ben Vanik
a668556d7f Fixing Windows build. 2015-08-18 14:45:49 -07:00