mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 689916 Fix yarr crashes on SPARC r=dmandelin
This commit is contained in:
parent
cc2117d268
commit
43ee03feec
@ -1205,8 +1205,10 @@ class YarrGenerator : private MacroAssembler {
|
||||
// If we get here, the prior alternative matched - return success.
|
||||
|
||||
// Adjust the stack pointer to remove the pattern's frame.
|
||||
#if !WTF_CPU_SPARC
|
||||
if (m_pattern.m_body->m_callFrameSize)
|
||||
addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister);
|
||||
#endif
|
||||
|
||||
// Load appropriate values into the return register and the first output
|
||||
// slot, and return. In the case of pattern with a fixed size, we will
|
||||
@ -1513,8 +1515,10 @@ class YarrGenerator : private MacroAssembler {
|
||||
}
|
||||
|
||||
case OpMatchFailed:
|
||||
#if !WTF_CPU_SPARC
|
||||
if (m_pattern.m_body->m_callFrameSize)
|
||||
addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister);
|
||||
#endif
|
||||
move(TrustedImm32(-1), returnRegister);
|
||||
generateReturn();
|
||||
break;
|
||||
@ -1753,8 +1757,10 @@ class YarrGenerator : private MacroAssembler {
|
||||
// run any matches, and need to return a failure state from JIT code.
|
||||
matchFailed.link(this);
|
||||
|
||||
#if !WTF_CPU_SPARC
|
||||
if (m_pattern.m_body->m_callFrameSize)
|
||||
addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister);
|
||||
#endif
|
||||
move(TrustedImm32(-1), returnRegister);
|
||||
generateReturn();
|
||||
break;
|
||||
@ -2326,8 +2332,6 @@ class YarrGenerator : private MacroAssembler {
|
||||
push(SH4Registers::r13);
|
||||
#elif WTF_CPU_SPARC
|
||||
save(Imm32(-m_pattern.m_body->m_callFrameSize * sizeof(void*)));
|
||||
// set m_callFrameSize to 0 avoid and stack movement later.
|
||||
m_pattern.m_body->m_callFrameSize = 0;
|
||||
#elif WTF_CPU_MIPS
|
||||
// Do nothing.
|
||||
#endif
|
||||
@ -2377,8 +2381,10 @@ public:
|
||||
if (!m_pattern.m_body->m_hasFixedSize)
|
||||
store32(index, Address(output));
|
||||
|
||||
#if !WTF_CPU_SPARC
|
||||
if (m_pattern.m_body->m_callFrameSize)
|
||||
subPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister);
|
||||
#endif
|
||||
|
||||
// Compile the pattern to the internal 'YarrOp' representation.
|
||||
opCompileBody(m_pattern.m_body);
|
||||
|
Loading…
Reference in New Issue
Block a user