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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 uint32_t young_length; | 889 uint32_t young_length; |
890 byte* young_sequence = GetNoCodeAgeSequence(&young_length); | 890 byte* young_sequence = GetNoCodeAgeSequence(&young_length); |
891 if (age == kNoAgeCodeAge) { | 891 if (age == kNoAgeCodeAge) { |
892 CopyBytes(sequence, young_sequence, young_length); | 892 CopyBytes(sequence, young_sequence, young_length); |
893 CPU::FlushICache(sequence, young_length); | 893 CPU::FlushICache(sequence, young_length); |
894 } else { | 894 } else { |
895 Code* stub = GetCodeAgeStub(isolate, age, parity); | 895 Code* stub = GetCodeAgeStub(isolate, age, parity); |
896 CodePatcher patcher(sequence, young_length / Assembler::kInstrSize); | 896 CodePatcher patcher(sequence, young_length / Assembler::kInstrSize); |
897 patcher.masm()->add(r0, pc, Operand(-8)); | 897 patcher.masm()->add(r0, pc, Operand(-8)); |
898 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 898 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
899 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 899 patcher.masm()->emit_code_stub_address(stub); |
900 } | 900 } |
901 } | 901 } |
902 | 902 |
903 | 903 |
904 } } // namespace v8::internal | 904 } } // namespace v8::internal |
905 | 905 |
906 #endif // V8_TARGET_ARCH_ARM | 906 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |