Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: src/compiler/x64/code-generator-x64.cc

Issue 2124983004: [Turbofan] Change AlignSavedCalleeRegisterSlots to AlignFrame. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index 4dc75592ec2b189a5581a5ce1f89399cd40a02b2..5dd41428ef0a605f73c4f575e1dca6dc2ebf9018 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -2124,22 +2124,15 @@ void CodeGenerator::FinishFrame(Frame* frame) {
CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
const RegList saves_fp = descriptor->CalleeSavedFPRegisters();
- if (saves_fp != 0) {
- frame->AlignSavedCalleeRegisterSlots();
- if (saves_fp != 0) { // Save callee-saved XMM registers.
- const uint32_t saves_fp_count = base::bits::CountPopulation32(saves_fp);
- frame->AllocateSavedCalleeRegisterSlots(saves_fp_count *
- (kQuadWordSize / kPointerSize));
- }
+ if (saves_fp != 0) { // Save callee-saved XMM registers.
+ frame->AlignFrame();
+ uint32_t count = base::bits::CountPopulation32(saves_fp);
+ frame->AllocateSavedCalleeRegisterSlots(count *
+ (kQuadWordSize / kPointerSize));
}
const RegList saves = descriptor->CalleeSavedRegisters();
if (saves != 0) { // Save callee-saved registers.
- int count = 0;
- for (int i = Register::kNumRegisters - 1; i >= 0; i--) {
- if (((1 << i) & saves)) {
- ++count;
- }
- }
+ uint32_t count = base::bits::CountPopulation32(saves);
frame->AllocateSavedCalleeRegisterSlots(count);
}
}
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698