| 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 vmov(dst, VmovIndexLo, src); | 856 vmov(dst, VmovIndexLo, src); |
| 857 } | 857 } |
| 858 } | 858 } |
| 859 | 859 |
| 860 | 860 |
| 861 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { | 861 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { |
| 862 if (frame_mode == BUILD_STUB_FRAME) { | 862 if (frame_mode == BUILD_STUB_FRAME) { |
| 863 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); | 863 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); |
| 864 Push(Smi::FromInt(StackFrame::STUB)); | 864 Push(Smi::FromInt(StackFrame::STUB)); |
| 865 // Adjust FP to point to saved FP. | 865 // Adjust FP to point to saved FP. |
| 866 add(fp, sp, Operand(2 * kPointerSize)); | 866 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| 867 } else { | 867 } else { |
| 868 PredictableCodeSizeScope predictible_code_size_scope( | 868 PredictableCodeSizeScope predictible_code_size_scope( |
| 869 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); | 869 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); |
| 870 // The following three instructions must remain together and unmodified | 870 // The following three instructions must remain together and unmodified |
| 871 // for code aging to work properly. | 871 // for code aging to work properly. |
| 872 if (isolate()->IsCodePreAgingActive()) { | 872 if (isolate()->IsCodePreAgingActive()) { |
| 873 // Pre-age the code. | 873 // Pre-age the code. |
| 874 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); | 874 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); |
| 875 add(r0, pc, Operand(-8)); | 875 add(r0, pc, Operand(-8)); |
| 876 ldr(pc, MemOperand(pc, -4)); | 876 ldr(pc, MemOperand(pc, -4)); |
| 877 emit_code_stub_address(stub); | 877 emit_code_stub_address(stub); |
| 878 } else { | 878 } else { |
| 879 stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 879 stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
| 880 nop(ip.code()); | 880 nop(ip.code()); |
| 881 // Adjust FP to point to saved FP. | 881 // Adjust FP to point to saved FP. |
| 882 add(fp, sp, Operand(2 * kPointerSize)); | 882 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| 883 } | 883 } |
| 884 } | 884 } |
| 885 } | 885 } |
| 886 | 886 |
| 887 | 887 |
| 888 void MacroAssembler::EnterFrame(StackFrame::Type type) { | 888 void MacroAssembler::EnterFrame(StackFrame::Type type) { |
| 889 // r0-r3: preserved | 889 // r0-r3: preserved |
| 890 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); | 890 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); |
| 891 mov(ip, Operand(Smi::FromInt(type))); | 891 mov(ip, Operand(Smi::FromInt(type))); |
| 892 push(ip); | 892 push(ip); |
| 893 mov(ip, Operand(CodeObject())); | 893 mov(ip, Operand(CodeObject())); |
| 894 push(ip); | 894 push(ip); |
| 895 add(fp, sp, Operand(3 * kPointerSize)); // Adjust FP to point to saved FP. | 895 // Adjust FP to point to saved FP. |
| 896 add(fp, sp, |
| 897 Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); |
| 896 } | 898 } |
| 897 | 899 |
| 898 | 900 |
| 899 void MacroAssembler::LeaveFrame(StackFrame::Type type) { | 901 void MacroAssembler::LeaveFrame(StackFrame::Type type) { |
| 900 // r0: preserved | 902 // r0: preserved |
| 901 // r1: preserved | 903 // r1: preserved |
| 902 // r2: preserved | 904 // r2: preserved |
| 903 | 905 |
| 904 // Drop the execution stack down to the frame pointer and restore | 906 // Drop the execution stack down to the frame pointer and restore |
| 905 // the caller frame pointer and return address. | 907 // the caller frame pointer and return address. |
| (...skipping 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3962 void CodePatcher::EmitCondition(Condition cond) { | 3964 void CodePatcher::EmitCondition(Condition cond) { |
| 3963 Instr instr = Assembler::instr_at(masm_.pc_); | 3965 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3964 instr = (instr & ~kCondMask) | cond; | 3966 instr = (instr & ~kCondMask) | cond; |
| 3965 masm_.emit(instr); | 3967 masm_.emit(instr); |
| 3966 } | 3968 } |
| 3967 | 3969 |
| 3968 | 3970 |
| 3969 } } // namespace v8::internal | 3971 } } // namespace v8::internal |
| 3970 | 3972 |
| 3971 #endif // V8_TARGET_ARCH_ARM | 3973 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |