summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-14 18:29:53 -0400
committerGravatar Lioncash2018-08-14 18:29:56 -0400
commit6d549abb4e5488b77401bb9b49d8484d5964bbed (patch)
tree30536c5f97a549b3dd104aa6455d210865013f54 /src
parentcommon/xbyak: Use nested namespace specifiers where applicable (diff)
downloadyuzu-6d549abb4e5488b77401bb9b49d8484d5964bbed.tar.gz
yuzu-6d549abb4e5488b77401bb9b49d8484d5964bbed.tar.xz
yuzu-6d549abb4e5488b77401bb9b49d8484d5964bbed.zip
common/xbyak_abi: Mark defined functions in header as inline
Avoids potential One Definition Rule violations when these are used in the future.
Diffstat (limited to 'src')
-rw-r--r--src/common/x64/xbyak_abi.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/x64/xbyak_abi.h b/src/common/x64/xbyak_abi.h
index a27f5c72d..927da9187 100644
--- a/src/common/x64/xbyak_abi.h
+++ b/src/common/x64/xbyak_abi.h
@@ -11,7 +11,7 @@
11 11
12namespace Common::X64 { 12namespace Common::X64 {
13 13
14int RegToIndex(const Xbyak::Reg& reg) { 14inline int RegToIndex(const Xbyak::Reg& reg) {
15 using Kind = Xbyak::Reg::Kind; 15 using Kind = Xbyak::Reg::Kind;
16 ASSERT_MSG((reg.getKind() & (Kind::REG | Kind::XMM)) != 0, 16 ASSERT_MSG((reg.getKind() & (Kind::REG | Kind::XMM)) != 0,
17 "RegSet only support GPRs and XMM registers."); 17 "RegSet only support GPRs and XMM registers.");
@@ -151,8 +151,8 @@ constexpr size_t ABI_SHADOW_SPACE = 0;
151 151
152#endif 152#endif
153 153
154void ABI_CalculateFrameSize(BitSet32 regs, size_t rsp_alignment, size_t needed_frame_size, 154inline void ABI_CalculateFrameSize(BitSet32 regs, size_t rsp_alignment, size_t needed_frame_size,
155 s32* out_subtraction, s32* out_xmm_offset) { 155 s32* out_subtraction, s32* out_xmm_offset) {
156 int count = (regs & ABI_ALL_GPRS).Count(); 156 int count = (regs & ABI_ALL_GPRS).Count();
157 rsp_alignment -= count * 8; 157 rsp_alignment -= count * 8;
158 size_t subtraction = 0; 158 size_t subtraction = 0;
@@ -173,8 +173,8 @@ void ABI_CalculateFrameSize(BitSet32 regs, size_t rsp_alignment, size_t needed_f
173 *out_xmm_offset = (s32)(subtraction - xmm_base_subtraction); 173 *out_xmm_offset = (s32)(subtraction - xmm_base_subtraction);
174} 174}
175 175
176size_t ABI_PushRegistersAndAdjustStack(Xbyak::CodeGenerator& code, BitSet32 regs, 176inline size_t ABI_PushRegistersAndAdjustStack(Xbyak::CodeGenerator& code, BitSet32 regs,
177 size_t rsp_alignment, size_t needed_frame_size = 0) { 177 size_t rsp_alignment, size_t needed_frame_size = 0) {
178 s32 subtraction, xmm_offset; 178 s32 subtraction, xmm_offset;
179 ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset); 179 ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset);
180 180
@@ -194,8 +194,8 @@ size_t ABI_PushRegistersAndAdjustStack(Xbyak::CodeGenerator& code, BitSet32 regs
194 return ABI_SHADOW_SPACE; 194 return ABI_SHADOW_SPACE;
195} 195}
196 196
197void ABI_PopRegistersAndAdjustStack(Xbyak::CodeGenerator& code, BitSet32 regs, size_t rsp_alignment, 197inline void ABI_PopRegistersAndAdjustStack(Xbyak::CodeGenerator& code, BitSet32 regs,
198 size_t needed_frame_size = 0) { 198 size_t rsp_alignment, size_t needed_frame_size = 0) {
199 s32 subtraction, xmm_offset; 199 s32 subtraction, xmm_offset;
200 ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset); 200 ABI_CalculateFrameSize(regs, rsp_alignment, needed_frame_size, &subtraction, &xmm_offset);
201 201