OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2008 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 2008 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); |
2009 return kSuccess; | 2009 return kSuccess; |
2010 } | 2010 } |
2011 | 2011 |
2012 void CodeGenerator::FinishFrame(Frame* frame) { | 2012 void CodeGenerator::FinishFrame(Frame* frame) { |
2013 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 2013 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); |
2014 const RegList double_saves = descriptor->CalleeSavedFPRegisters(); | 2014 const RegList double_saves = descriptor->CalleeSavedFPRegisters(); |
2015 | 2015 |
2016 // Save callee-saved Double registers. | 2016 // Save callee-saved Double registers. |
2017 if (double_saves != 0) { | 2017 if (double_saves != 0) { |
2018 frame->AlignSavedCalleeRegisterSlots(); | 2018 frame->AlignFrame(); |
2019 DCHECK(kNumCalleeSavedDoubles == | 2019 DCHECK(kNumCalleeSavedDoubles == |
2020 base::bits::CountPopulation32(double_saves)); | 2020 base::bits::CountPopulation32(double_saves)); |
2021 frame->AllocateSavedCalleeRegisterSlots(kNumCalleeSavedDoubles * | 2021 frame->AllocateSavedCalleeRegisterSlots(kNumCalleeSavedDoubles * |
2022 (kDoubleSize / kPointerSize)); | 2022 (kDoubleSize / kPointerSize)); |
2023 } | 2023 } |
2024 // Save callee-saved registers. | 2024 // Save callee-saved registers. |
2025 const RegList saves = descriptor->CalleeSavedRegisters(); | 2025 const RegList saves = descriptor->CalleeSavedRegisters(); |
2026 if (saves != 0) { | 2026 if (saves != 0) { |
2027 // register save area does not include the fp or constant pool pointer. | 2027 // register save area does not include the fp or constant pool pointer. |
2028 const int num_saves = kNumCalleeSaved - 1; | 2028 const int num_saves = kNumCalleeSaved - 1; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 padding_size -= 2; | 2347 padding_size -= 2; |
2348 } | 2348 } |
2349 } | 2349 } |
2350 } | 2350 } |
2351 | 2351 |
2352 #undef __ | 2352 #undef __ |
2353 | 2353 |
2354 } // namespace compiler | 2354 } // namespace compiler |
2355 } // namespace internal | 2355 } // namespace internal |
2356 } // namespace v8 | 2356 } // namespace v8 |
OLD | NEW |