diff --git a/opcomp.cc b/opcomp.cc index 73f2499..876c6c4 100644 --- a/opcomp.cc +++ b/opcomp.cc @@ -728,6 +728,7 @@ void T_CompilerImpl_::processFunction( { if ( exit ) { assert( sdMain == args + lvars + 1 ); + assert( sdFPU == 0 ); if ( lvars ) { addInstruction( OP_POP , lvars - 1 , location ); sdMain -= lvars; @@ -846,7 +847,7 @@ void T_CompilerImpl_::applyStackEffects( } if ( f ) { - assert( f > 0 || sdFPU >= uint32_t( -m ) ); + assert( ( f > 0 && sdFPU + f < 8 ) || ( f < 0 && sdFPU >= uint32_t( -m ) ) ); sdFPU += m; } }