Ben Vanik
f307bc9eb1
Adding --target= and --trace_registers flags.
...
--target=[xex|iso] makes it possible to specify the thing to run from a
flagfile.
2013-05-29 21:45:54 -07:00
Ben Vanik
37530d1438
Adding some required video export variables.
2013-05-29 21:26:29 -07:00
Ben Vanik
6950b21424
Reworking the memory system to not commit 3gb and to properly alloc data.
...
Now only 512MB is committed on startup. Loaded XEXs are placed into their
required addresses in the 0x8... range. Kernel structures are allocated
from the normal heap like other data. There should no longer be any magical
pointers.
2013-05-29 21:00:55 -07:00
Ben Vanik
61f7f6d28e
Starting work on some of the Vd kernel functions.
2013-05-28 20:00:06 -07:00
Ben Vanik
2cecc02787
Skeleton GPU files.
2013-05-27 21:45:55 -07:00
Ben Vanik
16baef3591
Starting physical memory allocation routines.
...
These currently don't do anything special w.r.t. memory addresses/etc,
but will in the future.
2013-05-27 20:09:40 -07:00
Ben Vanik
f78e7945d4
Fixing malloc alighment and duplicate calls to NtAllocateVirtualMemory.
2013-05-27 19:58:20 -07:00
Ben Vanik
1d0ec64d40
Adding srd/srw. Fixing shamts in other shifts.
2013-05-27 05:35:41 -07:00
Ben Vanik
778efdb276
fcfid(z), fctid(z) -- both largely untested.
2013-05-27 05:22:38 -07:00
Ben Vanik
84fb802166
fadd(s), fdiv(s), fmul(s), fsub(s), fsel, frsp, fabs, fmr, fneg, fnmsubs.
2013-05-27 04:09:07 -07:00
Ben Vanik
fe6df31280
Finishing off the kernel method conversion.
2013-05-26 23:06:09 -07:00
Ben Vanik
64eb2aa2b3
Converting RTL methods to the new style.
2013-05-26 23:05:05 -07:00
Rick Gibbed
c4e0347932
NULLs!
2013-05-26 22:53:46 -07:00
Rick Gibbed
fe9cb1cddb
Oops.
2013-05-26 22:46:45 -07:00
Rick Gibbed
9f06645e75
Merge branch 'master' of https://github.com/benvanik/xenia
2013-05-26 22:42:28 -07:00
Rick Gibbed
78ee6c9ee9
Added video submodule for xboxkrnl and xam modules.
2013-05-26 22:42:07 -07:00
Rick Gibbed
9eadffe461
Added float/double swap helpers.
2013-05-26 22:39:39 -07:00
Ben Vanik
b87b17f51e
Converting more kernel methods to the new style.
2013-05-26 22:04:12 -07:00
Ben Vanik
6e8828f843
Switching kernel files to the new style.
2013-05-26 21:37:47 -07:00
Ben Vanik
fbe800aacd
Preparing to enable unshimmed kernel methods that can be called directly.
2013-05-26 20:32:30 -07:00
Ben Vanik
25d8b5f8d8
Switching shim mapping macro to use ordinal constants.
2013-05-26 20:10:10 -07:00
Ben Vanik
a332faf419
Adding ordinal enums to kernel modules.
...
Access via xe::kernel::modules::xboxkrnl::ordinals::MyFunction
(or just ordinals::MyFunction when in the namespace).
Some collisions occurred - just added random suffixes for now.
2013-05-26 19:28:46 -07:00
Ben Vanik
87b8ebd613
Forgot to switch macros.
2013-05-26 19:19:26 -07:00
Ben Vanik
9f320ba4a7
Prepping kernel export tables for various uses.
2013-05-26 18:57:41 -07:00
Ben Vanik
1b07aace73
Moving kernel functions into their proper namespaces.
2013-05-26 18:43:57 -07:00
Ben Vanik
1a5a8d748d
Adding missing files to the xam gypi.
2013-05-26 18:40:51 -07:00
Ben Vanik
c10d719d53
Floating point loads/stores.
...
Seem correct. Maybe not.
2013-05-26 17:59:11 -07:00
Ben Vanik
a09170b2c6
Fixing bad EA write order.
2013-05-26 17:49:37 -07:00
Ben Vanik
a6db12b48f
ldx/ldux.
2013-05-26 17:43:37 -07:00
Rick Gibbed
0ca44083e6
Stick the export ordinal in the dummy address for unimplemented export data, to make it obvious what it is when debugging.
2013-05-26 17:37:31 -07:00
Rick Gibbed
c29c4b067f
Corrected a xam export to variable.
2013-05-26 17:23:30 -07:00
Ben Vanik
b5e729f89e
sld.
2013-05-26 16:30:52 -07:00
Ben Vanik
924b08b264
cntlzd and fixing broken cntlzwx.
2013-05-26 16:30:43 -07:00
Ben Vanik
86396816f5
rldicl, rldicr.
2013-05-26 16:10:25 -07:00
Ben Vanik
fd86370ccc
Fixing warnings on mtmsr/mtmsrd disasm.
2013-05-26 15:03:36 -07:00
Rick Gibbed
5f494a4449
Corrected many xboxkrnl exports to variable.
2013-05-26 09:46:20 -07:00
Rick Gibbed
1b3351b1e2
disasm for mfmsr, mtmsr, mtmsrd
2013-05-26 08:39:31 -07:00
Ben Vanik
82159b2b9d
Adding lfd.
2013-05-26 07:19:09 -07:00
Ben Vanik
9d63eb7499
Fixing condition updates for unsigned compares.
2013-05-26 04:21:07 -07:00
Ben Vanik
5d83465ce4
Fixing branches via the indirection block.
...
Also disabling the local indirection optimization until it's implemented.
2013-05-26 03:59:32 -07:00
Ben Vanik
22f186d713
Better asserts/checks around bad function addresses.
2013-05-26 03:26:49 -07:00
Ben Vanik
bf9e92c027
Fixing typo in disasm.
2013-05-26 02:48:31 -07:00
Ben Vanik
35ce144a37
Disasm of some memory routines.
2013-05-26 02:45:32 -07:00
Rick Gibbed
6678279ebf
Corrected more issues with X_RTL_CRITICAL_SECTION, RtlInitializeCriticalSection, RtlInitializeCriticalSectionAndSpinCount.
2013-05-26 02:36:48 -07:00
Rick Gibbed
d385bc6a10
Added XEASSERTSTRUCTSIZE macro.
2013-05-26 02:36:07 -07:00
Rick Gibbed
237ab5551f
Oops. Fixed some formatting in previous commit.
2013-05-26 02:21:05 -07:00
Rick Gibbed
3ac3d8078d
Corrected some issues with X_RTL_CRITICAL_SECTION, RtlInitializeCriticalSection, RtlInitializeCriticalSectionAndSpinCount.
2013-05-26 02:18:49 -07:00
Ben Vanik
6b851da9d7
Fixing analysis regression: don't analyze on gets during analysis pass.
2013-05-26 02:11:08 -07:00
Ben Vanik
f94256aaaf
Adding a simple heuristic to find leaf thunk functions.
2013-05-26 01:43:44 -07:00
Rick Gibbed
1640acaf8a
mftb
2013-05-26 00:48:53 -07:00
Ben Vanik
7febbe0f86
Fixing <8b memory accesses.
2013-05-26 00:44:20 -07:00
Rick Gibbed
0855fe7014
addicx
2013-05-26 00:27:36 -07:00
Ben Vanik
ab762e0009
Adding disassemblers for the fpu instructions.
2013-05-26 00:13:46 -07:00
Ben Vanik
4073028188
Very basic, super slow, nasty indirection.
2013-05-25 20:32:58 -07:00
Ben Vanik
2986a0be82
Removing debug int3.
2013-05-25 17:20:52 -07:00
Ben Vanik
ce27fb333b
Fixing rlwimix.
2013-05-25 17:08:31 -07:00
Ben Vanik
bd8376e231
Making xenia-test run on Windows.
2013-05-25 05:20:28 -07:00
Ben Vanik
edb3aabdd4
Removing llvm backend.
2013-05-25 04:28:21 -07:00
Ben Vanik
eb22289dc7
Fixing bad fcmpu disasm.
2013-05-25 04:25:27 -07:00
Ben Vanik
a5da226617
cntlzwx.
2013-05-25 03:23:33 -07:00
Ben Vanik
de85adea2e
divwx/divwux.
2013-05-25 02:49:44 -07:00
Ben Vanik
9f3f5d2c0e
mullw.
2013-05-25 01:56:42 -07:00
Ben Vanik
e29de199ff
srawix.
2013-05-25 01:50:46 -07:00
Ben Vanik
8207bb8088
negx
2013-05-25 01:35:19 -07:00
Ben Vanik
07d0dd98b6
slwx, ignoring twi.
2013-05-25 01:31:38 -07:00
Ben Vanik
ed401449b7
Only create the shared return block if required.
2013-05-25 00:45:16 -07:00
Ben Vanik
da62ec56f9
Adding the ret required for tail calls.
2013-05-25 00:41:01 -07:00
Ben Vanik
fb22aeb5ac
Fixing assertion warnings from asmjit.
2013-05-25 00:40:30 -07:00
Ben Vanik
f3552ff9a5
Implementing RtlImageXexHeaderField better.
2013-05-25 00:08:01 -07:00
Ben Vanik
eac03765db
Adding addx. Whoops.
2013-05-25 00:07:35 -07:00
Ben Vanik
12b2dc153e
Disabling the faked KeDebugMonitorData.
2013-05-24 23:43:11 -07:00
Ben Vanik
04485b6460
rlwimix/rlwinmx.
2013-05-24 23:34:52 -07:00
Ben Vanik
ef3bd6cc53
Fixing disasm of subfic, fixing neg->not, fixing tests to use 8bits.
2013-05-24 23:03:35 -07:00
Ben Vanik
6320ef6b7e
Fixing conditionals to use cmp instead of test.
2013-05-24 22:21:05 -07:00
Ben Vanik
7bf69f66fd
Logging out the condition register values.
2013-05-24 22:03:57 -07:00
Ben Vanik
2586c10cc5
addzex.
2013-05-24 21:54:04 -07:00
Ben Vanik
9883f32fb7
Fixing logger initialization when codegen logging is disabled.
2013-05-24 21:49:03 -07:00
Rick Gibbed
ba718de434
Further corrections on cr checks.
2013-05-24 21:34:03 -07:00
Ben Vanik
1354b9975f
Adding basic branch indirection, which doesn't work but is ready to do so.
2013-05-24 21:18:30 -07:00
Ben Vanik
c6ed7ff9cf
Fixing cr5+ checks.
2013-05-24 20:48:04 -07:00
Ben Vanik
346a27ddf8
Trying again to fix compares.
2013-05-24 20:40:00 -07:00
Ben Vanik
e7556a09f8
Fixing bad or during cr0 update - need to be overwriting.
2013-05-24 20:26:06 -07:00
Ben Vanik
68f1eb7f69
Fixing carry and compare flags.
2013-05-24 20:20:18 -07:00
Ben Vanik
97b0e2aa3d
Fixing comparison between two gpvars.
2013-05-24 20:09:11 -07:00
Ben Vanik
5e66f7b04b
Adding a bunch of nops around trace calls.
...
5 before, 2 after (so it's easy to see what goes with what).
2013-05-24 19:59:51 -07:00
Ben Vanik
1ad0bb7843
cmp/cmpi/cmpl/cmpli.
...
May not be right.
2013-05-24 19:52:00 -07:00
Ben Vanik
6cd8495ea2
extsbx.
2013-05-24 19:45:48 -07:00
Ben Vanik
8976f1b046
subfx + subficx.
2013-05-24 19:16:01 -07:00
Ben Vanik
69ebedb43f
addic + subfex.
2013-05-24 19:10:54 -07:00
Ben Vanik
dc40f28795
addx and switching commenting style on the rest of the unported instrs.
2013-05-24 18:49:14 -07:00
Ben Vanik
1e67547a6b
Fixing conditional branch logic.
2013-05-24 18:44:32 -07:00
Ben Vanik
2ab01af0bd
Breaking on indirect branches.
2013-05-24 18:34:08 -07:00
Ben Vanik
692f85ed4f
Very, very basic branching. Most compares not yet implemented.
2013-05-24 18:28:52 -07:00
Ben Vanik
7e3268621d
Optimizing the mr case.
2013-05-24 17:59:01 -07:00
Ben Vanik
748bfe509f
Handling null ptr in NtFreeVirtualMemory.
2013-05-24 17:33:57 -07:00
Ben Vanik
21b0d25131
Fixing memory address truncation.
2013-05-24 17:08:12 -07:00
Ben Vanik
fcf478ba55
Log all incoming registers on each instruction execute.
2013-05-24 16:53:27 -07:00
Ben Vanik
15cfbd3736
The various _ptr helpers in asmjit are useless.
2013-05-24 16:34:24 -07:00
Ben Vanik
e6320dada5
Most of the memory instructions.
...
Not sure this is correct, as it crashes pretty early on.
2013-05-24 16:16:39 -07:00
Ben Vanik
e724fe3e60
Adding some ALU instructions.
2013-05-24 14:21:39 -07:00
Ben Vanik
8965caa833
Adding an option to disable register caching.
...
Until things work I'm not going to bother with that optimization.
2013-05-24 11:18:50 -07:00
Ben Vanik
b8323c3055
Preparing some control instructions for proper emitting.
2013-05-24 03:51:58 -07:00
Ben Vanik
bf8f068fa5
Disabling tail calls.
2013-05-24 03:29:21 -07:00
Ben Vanik
2242778fff
Fixing trace calls. Disabling logging of redirector.
2013-05-24 02:42:41 -07:00
Ben Vanik
eb9b9b0321
Adding bl (unconditional only).
2013-05-24 02:21:12 -07:00
Ben Vanik
2153256109
Fixing line endings.
2013-05-24 01:41:02 -07:00
Ben Vanik
605d66ecf6
Adding the first instructions, mfspr/mtspr.
2013-05-24 01:37:02 -07:00
Ben Vanik
71bd3c799f
Local variables setup and spilling/filling.
2013-05-24 00:50:56 -07:00
Ben Vanik
376226c59a
Adding basic block labels.
...
Probably correct.
2013-05-24 00:06:46 -07:00
Ben Vanik
a81babac1e
Adding comments to the disasm and implementing kernel calls.
2013-05-23 23:39:48 -07:00
Ben Vanik
74ae66aa0a
Cleanup and tracing.
2013-05-23 23:22:27 -07:00
Ben Vanik
d7d0b94aab
x64 emitter now generating redirection blocks and patching them up.
2013-05-23 22:09:04 -07:00
Ben Vanik
12444f6305
Compiles, runs, and hangs in normal wait.
2013-05-23 18:46:09 -07:00
Ben Vanik
1b833b6789
Removing libjit backend.
2013-05-23 18:05:03 -07:00
Ben Vanik
bedf86d259
Adding 'x64' backend.
...
Does not compile.
2013-05-23 18:04:12 -07:00
Ben Vanik
86002b2f44
Removing old llvm cruft.
2013-05-23 17:51:03 -07:00
Ben Vanik
63cee87420
Removing library loader, as it's not used.
2013-05-23 17:50:05 -07:00
Ben Vanik
57b486c4ad
Removing libjit, because it is pretty terrible.
2013-05-23 17:48:01 -07:00
Ben Vanik
eee856be04
Tweaking things again. Now not getting very far. Sigh.
2013-05-23 15:52:57 -07:00
Ben Vanik
f08e80efbc
Fixing calling into code. Interpreter can now be used.
2013-05-23 15:44:45 -07:00
Ben Vanik
9487fa027c
libjit doesn't encode mov with imm64 offsets, fixing.
2013-05-23 13:55:09 -07:00
Ben Vanik
70a9a1053e
The previous truncation was useless.
2013-05-23 13:16:39 -07:00
Ben Vanik
89672e111d
Optimizing memory accesses a bit by letting libjit use relative addressing.
2013-05-23 11:46:26 -07:00
Ben Vanik
fc8eb3d40a
Adding disassembly to traces and bumping libjit.
2013-05-23 11:39:29 -07:00
Ben Vanik
730dba4aea
Adding addzex.
2013-05-23 02:13:04 -07:00
Ben Vanik
d6f2a0b3f0
Adding --trace_branches.
...
Simple output right now, can always be enhanced.
2013-05-23 01:31:41 -07:00
Ben Vanik
4495637616
Making sure shim calls are cdecl.
2013-05-23 01:04:14 -07:00
Ben Vanik
6bde04de26
Flushing logging.
2013-05-23 00:26:55 -07:00
Ben Vanik
1a01d365b5
Making code dumps conditional on --log_codegen
2013-05-22 22:01:34 -07:00
Ben Vanik
fcb66660c0
(partial) addx and logging compiled addresses.
2013-05-22 21:53:21 -07:00
Ben Vanik
5cb8cf2630
Hacky ALU ops. Need overflow checks.
2013-05-22 21:14:16 -07:00
Ben Vanik
9ed911cdad
Fixing comparisons and disabling OutputDebugString logging.
2013-05-22 21:11:27 -07:00
Ben Vanik
2d01dced5a
Adding back invalid instruction logs.
2013-05-22 20:58:48 -07:00
Ben Vanik
f2c16c24f3
Basic control instructions (no indirection branches yet).
2013-05-22 20:15:04 -07:00
Ben Vanik
1bcb3e8f92
Many more ALU instructions.
2013-05-22 18:51:06 -07:00
Ben Vanik
64b619023d
Adding back in quite a few instructions.
2013-05-22 18:03:43 -07:00
Ben Vanik
c0dd60bde8
Adding memory access/etc.
...
Needs byte swapping.
2013-05-22 15:02:26 -07:00
Ben Vanik
7227ba2693
Setting up register fill/spill.
2013-05-22 13:37:44 -07:00
Ben Vanik
16d2b73a73
Main codegen loop now running through instructions.
2013-05-22 13:10:07 -07:00
Ben Vanik
dad99769cb
Prepping for basic block generation.
2013-05-22 11:53:52 -07:00
Ben Vanik
33e2bc01ee
Kernel call thunks and cleanup on exports.
2013-05-22 11:30:53 -07:00
Ben Vanik
37f93d2974
Calling to/from native works!
2013-05-22 11:13:27 -07:00
Ben Vanik
a064e68621
Fixing more warnings.
2013-05-21 16:19:11 -07:00
Ben Vanik
720651ba9e
Removing wslay socket support in prep for switch to mongoose.
...
Work on #21 .
2013-05-21 16:16:33 -07:00
Ben Vanik
1ec06bd7d0
Tweaking compile options and switching back to VS2010.
2013-05-21 16:08:56 -07:00
Ben Vanik
85804f7415
Initial libjit skeleton.
...
Not currently generating instructions, but most of the flow is right up to
that point. A lot of work required to refactor the emitter, but wanted to
get this checked in.
2013-05-21 15:36:58 -07:00
Ben Vanik
94e3e592dd
Making disassembly much faster by moving string processing to only the
...
dump path.
2013-05-19 19:32:55 -07:00
Ben Vanik
7d93795c10
Fixing Windows compilation errors.
2013-05-19 09:29:31 -07:00
Ben Vanik
1ce68ca7fe
Removing LLVM submodule and build information.
...
Code is still present until transitioned over to libjit.
2013-05-19 09:29:22 -07:00
Ben Vanik
0aa7d1ec05
Adding libjit.
...
Removing some old xethunk cruft.
2013-05-19 09:23:50 -07:00
Ben Vanik
b018b6fe56
Broken, incomplete, but need to move forward with rewrite.
2013-04-21 12:34:20 -07:00
Ben Vanik
4987147055
Moving disasm functions to ppc/.
2013-03-30 02:01:33 -07:00
Ben Vanik
85bdbd24d1
In-progress work: refactoring PAL not to be instanced.
...
This removes a lot of useless passing around of the PAL object.
2013-03-29 05:07:32 -07:00
Ben Vanik
c46093266e
Tracking code low/high addresses per module.
2013-02-24 11:45:16 -08:00
Ben Vanik
690e59ca3e
Fixing OSX build.
2013-02-10 12:38:50 -08:00
Ben Vanik
bfda368ab5
Compiling on linux.
2013-02-10 12:21:56 -08:00
Ben Vanik
3cae7ed714
Converting logging to ASCII and other Windows fixes.
2013-02-09 08:05:39 -08:00
Ben Vanik
338b890ef5
Fixing VC++ warnings and errors.
2013-02-08 22:07:38 -08:00
Ben Vanik
c1e2119db4
Moving socket stuff to core/.
...
Stubbed win32 methods.
2013-02-06 22:55:18 -08:00
Ben Vanik
2c42ea909b
Removing the dependency on OpenSSL, as it sucks.
2013-02-06 21:47:05 -08:00
Ben Vanik
7435a327f7
Windows compat fixes.
2013-02-06 10:04:34 -08:00
Ben Vanik
2521d64615
Fixing decryption key choice to be more robust.
2013-02-06 03:07:57 -08:00
Ben Vanik
da23c00d31
Simple thread PAL type (until core/ is rewritten).
2013-02-06 02:44:15 -08:00
Ben Vanik
88431eadce
Screw convention; moving include files alongside source files.
...
They now will show up in xcode/etc.
2013-02-06 02:19:50 -08:00
Ben Vanik
bcd575f9b0
Massive dump of xenia-info required code.
...
This is a working xenia-info for xex files (no gdfs files yet).
2013-01-12 23:25:41 -08:00