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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 static byte* GetNoCodeAgeSequence(uint32_t* length) { | 842 static byte* GetNoCodeAgeSequence(uint32_t* length) { |
843 // The sequence of instructions that is patched out for aging code is the | 843 // The sequence of instructions that is patched out for aging code is the |
844 // following boilerplate stack-building prologue that is found in FUNCTIONS | 844 // following boilerplate stack-building prologue that is found in FUNCTIONS |
845 static bool initialized = false; | 845 static bool initialized = false; |
846 static uint32_t sequence[kNoCodeAgeSequenceLength]; | 846 static uint32_t sequence[kNoCodeAgeSequenceLength]; |
847 byte* byte_sequence = reinterpret_cast<byte*>(sequence); | 847 byte* byte_sequence = reinterpret_cast<byte*>(sequence); |
848 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; | 848 *length = kNoCodeAgeSequenceLength * Assembler::kInstrSize; |
849 if (!initialized) { | 849 if (!initialized) { |
850 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); | 850 CodePatcher patcher(byte_sequence, kNoCodeAgeSequenceLength); |
851 PredictableCodeSizeScope scope(patcher.masm(), *length); | 851 PredictableCodeSizeScope scope(patcher.masm(), *length); |
852 patcher.masm()->stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 852 patcher.masm()->PushFixedFrame(r1); |
853 patcher.masm()->nop(ip.code()); | 853 patcher.masm()->nop(ip.code()); |
854 patcher.masm()->add(fp, sp, | 854 patcher.masm()->add(fp, sp, |
855 Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 855 Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
856 initialized = true; | 856 initialized = true; |
857 } | 857 } |
858 return byte_sequence; | 858 return byte_sequence; |
859 } | 859 } |
860 | 860 |
861 | 861 |
862 bool Code::IsYoungSequence(byte* sequence) { | 862 bool Code::IsYoungSequence(byte* sequence) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 patcher.masm()->add(r0, pc, Operand(-8)); | 898 patcher.masm()->add(r0, pc, Operand(-8)); |
899 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 899 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
900 patcher.masm()->emit_code_stub_address(stub); | 900 patcher.masm()->emit_code_stub_address(stub); |
901 } | 901 } |
902 } | 902 } |
903 | 903 |
904 | 904 |
905 } } // namespace v8::internal | 905 } } // namespace v8::internal |
906 | 906 |
907 #endif // V8_TARGET_ARCH_ARM | 907 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |