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

Side by Side Diff: src/arm/lithium-gap-resolver-arm.cc

Issue 16925008: Generate StoreGlobal stubs with Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address feedback Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // combinations are possible. 212 // combinations are possible.
213 213
214 if (source->IsRegister()) { 214 if (source->IsRegister()) {
215 Register source_register = cgen_->ToRegister(source); 215 Register source_register = cgen_->ToRegister(source);
216 if (destination->IsRegister()) { 216 if (destination->IsRegister()) {
217 __ mov(cgen_->ToRegister(destination), source_register); 217 __ mov(cgen_->ToRegister(destination), source_register);
218 } else { 218 } else {
219 ASSERT(destination->IsStackSlot()); 219 ASSERT(destination->IsStackSlot());
220 __ str(source_register, cgen_->ToMemOperand(destination)); 220 __ str(source_register, cgen_->ToMemOperand(destination));
221 } 221 }
222
223 } else if (source->IsStackSlot()) { 222 } else if (source->IsStackSlot()) {
224 MemOperand source_operand = cgen_->ToMemOperand(source); 223 MemOperand source_operand = cgen_->ToMemOperand(source);
225 if (destination->IsRegister()) { 224 if (destination->IsRegister()) {
226 __ ldr(cgen_->ToRegister(destination), source_operand); 225 __ ldr(cgen_->ToRegister(destination), source_operand);
227 } else { 226 } else {
228 ASSERT(destination->IsStackSlot()); 227 ASSERT(destination->IsStackSlot());
229 MemOperand destination_operand = cgen_->ToMemOperand(destination); 228 MemOperand destination_operand = cgen_->ToMemOperand(destination);
230 if (in_cycle_) { 229 if (in_cycle_) {
231 if (!destination_operand.OffsetIsUint12Encodable()) { 230 if (!destination_operand.OffsetIsUint12Encodable()) {
232 // ip is overwritten while saving the value to the destination. 231 // ip is overwritten while saving the value to the destination.
(...skipping 15 matching lines...) Expand all
248 LConstantOperand* constant_source = LConstantOperand::cast(source); 247 LConstantOperand* constant_source = LConstantOperand::cast(source);
249 if (destination->IsRegister()) { 248 if (destination->IsRegister()) {
250 Register dst = cgen_->ToRegister(destination); 249 Register dst = cgen_->ToRegister(destination);
251 if (cgen_->IsSmi(constant_source)) { 250 if (cgen_->IsSmi(constant_source)) {
252 __ mov(dst, Operand(cgen_->ToSmi(constant_source))); 251 __ mov(dst, Operand(cgen_->ToSmi(constant_source)));
253 } else if (cgen_->IsInteger32(constant_source)) { 252 } else if (cgen_->IsInteger32(constant_source)) {
254 __ mov(dst, Operand(cgen_->ToInteger32(constant_source))); 253 __ mov(dst, Operand(cgen_->ToInteger32(constant_source)));
255 } else { 254 } else {
256 __ LoadObject(dst, cgen_->ToHandle(constant_source)); 255 __ LoadObject(dst, cgen_->ToHandle(constant_source));
257 } 256 }
257 } else if (source->IsDoubleRegister()) {
258 DwVfpRegister result = cgen_->ToDoubleRegister(destination);
259 double v = cgen_->ToDouble(constant_source);
260 __ Vmov(result, v, ip);
258 } else { 261 } else {
259 ASSERT(destination->IsStackSlot()); 262 ASSERT(destination->IsStackSlot());
260 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone. 263 ASSERT(!in_cycle_); // Constant moves happen after all cycles are gone.
261 if (cgen_->IsSmi(constant_source)) { 264 if (cgen_->IsSmi(constant_source)) {
262 __ mov(kSavedValueRegister, Operand(cgen_->ToSmi(constant_source))); 265 __ mov(kSavedValueRegister, Operand(cgen_->ToSmi(constant_source)));
263 } else if (cgen_->IsInteger32(constant_source)) { 266 } else if (cgen_->IsInteger32(constant_source)) {
264 __ mov(kSavedValueRegister, 267 __ mov(kSavedValueRegister,
265 Operand(cgen_->ToInteger32(constant_source))); 268 Operand(cgen_->ToInteger32(constant_source)));
266 } else { 269 } else {
267 __ LoadObject(kSavedValueRegister, 270 __ LoadObject(kSavedValueRegister,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 UNREACHABLE(); 309 UNREACHABLE();
307 } 310 }
308 311
309 moves_[index].Eliminate(); 312 moves_[index].Eliminate();
310 } 313 }
311 314
312 315
313 #undef __ 316 #undef __
314 317
315 } } // namespace v8::internal 318 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ast.cc » ('j') | src/x64/lithium-gap-resolver-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698