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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 11280276: ARM: make MacroAssembler::LoadRoot emit exactly one instruction when in predictable code size scope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix long lines and sync comments. Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 // Open a frame scope to indicate that there is a frame on the stack. The 160 // Open a frame scope to indicate that there is a frame on the stack. The
161 // MANUAL indicates that the scope shouldn't actually generate code to set up 161 // MANUAL indicates that the scope shouldn't actually generate code to set up
162 // the frame (that is done below). 162 // the frame (that is done below).
163 FrameScope frame_scope(masm_, StackFrame::MANUAL); 163 FrameScope frame_scope(masm_, StackFrame::MANUAL);
164 164
165 int locals_count = info->scope()->num_stack_slots(); 165 int locals_count = info->scope()->num_stack_slots();
166 166
167 info->set_prologue_offset(masm_->pc_offset()); 167 info->set_prologue_offset(masm_->pc_offset());
168 // The following four instructions must remain together and unmodified for 168 {
169 // code aging to work properly. 169 PredictableCodeSizeScope predictible_code_size_scope(
170 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); 170 masm_, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
171 // Load undefined value here, so the value is ready for the loop 171 // The following three instructions must remain together and unmodified
172 // below. 172 // for code aging to work properly.
173 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); 173 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
174 // Adjust fp to point to caller's fp. 174 // Load undefined value here, so the value is ready for the loop
175 __ add(fp, sp, Operand(2 * kPointerSize)); 175 // below.
176 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
177 // Adjust FP to point to saved FP.
178 __ add(fp, sp, Operand(2 * kPointerSize));
179 }
176 180
177 { Comment cmnt(masm_, "[ Allocate locals"); 181 { Comment cmnt(masm_, "[ Allocate locals");
178 for (int i = 0; i < locals_count; i++) { 182 for (int i = 0; i < locals_count; i++) {
179 __ push(ip); 183 __ push(ip);
180 } 184 }
181 } 185 }
182 186
183 bool function_in_register = true; 187 bool function_in_register = true;
184 188
185 // Possibly allocate a local context. 189 // Possibly allocate a local context.
(...skipping 4341 matching lines...) Expand 10 before | Expand all | Expand 10 after
4527 *context_length = 0; 4531 *context_length = 0;
4528 return previous_; 4532 return previous_;
4529 } 4533 }
4530 4534
4531 4535
4532 #undef __ 4536 #undef __
4533 4537
4534 } } // namespace v8::internal 4538 } } // namespace v8::internal
4535 4539
4536 #endif // V8_TARGET_ARCH_ARM 4540 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698