mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-03 18:45:46 +03:00
Workaround for 'stack misaligned when inlining SSE' bug in icc
This commit is contained in:
parent
da547bd7c7
commit
f5a9f2e413
@ -523,7 +523,7 @@ void MSG_WBits_MaybeFlush() {
|
|||||||
bfwrite.nCurOutputBit -= 32;
|
bfwrite.nCurOutputBit -= 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSG_WriteBits(uint32 data, int numbits)
|
void NOINLINE MSG_WriteBits(uint32 data, int numbits)
|
||||||
{
|
{
|
||||||
uint32 maxval = _mm_cvtsi128_si32(_mm_slli_epi64(_mm_cvtsi32_si128(1), numbits)) - 1; //maxval = (1 << numbits) - 1
|
uint32 maxval = _mm_cvtsi128_si32(_mm_slli_epi64(_mm_cvtsi32_si128(1), numbits)) - 1; //maxval = (1 << numbits) - 1
|
||||||
if (data > maxval)
|
if (data > maxval)
|
||||||
@ -544,14 +544,14 @@ void MSG_WriteOneBit(int nValue) {
|
|||||||
MSG_WriteBits(nValue, 1);
|
MSG_WriteBits(nValue, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSG_StartBitWriting(sizebuf_t *buf)
|
void NOINLINE MSG_StartBitWriting(sizebuf_t *buf)
|
||||||
{
|
{
|
||||||
bfwrite.nCurOutputBit = 0;
|
bfwrite.nCurOutputBit = 0;
|
||||||
bfwrite.pbuf = buf;
|
bfwrite.pbuf = buf;
|
||||||
bfwrite.pendingData.u64 = 0;
|
bfwrite.pendingData.u64 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSG_EndBitWriting(sizebuf_t *buf)
|
void NOINLINE MSG_EndBitWriting(sizebuf_t *buf)
|
||||||
{
|
{
|
||||||
int bytesNeed = bfwrite.nCurOutputBit / 8;
|
int bytesNeed = bfwrite.nCurOutputBit / 8;
|
||||||
if ((bfwrite.nCurOutputBit % 8) || bytesNeed == 0) {
|
if ((bfwrite.nCurOutputBit % 8) || bytesNeed == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user