Description[x87] Keep x87 FPU stack empty when calling or return to natvie C++ function.
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=
Committed: https://crrev.com/17bf607ddc6b7e6d040d0dbd775fa316f56864cc
Cr-Commit-Position: refs/heads/master@{#33573}
Patch Set 1 #
Messages
Total messages: 12 (6 generated)
|