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

Side by Side Diff: src/arm/deoptimizer-arm.cc

Issue 2360243002: [arm] Clean up use of IsSupported and IsEnabled. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-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 // 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/codegen.h" 5 #include "src/codegen.h"
6 #include "src/deoptimizer.h" 6 #include "src/deoptimizer.h"
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/register-configuration.h" 8 #include "src/register-configuration.h"
9 #include "src/safepoint-table.h" 9 #include "src/safepoint-table.h"
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // Everything but pc, lr and ip which will be saved but not restored. 113 // Everything but pc, lr and ip which will be saved but not restored.
114 RegList restored_regs = kJSCallerSaved | kCalleeSaved | ip.bit(); 114 RegList restored_regs = kJSCallerSaved | kCalleeSaved | ip.bit();
115 115
116 const int kDoubleRegsSize = kDoubleSize * DwVfpRegister::kMaxNumRegisters; 116 const int kDoubleRegsSize = kDoubleSize * DwVfpRegister::kMaxNumRegisters;
117 117
118 // Save all allocatable VFP registers before messing with them. 118 // Save all allocatable VFP registers before messing with them.
119 DCHECK(kDoubleRegZero.code() == 14); 119 DCHECK(kDoubleRegZero.code() == 14);
120 DCHECK(kScratchDoubleReg.code() == 15); 120 DCHECK(kScratchDoubleReg.code() == 15);
121 121
122 // Check CPU flags for number of registers, setting the Z condition flag. 122 {
123 __ CheckFor32DRegs(ip); 123 // We use a run-time check for VFP32DREGS.
124 CpuFeatureScope scope(masm(), VFP32DREGS,
125 CpuFeatureScope::kDontCheckSupported);
124 126
125 // Push registers d0-d15, and possibly d16-d31, on the stack. 127 // Check CPU flags for number of registers, setting the Z condition flag.
126 // If d16-d31 are not pushed, decrease the stack pointer instead. 128 __ CheckFor32DRegs(ip);
127 __ vstm(db_w, sp, d16, d31, ne); 129
128 __ sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq); 130 // Push registers d0-d15, and possibly d16-d31, on the stack.
129 __ vstm(db_w, sp, d0, d15); 131 // If d16-d31 are not pushed, decrease the stack pointer instead.
132 __ vstm(db_w, sp, d16, d31, ne);
133 __ sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq);
134 __ vstm(db_w, sp, d0, d15);
135 }
130 136
131 // Push all 16 registers (needed to populate FrameDescription::registers_). 137 // Push all 16 registers (needed to populate FrameDescription::registers_).
132 // TODO(1588) Note that using pc with stm is deprecated, so we should perhaps 138 // TODO(1588) Note that using pc with stm is deprecated, so we should perhaps
133 // handle this a bit differently. 139 // handle this a bit differently.
134 __ stm(db_w, sp, restored_regs | sp.bit() | lr.bit() | pc.bit()); 140 __ stm(db_w, sp, restored_regs | sp.bit() | lr.bit() | pc.bit());
135 141
136 __ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); 142 __ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
137 __ str(fp, MemOperand(ip)); 143 __ str(fp, MemOperand(ip));
138 144
139 const int kSavedRegistersAreaSize = 145 const int kSavedRegistersAreaSize =
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 __ ldr(r6, MemOperand(r6, FrameDescription::frame_content_offset())); 258 __ ldr(r6, MemOperand(r6, FrameDescription::frame_content_offset()));
253 __ push(r6); 259 __ push(r6);
254 __ bind(&inner_loop_header); 260 __ bind(&inner_loop_header);
255 __ cmp(r3, Operand::Zero()); 261 __ cmp(r3, Operand::Zero());
256 __ b(ne, &inner_push_loop); // test for gt? 262 __ b(ne, &inner_push_loop); // test for gt?
257 __ add(r4, r4, Operand(kPointerSize)); 263 __ add(r4, r4, Operand(kPointerSize));
258 __ bind(&outer_loop_header); 264 __ bind(&outer_loop_header);
259 __ cmp(r4, r1); 265 __ cmp(r4, r1);
260 __ b(lt, &outer_push_loop); 266 __ b(lt, &outer_push_loop);
261 267
262 // Check CPU flags for number of registers, setting the Z condition flag.
263 __ CheckFor32DRegs(ip);
264
265 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset())); 268 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset()));
266 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) { 269 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
267 int code = config->GetAllocatableDoubleCode(i); 270 int code = config->GetAllocatableDoubleCode(i);
268 DwVfpRegister reg = DwVfpRegister::from_code(code); 271 DwVfpRegister reg = DwVfpRegister::from_code(code);
269 int src_offset = code * kDoubleSize + double_regs_offset; 272 int src_offset = code * kDoubleSize + double_regs_offset;
270 __ vldr(reg, r1, src_offset); 273 __ vldr(reg, r1, src_offset);
271 } 274 }
272 275
273 // Push state, pc, and continuation from the last output frame. 276 // Push state, pc, and continuation from the last output frame.
274 __ ldr(r6, MemOperand(r2, FrameDescription::state_offset())); 277 __ ldr(r6, MemOperand(r2, FrameDescription::state_offset()));
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { 367 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) {
365 DCHECK(FLAG_enable_embedded_constant_pool); 368 DCHECK(FLAG_enable_embedded_constant_pool);
366 SetFrameSlot(offset, value); 369 SetFrameSlot(offset, value);
367 } 370 }
368 371
369 372
370 #undef __ 373 #undef __
371 374
372 } // namespace internal 375 } // namespace internal
373 } // namespace v8 376 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698