Compiler - Additional asserts on FPU stack
This commit is contained in:
parent
83b76a96f6
commit
8b7964632a
1 changed files with 2 additions and 1 deletions
|
@ -728,6 +728,7 @@ void T_CompilerImpl_::processFunction(
|
||||||
{
|
{
|
||||||
if ( exit ) {
|
if ( exit ) {
|
||||||
assert( sdMain == args + lvars + 1 );
|
assert( sdMain == args + lvars + 1 );
|
||||||
|
assert( sdFPU == 0 );
|
||||||
if ( lvars ) {
|
if ( lvars ) {
|
||||||
addInstruction( OP_POP , lvars - 1 , location );
|
addInstruction( OP_POP , lvars - 1 , location );
|
||||||
sdMain -= lvars;
|
sdMain -= lvars;
|
||||||
|
@ -846,7 +847,7 @@ void T_CompilerImpl_::applyStackEffects(
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( f ) {
|
if ( f ) {
|
||||||
assert( f > 0 || sdFPU >= uint32_t( -m ) );
|
assert( ( f > 0 && sdFPU + f < 8 ) || ( f < 0 && sdFPU >= uint32_t( -m ) ) );
|
||||||
sdFPU += m;
|
sdFPU += m;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue