From a24cb250d8bc3a193f78f84d03bad9c40541a5fe Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 26 Apr 2014 00:09:23 +0400 Subject: [PATCH 1/2] Compilation fix again --- asmjit | 2 +- asmjit.vcxproj | 4 +- rpcs3/Emu/Cell/SPURecompiler.h | 88 ++++++++++++++++++++++++++- rpcs3/Emu/SysCalls/Modules/sys_fs.cpp | 4 +- 4 files changed, 90 insertions(+), 8 deletions(-) diff --git a/asmjit b/asmjit index 316812daf0..b76922fde9 160000 --- a/asmjit +++ b/asmjit @@ -1 +1 @@ -Subproject commit 316812daf0d734f1e3dc3abb05785737513274f0 +Subproject commit b76922fde96232030be302b3bdd9673e9bcec568 diff --git a/asmjit.vcxproj b/asmjit.vcxproj index 4f37749805..0fd05578a8 100644 --- a/asmjit.vcxproj +++ b/asmjit.vcxproj @@ -96,12 +96,12 @@ - .\libs\$(Configuration)_x86\ + .\libs\$(Configuration)\ - .\libs\$(Configuration)_x86\ + .\libs\$(Configuration)\ diff --git a/rpcs3/Emu/Cell/SPURecompiler.h b/rpcs3/Emu/Cell/SPURecompiler.h index edb2695d66..2af855aa38 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.h +++ b/rpcs3/Emu/Cell/SPURecompiler.h @@ -393,7 +393,7 @@ public: } } - Mem XmmConst(const __m128i data) + Mem XmmConst(const __m128i& data) { for (u32 i = 0; i < rec.imm_table.size(); i++) { @@ -407,11 +407,95 @@ public: return oword_ptr(*imm_var, shift); } - Mem XmmConst(const __m128 data) + Mem XmmConst(const __m128& data) { return XmmConst((__m128i&)data); } + __m128i _mm_set1_epi32(u32 v) + { + __m128i res; + for (u32 i = 0; i < 4; i++) res.m128i_u32[i] = v; + return res; + } + + __m128i _mm_set1_epi16(u16 v) + { + __m128i res; + for (u32 i = 0; i < 8; i++) res.m128i_u16[i] = v; + return res; + } + + __m128i _mm_set1_epi8(u8 v) + { + __m128i res; + for (u32 i = 0; i < 16; i++) res.m128i_u8[i] = v; + return res; + } + + __m128 _mm_set1_ps(float v) + { + __m128 res; + for (u32 i = 0; i < 4; i++) res.m128_f32[i] = v; + return res; + } + + __m128i _mm_set_epi32(u32 v3, u32 v2, u32 v1, u32 v0) + { + __m128i res; + res.m128i_u32[0] = v0; + res.m128i_u32[1] = v1; + res.m128i_u32[2] = v2; + res.m128i_u32[3] = v3; + return res; + } + + __m128i _mm_set_epi16(u16 v7, u16 v6, u16 v5, u16 v4, u16 v3, u16 v2, u16 v1, u16 v0) + { + __m128i res; + res.m128i_u16[0] = v0; + res.m128i_u16[1] = v1; + res.m128i_u16[2] = v2; + res.m128i_u16[3] = v3; + res.m128i_u16[4] = v4; + res.m128i_u16[5] = v5; + res.m128i_u16[6] = v6; + res.m128i_u16[7] = v7; + return res; + } + + __m128i _mm_set_epi8(u8 v15, u8 v14, u8 v13, u8 v12, u8 v11, u8 v10, u8 v9, u8 v8, u8 v7, u8 v6, u8 v5, u8 v4, u8 v3, u8 v2, u8 v1, u8 v0) + { + __m128i res; + res.m128i_u8[0] = v0; + res.m128i_u8[1] = v1; + res.m128i_u8[2] = v2; + res.m128i_u8[3] = v3; + res.m128i_u8[4] = v4; + res.m128i_u8[5] = v5; + res.m128i_u8[6] = v6; + res.m128i_u8[7] = v7; + res.m128i_u8[8] = v8; + res.m128i_u8[9] = v9; + res.m128i_u8[10] = v10; + res.m128i_u8[11] = v11; + res.m128i_u8[12] = v12; + res.m128i_u8[13] = v13; + res.m128i_u8[14] = v14; + res.m128i_u8[15] = v15; + return res; + } + + __m128 _mm_set_ps(float v3, float v2, float v1, float v0) + { + __m128 res; + res.m128_f32[0] = v0; + res.m128_f32[1] = v1; + res.m128_f32[2] = v2; + res.m128_f32[3] = v3; + return res; + } + private: //0 - 10 void STOP(u32 code) diff --git a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp index 107cf36520..9a04eade1e 100644 --- a/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sys_fs.cpp @@ -152,8 +152,6 @@ void fsAioRead(u32 fd, mem_ptr_t aio, int xid, mem_func_ptr_tGetPath(); - u64 nbytes = aio->size; u32 buf_addr = aio->buf_addr; @@ -207,7 +205,7 @@ fin: file.Seek(old_pos); ConLog.Warning("*** fsAioRead(fd=%d, offset=0x%llx, buf_addr=0x%x, size=0x%x, error=0x%x, res=0x%x, xid=0x%x [%s])", - fd, (u64)aio->offset, buf_addr, (u64)aio->size, error, res, xid, path.c_str()); + fd, (u64)aio->offset, buf_addr, (u64)aio->size, error, res, xid, orig_file->GetPath().c_str()); if (func) // start callback thread { From 0d375809b15fa1888ecd39bdf78f5caa5a9bd339 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 26 Apr 2014 00:28:43 +0400 Subject: [PATCH 2/2] Useless code removed --- rpcs3/Emu/Cell/SPURecompiler.h | 84 ---------------------------------- 1 file changed, 84 deletions(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.h b/rpcs3/Emu/Cell/SPURecompiler.h index 2af855aa38..4f57910603 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.h +++ b/rpcs3/Emu/Cell/SPURecompiler.h @@ -412,90 +412,6 @@ public: return XmmConst((__m128i&)data); } - __m128i _mm_set1_epi32(u32 v) - { - __m128i res; - for (u32 i = 0; i < 4; i++) res.m128i_u32[i] = v; - return res; - } - - __m128i _mm_set1_epi16(u16 v) - { - __m128i res; - for (u32 i = 0; i < 8; i++) res.m128i_u16[i] = v; - return res; - } - - __m128i _mm_set1_epi8(u8 v) - { - __m128i res; - for (u32 i = 0; i < 16; i++) res.m128i_u8[i] = v; - return res; - } - - __m128 _mm_set1_ps(float v) - { - __m128 res; - for (u32 i = 0; i < 4; i++) res.m128_f32[i] = v; - return res; - } - - __m128i _mm_set_epi32(u32 v3, u32 v2, u32 v1, u32 v0) - { - __m128i res; - res.m128i_u32[0] = v0; - res.m128i_u32[1] = v1; - res.m128i_u32[2] = v2; - res.m128i_u32[3] = v3; - return res; - } - - __m128i _mm_set_epi16(u16 v7, u16 v6, u16 v5, u16 v4, u16 v3, u16 v2, u16 v1, u16 v0) - { - __m128i res; - res.m128i_u16[0] = v0; - res.m128i_u16[1] = v1; - res.m128i_u16[2] = v2; - res.m128i_u16[3] = v3; - res.m128i_u16[4] = v4; - res.m128i_u16[5] = v5; - res.m128i_u16[6] = v6; - res.m128i_u16[7] = v7; - return res; - } - - __m128i _mm_set_epi8(u8 v15, u8 v14, u8 v13, u8 v12, u8 v11, u8 v10, u8 v9, u8 v8, u8 v7, u8 v6, u8 v5, u8 v4, u8 v3, u8 v2, u8 v1, u8 v0) - { - __m128i res; - res.m128i_u8[0] = v0; - res.m128i_u8[1] = v1; - res.m128i_u8[2] = v2; - res.m128i_u8[3] = v3; - res.m128i_u8[4] = v4; - res.m128i_u8[5] = v5; - res.m128i_u8[6] = v6; - res.m128i_u8[7] = v7; - res.m128i_u8[8] = v8; - res.m128i_u8[9] = v9; - res.m128i_u8[10] = v10; - res.m128i_u8[11] = v11; - res.m128i_u8[12] = v12; - res.m128i_u8[13] = v13; - res.m128i_u8[14] = v14; - res.m128i_u8[15] = v15; - return res; - } - - __m128 _mm_set_ps(float v3, float v2, float v1, float v0) - { - __m128 res; - res.m128_f32[0] = v0; - res.m128_f32[1] = v1; - res.m128_f32[2] = v2; - res.m128_f32[3] = v3; - return res; - } - private: //0 - 10 void STOP(u32 code)