OLD | NEW |
---|---|
1 | 1 |
2 // Copyright 2011 the V8 project authors. All rights reserved. | 2 // Copyright 2011 the V8 project authors. All rights reserved. |
3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
5 // met: | 5 // met: |
6 // | 6 // |
7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
450 __ sw(ToRegister(i), MemOperand(sp, kPointerSize * i)); | 450 __ sw(ToRegister(i), MemOperand(sp, kPointerSize * i)); |
451 } | 451 } |
452 } | 452 } |
453 | 453 |
454 const int kSavedRegistersAreaSize = | 454 const int kSavedRegistersAreaSize = |
455 (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize; | 455 (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize; |
456 | 456 |
457 // Get the bailout id from the stack. | 457 // Get the bailout id from the stack. |
458 __ lw(a2, MemOperand(sp, kSavedRegistersAreaSize)); | 458 __ lw(a2, MemOperand(sp, kSavedRegistersAreaSize)); |
459 | 459 |
460 // Get the address of the location in the code object if possible (a3) (return | 460 // Get the address of the location in the code object (a3) (return |
461 // address for lazy deoptimization) and compute the fp-to-sp delta in | 461 // address for lazy deoptimization) and compute the fp-to-sp delta in |
462 // register t0. | 462 // register t0. |
463 if (type() == EAGER || type() == SOFT) { | 463 if (type() == EAGER || type() == SOFT || type() == OSR) { |
danno
2013/07/10 10:04:30
As with ARM, why the special handling of LAZY?
titzer
2013/07/11 09:43:43
Done.
| |
464 __ mov(a3, zero_reg); | |
465 // Correct one word for bailout id. | |
466 __ Addu(t0, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); | |
467 } else if (type() == OSR) { | |
468 __ mov(a3, ra); | 464 __ mov(a3, ra); |
469 // Correct one word for bailout id. | 465 // Correct one word for bailout id. |
470 __ Addu(t0, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); | 466 __ Addu(t0, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize))); |
471 } else { | 467 } else { |
472 __ mov(a3, ra); | 468 __ mov(a3, ra); |
473 // Correct two words for bailout id and return address. | 469 // Correct two words for bailout id and return address. |
474 __ Addu(t0, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize))); | 470 __ Addu(t0, sp, Operand(kSavedRegistersAreaSize + (2 * kPointerSize))); |
475 } | 471 } |
476 | 472 |
477 __ Subu(t0, fp, t0); | 473 __ Subu(t0, fp, t0); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
666 } | 662 } |
667 | 663 |
668 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), | 664 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), |
669 count() * table_entry_size_); | 665 count() * table_entry_size_); |
670 } | 666 } |
671 | 667 |
672 #undef __ | 668 #undef __ |
673 | 669 |
674 | 670 |
675 } } // namespace v8::internal | 671 } } // namespace v8::internal |
OLD | NEW |