OLD | NEW |
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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 // The sequence of instructions that is patched out for aging code is the | 611 // The sequence of instructions that is patched out for aging code is the |
612 // following boilerplate stack-building prologue that is found in FUNCTIONS | 612 // following boilerplate stack-building prologue that is found in FUNCTIONS |
613 static bool initialized = false; | 613 static bool initialized = false; |
614 static uint32_t sequence[kNoCodeAgeSequenceLength]; | 614 static uint32_t sequence[kNoCodeAgeSequenceLength]; |
615 byte* byte_sequence = reinterpret_cast<byte*>(sequence); | 615 byte* byte_sequence = reinterpret_cast<byte*>(sequence); |
616 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; | 616 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; |
617 if (!initialized) { | 617 if (!initialized) { |
618 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); | 618 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); |
619 patcher.masm()->Push(ra, fp, cp, a1); | 619 patcher.masm()->Push(ra, fp, cp, a1); |
620 patcher.masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP); | 620 patcher.masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP); |
621 patcher.masm()->Addu(fp, sp, Operand(2 * kPointerSize)); | 621 patcher.masm()->Addu(fp, sp, |
| 622 Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
622 initialized = true; | 623 initialized = true; |
623 } | 624 } |
624 return byte_sequence; | 625 return byte_sequence; |
625 } | 626 } |
626 | 627 |
627 | 628 |
628 bool Code::IsYoungSequence(byte* sequence) { | 629 bool Code::IsYoungSequence(byte* sequence) { |
629 uint32_t young_length; | 630 uint32_t young_length; |
630 byte* young_sequence = GetNoCodeAgeSequence(&young_length); | 631 byte* young_sequence = GetNoCodeAgeSequence(&young_length); |
631 bool result = !memcmp(sequence, young_sequence, young_length); | 632 bool result = !memcmp(sequence, young_sequence, young_length); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 patcher.masm()->emit_code_stub_address(stub); | 675 patcher.masm()->emit_code_stub_address(stub); |
675 } | 676 } |
676 } | 677 } |
677 | 678 |
678 | 679 |
679 #undef __ | 680 #undef __ |
680 | 681 |
681 } } // namespace v8::internal | 682 } } // namespace v8::internal |
682 | 683 |
683 #endif // V8_TARGET_ARCH_MIPS | 684 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |