From 95508273f6875b421662af9fe9eb69e89411d86b Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 8 Jun 2014 23:11:09 -0700 Subject: [PATCH] Misc experimentation. --- src/alloy/backend/x64/x64_sequences.cc | 1 + src/xenia/kernel/xboxkrnl_debug.cc | 4 ++++ src/xenia/kernel/xboxkrnl_io.cc | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/src/alloy/backend/x64/x64_sequences.cc b/src/alloy/backend/x64/x64_sequences.cc index a1bc716df..8c8a2ed00 100644 --- a/src/alloy/backend/x64/x64_sequences.cc +++ b/src/alloy/backend/x64/x64_sequences.cc @@ -3439,6 +3439,7 @@ EMITTER_OPCODE_TABLE( // ============================================================================ // TODO(benvanik): use approx here: // http://jrfonseca.blogspot.com/2008/09/fast-sse2-pow-tables-or-polynomials.html +// TODO(benvanik): this emulated fn destroys all xmm registers! don't do it! EMITTER(LOG2_F32, MATCH(I, F32<>>)) { static __m128 EmulateLog2(__m128 src) { float result = log2(src.m128_f32[0]); diff --git a/src/xenia/kernel/xboxkrnl_debug.cc b/src/xenia/kernel/xboxkrnl_debug.cc index e6cc023c3..c0a9e7771 100644 --- a/src/xenia/kernel/xboxkrnl_debug.cc +++ b/src/xenia/kernel/xboxkrnl_debug.cc @@ -288,9 +288,13 @@ SHIM_CALL RtlRaiseException_shim( } if (thread) { + XELOGD("SetThreadName(%d, %s)", thread->thread_id(), name); thread->set_name(name); thread->Release(); } + + // TODO(benvanik): unwinding required here? + return; } // TODO(benvanik): unwinding. diff --git a/src/xenia/kernel/xboxkrnl_io.cc b/src/xenia/kernel/xboxkrnl_io.cc index b93e3a104..cb3f4f2ca 100644 --- a/src/xenia/kernel/xboxkrnl_io.cc +++ b/src/xenia/kernel/xboxkrnl_io.cc @@ -392,6 +392,13 @@ SHIM_CALL NtQueryInformationFile_shim( if (XSUCCEEDED(result)) { result = X_STATUS_SUCCESS; switch (file_info_class) { + case XFileInternalInformation: + // Internal unique file pointer. Not sure why anyone would want this. + XEASSERT(length == 8); + info = 8; + // TODO(benvanik): use pointer to fs:: entry? + SHIM_SET_MEM_64(file_info_ptr, hash_combine(0, file->absolute_path())); + break; case XFilePositionInformation: // struct FILE_POSITION_INFORMATION { // LARGE_INTEGER CurrentByteOffset;