diff options
| author | 2020-06-15 20:28:30 +0100 | |
|---|---|---|
| committer | 2020-06-15 20:35:08 +0100 | |
| commit | a6a43a5ae047404ca0b03aa647ed5b17400ca7b6 (patch) | |
| tree | 58108735f7cd5201588e2cd63e9ebe14a3322c21 /src | |
| parent | Merge pull request #4070 from ogniK5377/GetTPCMasks-fix (diff) | |
| download | yuzu-a6a43a5ae047404ca0b03aa647ed5b17400ca7b6.tar.gz yuzu-a6a43a5ae047404ca0b03aa647ed5b17400ca7b6.tar.xz yuzu-a6a43a5ae047404ca0b03aa647ed5b17400ca7b6.zip | |
macro_jit_x64: Remove RESULT_64
This Reg64 codepath has the exact same behaviour as the Reg32 one.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/macro/macro_jit_x64.cpp | 18 | ||||
| -rw-r--r-- | src/video_core/macro/macro_jit_x64.h | 1 |
2 files changed, 3 insertions, 16 deletions
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp index 11c1cc3be..9a9d50866 100644 --- a/src/video_core/macro/macro_jit_x64.cpp +++ b/src/video_core/macro/macro_jit_x64.cpp | |||
| @@ -19,7 +19,6 @@ static const Xbyak::Reg64 REGISTERS = Xbyak::util::r10; | |||
| 19 | static const Xbyak::Reg64 STATE = Xbyak::util::r11; | 19 | static const Xbyak::Reg64 STATE = Xbyak::util::r11; |
| 20 | static const Xbyak::Reg64 NEXT_PARAMETER = Xbyak::util::r12; | 20 | static const Xbyak::Reg64 NEXT_PARAMETER = Xbyak::util::r12; |
| 21 | static const Xbyak::Reg32 RESULT = Xbyak::util::r13d; | 21 | static const Xbyak::Reg32 RESULT = Xbyak::util::r13d; |
| 22 | static const Xbyak::Reg64 RESULT_64 = Xbyak::util::r13; | ||
| 23 | static const Xbyak::Reg32 METHOD_ADDRESS = Xbyak::util::r14d; | 22 | static const Xbyak::Reg32 METHOD_ADDRESS = Xbyak::util::r14d; |
| 24 | static const Xbyak::Reg64 METHOD_ADDRESS_64 = Xbyak::util::r14; | 23 | static const Xbyak::Reg64 METHOD_ADDRESS_64 = Xbyak::util::r14; |
| 25 | static const Xbyak::Reg64 BRANCH_HOLDER = Xbyak::util::r15; | 24 | static const Xbyak::Reg64 BRANCH_HOLDER = Xbyak::util::r15; |
| @@ -64,15 +63,15 @@ void MacroJITx64Impl::Compile_ALU(Macro::Opcode opcode) { | |||
| 64 | const bool is_move_operation = !is_a_zero && is_b_zero; | 63 | const bool is_move_operation = !is_a_zero && is_b_zero; |
| 65 | const bool has_zero_register = is_a_zero || is_b_zero; | 64 | const bool has_zero_register = is_a_zero || is_b_zero; |
| 66 | 65 | ||
| 67 | Xbyak::Reg64 src_a; | 66 | Xbyak::Reg32 src_a; |
| 68 | Xbyak::Reg32 src_b; | 67 | Xbyak::Reg32 src_b; |
| 69 | 68 | ||
| 70 | if (!optimizer.zero_reg_skip) { | 69 | if (!optimizer.zero_reg_skip) { |
| 71 | src_a = Compile_GetRegister(opcode.src_a, RESULT_64); | 70 | src_a = Compile_GetRegister(opcode.src_a, RESULT); |
| 72 | src_b = Compile_GetRegister(opcode.src_b, ebx); | 71 | src_b = Compile_GetRegister(opcode.src_b, ebx); |
| 73 | } else { | 72 | } else { |
| 74 | if (!is_a_zero) { | 73 | if (!is_a_zero) { |
| 75 | src_a = Compile_GetRegister(opcode.src_a, RESULT_64); | 74 | src_a = Compile_GetRegister(opcode.src_a, RESULT); |
| 76 | } | 75 | } |
| 77 | if (!is_b_zero) { | 76 | if (!is_b_zero) { |
| 78 | src_b = Compile_GetRegister(opcode.src_b, ebx); | 77 | src_b = Compile_GetRegister(opcode.src_b, ebx); |
| @@ -553,17 +552,6 @@ Xbyak::Reg32 MacroJITx64Impl::Compile_GetRegister(u32 index, Xbyak::Reg32 dst) { | |||
| 553 | return dst; | 552 | return dst; |
| 554 | } | 553 | } |
| 555 | 554 | ||
| 556 | Xbyak::Reg64 Tegra::MacroJITx64Impl::Compile_GetRegister(u32 index, Xbyak::Reg64 dst) { | ||
| 557 | if (index == 0) { | ||
| 558 | // Register 0 is always zero | ||
| 559 | xor_(dst, dst); | ||
| 560 | } else { | ||
| 561 | mov(dst, dword[REGISTERS + index * sizeof(u32)]); | ||
| 562 | } | ||
| 563 | |||
| 564 | return dst; | ||
| 565 | } | ||
| 566 | |||
| 567 | void Tegra::MacroJITx64Impl::Compile_WriteCarry(Xbyak::Reg64 dst) { | 555 | void Tegra::MacroJITx64Impl::Compile_WriteCarry(Xbyak::Reg64 dst) { |
| 568 | Xbyak::Label zero{}, end{}; | 556 | Xbyak::Label zero{}, end{}; |
| 569 | xor_(ecx, ecx); | 557 | xor_(ecx, ecx); |
diff --git a/src/video_core/macro/macro_jit_x64.h b/src/video_core/macro/macro_jit_x64.h index 21ee157cf..377368086 100644 --- a/src/video_core/macro/macro_jit_x64.h +++ b/src/video_core/macro/macro_jit_x64.h | |||
| @@ -55,7 +55,6 @@ private: | |||
| 55 | 55 | ||
| 56 | Xbyak::Reg32 Compile_FetchParameter(); | 56 | Xbyak::Reg32 Compile_FetchParameter(); |
| 57 | Xbyak::Reg32 Compile_GetRegister(u32 index, Xbyak::Reg32 dst); | 57 | Xbyak::Reg32 Compile_GetRegister(u32 index, Xbyak::Reg32 dst); |
| 58 | Xbyak::Reg64 Compile_GetRegister(u32 index, Xbyak::Reg64 dst); | ||
| 59 | void Compile_WriteCarry(Xbyak::Reg64 dst); | 58 | void Compile_WriteCarry(Xbyak::Reg64 dst); |
| 60 | 59 | ||
| 61 | void Compile_ProcessResult(Macro::ResultOperation operation, u32 reg); | 60 | void Compile_ProcessResult(Macro::ResultOperation operation, u32 reg); |