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

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

Issue 21063002: Out-of-line constant pool on Arm: Stage 1 - Free up r7 for use as constant pool pointer register (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo in comment. Created 7 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 | 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 __ add(r1, r4, Operand(r1, LSL, 2)); 355 __ add(r1, r4, Operand(r1, LSL, 2));
356 __ jmp(&outer_loop_header); 356 __ jmp(&outer_loop_header);
357 __ bind(&outer_push_loop); 357 __ bind(&outer_push_loop);
358 // Inner loop state: r2 = current FrameDescription*, r3 = loop index. 358 // Inner loop state: r2 = current FrameDescription*, r3 = loop index.
359 __ ldr(r2, MemOperand(r4, 0)); // output_[ix] 359 __ ldr(r2, MemOperand(r4, 0)); // output_[ix]
360 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset())); 360 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset()));
361 __ jmp(&inner_loop_header); 361 __ jmp(&inner_loop_header);
362 __ bind(&inner_push_loop); 362 __ bind(&inner_push_loop);
363 __ sub(r3, r3, Operand(sizeof(uint32_t))); 363 __ sub(r3, r3, Operand(sizeof(uint32_t)));
364 __ add(r6, r2, Operand(r3)); 364 __ add(r6, r2, Operand(r3));
365 __ ldr(r7, MemOperand(r6, FrameDescription::frame_content_offset())); 365 __ ldr(r6, MemOperand(r6, FrameDescription::frame_content_offset()));
366 __ push(r7); 366 __ push(r6);
367 __ bind(&inner_loop_header); 367 __ bind(&inner_loop_header);
368 __ cmp(r3, Operand::Zero()); 368 __ cmp(r3, Operand::Zero());
369 __ b(ne, &inner_push_loop); // test for gt? 369 __ b(ne, &inner_push_loop); // test for gt?
370 __ add(r4, r4, Operand(kPointerSize)); 370 __ add(r4, r4, Operand(kPointerSize));
371 __ bind(&outer_loop_header); 371 __ bind(&outer_loop_header);
372 __ cmp(r4, r1); 372 __ cmp(r4, r1);
373 __ b(lt, &outer_push_loop); 373 __ b(lt, &outer_push_loop);
374 374
375 // Check CPU flags for number of registers, setting the Z condition flag. 375 // Check CPU flags for number of registers, setting the Z condition flag.
376 __ CheckFor32DRegs(ip); 376 __ CheckFor32DRegs(ip);
(...skipping 25 matching lines...) Expand all
402 } 402 }
403 403
404 // Restore the registers from the stack. 404 // Restore the registers from the stack.
405 __ ldm(ia_w, sp, restored_regs); // all but pc registers. 405 __ ldm(ia_w, sp, restored_regs); // all but pc registers.
406 __ pop(ip); // remove sp 406 __ pop(ip); // remove sp
407 __ pop(ip); // remove lr 407 __ pop(ip); // remove lr
408 408
409 __ InitializeRootRegister(); 409 __ InitializeRootRegister();
410 410
411 __ pop(ip); // remove pc 411 __ pop(ip); // remove pc
412 __ pop(r7); // get continuation, leave pc on stack 412 __ pop(ip); // get continuation, leave pc on stack
413 __ pop(lr); 413 __ pop(lr);
414 __ Jump(r7); 414 __ Jump(ip);
415 __ stop("Unreachable."); 415 __ stop("Unreachable.");
416 } 416 }
417 417
418 418
419 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { 419 void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
420 // Create a sequence of deoptimization entries. 420 // Create a sequence of deoptimization entries.
421 // Note that registers are still live when jumping to an entry. 421 // Note that registers are still live when jumping to an entry.
422 Label done; 422 Label done;
423 for (int i = 0; i < count(); i++) { 423 for (int i = 0; i < count(); i++) {
424 int start = masm()->pc_offset(); 424 int start = masm()->pc_offset();
(...skipping 13 matching lines...) Expand all
438 438
439 439
440 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { 440 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) {
441 SetFrameSlot(offset, value); 441 SetFrameSlot(offset, value);
442 } 442 }
443 443
444 444
445 #undef __ 445 #undef __
446 446
447 } } // namespace v8::internal 447 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698