• zhengxing.li's avatar
    [x87] Keep x87 FPU stack empty when calling or return to natvie C++ function. · 17bf607d
    zhengxing.li authored
      X87 TurboFan code generation convention assumes that there is always a value at the top of the X87 FPU stack for each TurboFan's float operation.
      But native C++ function assumes there are 8 FPU stack slots can be used when it's called. This will lead to FPU stack overflow when TurboFan x87 code calls or returns back to native C++ function.
      as there are only 7 FPU stack slots remained for this native C++ function.
    
      This CL does:
      1. Make sure X87 FPU stack depth always 1 before each TurboFan's float operation
      2. Remove the top value in X87 FPU stack required by TurboFan when calling or returning from TurboFan Functions to other TurboFan or Non-TurboFan Functions.
      3. Add the strict X87 FPU stack depth check for TurboFan debug code.
      4. Re-initialize the X87 FPU stack and push a value at the top of the X87 FPU stack to satify the X87 TurboFan code generation convention for float operation
         at the entries where the TurboFan code will be called such as: exception handler, CallCFunctions in tests,..etc
    
    BUG=
    
    Review URL: https://codereview.chromium.org/1636353002
    
    Cr-Commit-Position: refs/heads/master@{#33573}
    17bf607d
Name
Last commit
Last update
..
OWNERS Loading commit data...
code-generator-x87.cc Loading commit data...
instruction-codes-x87.h Loading commit data...
instruction-scheduler-x87.cc Loading commit data...
instruction-selector-x87.cc Loading commit data...