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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 } else { | 924 } else { |
925 PredictableCodeSizeScope predictible_code_size_scope( | 925 PredictableCodeSizeScope predictible_code_size_scope( |
926 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); | 926 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); |
927 // The following three instructions must remain together and unmodified | 927 // The following three instructions must remain together and unmodified |
928 // for code aging to work properly. | 928 // for code aging to work properly. |
929 if (FLAG_optimize_for_size && FLAG_age_code) { | 929 if (FLAG_optimize_for_size && FLAG_age_code) { |
930 // Pre-age the code. | 930 // Pre-age the code. |
931 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); | 931 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); |
932 add(r0, pc, Operand(-8)); | 932 add(r0, pc, Operand(-8)); |
933 ldr(pc, MemOperand(pc, -4)); | 933 ldr(pc, MemOperand(pc, -4)); |
934 dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 934 emit_code_stub_address(stub); |
935 } else { | 935 } else { |
936 stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 936 stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
937 nop(ip.code()); | 937 nop(ip.code()); |
938 // Adjust FP to point to saved FP. | 938 // Adjust FP to point to saved FP. |
939 add(fp, sp, Operand(2 * kPointerSize)); | 939 add(fp, sp, Operand(2 * kPointerSize)); |
940 } | 940 } |
941 } | 941 } |
942 } | 942 } |
943 | 943 |
944 | 944 |
(...skipping 3046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3991 void CodePatcher::EmitCondition(Condition cond) { | 3991 void CodePatcher::EmitCondition(Condition cond) { |
3992 Instr instr = Assembler::instr_at(masm_.pc_); | 3992 Instr instr = Assembler::instr_at(masm_.pc_); |
3993 instr = (instr & ~kCondMask) | cond; | 3993 instr = (instr & ~kCondMask) | cond; |
3994 masm_.emit(instr); | 3994 masm_.emit(instr); |
3995 } | 3995 } |
3996 | 3996 |
3997 | 3997 |
3998 } } // namespace v8::internal | 3998 } } // namespace v8::internal |
3999 | 3999 |
4000 #endif // V8_TARGET_ARCH_ARM | 4000 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |