Misc experimentation.

This commit is contained in:
Ben Vanik 2014-06-08 23:11:09 -07:00
parent 052dca5010
commit 95508273f6
3 changed files with 12 additions and 0 deletions

View File

@ -3439,6 +3439,7 @@ EMITTER_OPCODE_TABLE(
// ============================================================================ // ============================================================================
// TODO(benvanik): use approx here: // TODO(benvanik): use approx here:
// http://jrfonseca.blogspot.com/2008/09/fast-sse2-pow-tables-or-polynomials.html // 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<OPCODE_LOG2, F32<>, F32<>>)) { EMITTER(LOG2_F32, MATCH(I<OPCODE_LOG2, F32<>, F32<>>)) {
static __m128 EmulateLog2(__m128 src) { static __m128 EmulateLog2(__m128 src) {
float result = log2(src.m128_f32[0]); float result = log2(src.m128_f32[0]);

View File

@ -288,9 +288,13 @@ SHIM_CALL RtlRaiseException_shim(
} }
if (thread) { if (thread) {
XELOGD("SetThreadName(%d, %s)", thread->thread_id(), name);
thread->set_name(name); thread->set_name(name);
thread->Release(); thread->Release();
} }
// TODO(benvanik): unwinding required here?
return;
} }
// TODO(benvanik): unwinding. // TODO(benvanik): unwinding.

View File

@ -392,6 +392,13 @@ SHIM_CALL NtQueryInformationFile_shim(
if (XSUCCEEDED(result)) { if (XSUCCEEDED(result)) {
result = X_STATUS_SUCCESS; result = X_STATUS_SUCCESS;
switch (file_info_class) { 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: case XFilePositionInformation:
// struct FILE_POSITION_INFORMATION { // struct FILE_POSITION_INFORMATION {
// LARGE_INTEGER CurrentByteOffset; // LARGE_INTEGER CurrentByteOffset;