summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2026-01-11 16:14:50 -0600
committerGitHub <noreply@github.com>2026-01-11 16:14:50 -0600
commitdc8f2995efc02cae817317c9856e269d9ce152b1 (patch)
treebeed38f7ecda4aa5c8a8e8386084a6009fe1336e /Source/Core/Common
parent79a4034aa059aee20a1ff212c1cac1e3f9477fbb (diff)
parent3ea366119f47a9cce613002667d3bfd4f71cee42 (diff)
Merge pull request #14273 from JosJuice/x64-oparg-padding
Jit64: Make OpArg and TrampolineInfo smaller
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/x64Emitter.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h
index 71dcea30f9..6953770986 100644
--- a/Source/Core/Common/x64Emitter.h
+++ b/Source/Core/Common/x64Emitter.h
@@ -113,8 +113,8 @@ struct OpArg
// dummy op arg, used for storage
constexpr OpArg() = default;
constexpr OpArg(u64 offset_, int scale_, X64Reg rm_reg = RAX, X64Reg scaled_reg = RAX)
- : scale{static_cast<u8>(scale_)}, offsetOrBaseReg{static_cast<u16>(rm_reg)},
- indexReg{static_cast<u16>(scaled_reg)}, offset{offset_}
+ : offset{offset_}, offsetOrBaseReg{static_cast<u16>(rm_reg)},
+ indexReg{static_cast<u16>(scaled_reg)}, scale{static_cast<u8>(scale_)}
{
}
constexpr bool operator==(const OpArg& b) const
@@ -234,11 +234,11 @@ private:
void WriteSingleByteOp(XEmitter* emit, u8 op, X64Reg operandReg, int bits);
void WriteNormalOp(XEmitter* emit, bool toRM, NormalOp op, const OpArg& operand, int bits) const;
- u8 scale = 0;
+ u64 offset = 0; // Also used to store immediates.
u16 offsetOrBaseReg = 0;
u16 indexReg = 0;
- u64 offset = 0; // Also used to store immediates.
u16 operandReg = 0;
+ u8 scale = 0;
};
template <typename T>