title: Calling an assembly language function causes "floating point stack check" exception
body: <p>Executing following code:</p>
  
  <pre><code>function ABCD32(Value: Cardinal): Single; register;
  asm
    BSWAP  EAX
  end;
  
  function HexToFloat(hexValue: string; fmt: THexFloatFormat): Single;
  var
    c: Cardinal;
    Err: Integer;
  begin
    Result := NaN;
    c := HexToCardinal(hexValue, Err); //DCBA format
    if Err &lt;&gt; 0 then Exit();
    case fmt of
      hfABCD: Result := ABCD32(c); //Here, after return from ABCD32
      hfBADC: Result := BADC32(c);
      hfCDAB: Result := CDAB32(c);
      hfDCBA: Result := DCBA32(c);
    end;
  end;
  </code></pre>
  
  <p>causes a run-time errror:</p>
  
  <blockquote>
    <p>Project HexFloat.exe raised exception class $C0000092 with message 'floating point stack check at 0x004e9903'.</p>
  </blockquote>
  
  <p>What is this and how to handle it?</p>
  
  <p><strong>Update</strong></p>
  
  <p>Here is the CPU window output:</p>
  
  <pre><code>HexFloat.dpr.162: hfABCD: Result := ABCD32(c);
  004E98F8 8B45F0           mov eax,[ebp-$10]
  004E98FB E894FFFFFF       call ABCD32
  004E9900 D95DF4           fstp dword ptr [ebp-$0c] //WTF?
  004E9903 9B               wait //Exception happens here
  004E9904 EB28             jmp $004e992e
  </code></pre>