Commit 4fe366f1 authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

X87: Return different allocatable double register number for X87 turbofan / crankshaft seperately.

   Currently X87 turbofan backend use only one double register. But crankshaft needs to use more than 1
   double register. The reason is that the X87 register is stack-based and the register allocator use
   the same algorithm for all registers. So the backend of X87 needs to maintain the X87 stack status
   between basic blocks during code generation. But for Turbofan backend, it can only handle discrete
   platform-related LIRs. It's difficult to maintain the x87 stack status during different basic blocks.
   So we use the register configuration selection mechanism to return different register configuration
   for X87 turbofan and crankshaft seperately.

   This CL is a follow-up of https://codereview.chromium.org/1405673003/.

BUG=

Review URL: https://codereview.chromium.org/1413343002

Cr-Commit-Position: refs/heads/master@{#31492}
parent acdd8696
......@@ -44,7 +44,9 @@ class ArchDefaultRegisterConfiguration : public RegisterConfiguration {
kMaxAllocatableDoubleRegisterCount,
kMaxAllocatableDoubleRegisterCount,
#elif V8_TARGET_ARCH_X87
kMaxAllocatableGeneralRegisterCount, 1, 1,
kMaxAllocatableGeneralRegisterCount,
compiler == TURBOFAN ? 1 : kMaxAllocatableDoubleRegisterCount,
compiler == TURBOFAN ? 1 : kMaxAllocatableDoubleRegisterCount,
#elif V8_TARGET_ARCH_X64
kMaxAllocatableGeneralRegisterCount,
kMaxAllocatableDoubleRegisterCount,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment