Compiler - Additional asserts on FPU stack

This commit is contained in:
Emmanuel BENOîT 2017-11-13 18:53:42 +01:00
parent 83b76a96f6
commit 8b7964632a

View file

@ -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;
}
}