mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
GCC fixes
--HG-- branch : hookman_autogen extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/hookman_autogen%40575
This commit is contained in:
parent
8cb55b818b
commit
26ed1c3f0c
@ -378,6 +378,8 @@ namespace SourceHook
|
||||
// :TODO: alignment here?
|
||||
// can't use normal alignment methods
|
||||
// because an unknown number of bytes has been pushed already (the other params)
|
||||
|
||||
// save eax
|
||||
IA32_Push_Reg(&m_HookFunc, REG_EAX);
|
||||
|
||||
// compute dest addr to ECX
|
||||
@ -398,6 +400,11 @@ namespace SourceHook
|
||||
IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EDX, DownCastPtr(pi.pCopyCtor));
|
||||
IA32_Call_Reg(&m_HookFunc, REG_EDX);
|
||||
|
||||
// gcc: pop this ptr off the stack
|
||||
GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX));
|
||||
// pop other params off the stack
|
||||
IA32_Pop_Reg(&m_HookFunc, REG_EAX);
|
||||
|
||||
// restore eax
|
||||
IA32_Pop_Reg(&m_HookFunc, REG_EAX);
|
||||
}
|
||||
@ -1883,7 +1890,7 @@ namespace SourceHook
|
||||
for (int i = 0; i < m_Proto.GetNumOfParams(); ++i)
|
||||
{
|
||||
IntPassInfo &pi = m_Proto.GetParam(i);
|
||||
if (pi.type == PassInfo::PassType_Object &&
|
||||
if (pi.type == PassInfo::PassType_Object && (pi.flags & PassInfo::PassFlag_ByVal) &&
|
||||
(pi.flags & PassInfo::PassFlag_ODtor))
|
||||
{
|
||||
pi.flags |= PassFlag_ForcedByRef;
|
||||
|
Loading…
x
Reference in New Issue
Block a user