| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 6 |
| 7 #include "v8.h" | 7 #include "v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
| 10 | 10 |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 void MacroAssembler::LoadConstantPoolPointerRegister() { | 895 void MacroAssembler::LoadConstantPoolPointerRegister() { |
| 896 if (FLAG_enable_ool_constant_pool) { | 896 if (FLAG_enable_ool_constant_pool) { |
| 897 int constant_pool_offset = Code::kConstantPoolOffset - Code::kHeaderSize - | 897 int constant_pool_offset = Code::kConstantPoolOffset - Code::kHeaderSize - |
| 898 pc_offset() - Instruction::kPCReadOffset; | 898 pc_offset() - Instruction::kPCReadOffset; |
| 899 ASSERT(ImmediateFitsAddrMode2Instruction(constant_pool_offset)); | 899 ASSERT(ImmediateFitsAddrMode2Instruction(constant_pool_offset)); |
| 900 ldr(pp, MemOperand(pc, constant_pool_offset)); | 900 ldr(pp, MemOperand(pc, constant_pool_offset)); |
| 901 } | 901 } |
| 902 } | 902 } |
| 903 | 903 |
| 904 | 904 |
| 905 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { | 905 void MacroAssembler::Prologue(CompilationInfo* info) { |
| 906 if (frame_mode == BUILD_STUB_FRAME) { | 906 if (info->IsStub()) { |
| 907 PushFixedFrame(); | 907 PushFixedFrame(); |
| 908 Push(Smi::FromInt(StackFrame::STUB)); | 908 Push(Smi::FromInt(StackFrame::STUB)); |
| 909 // Adjust FP to point to saved FP. | 909 // Adjust FP to point to saved FP. |
| 910 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 910 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| 911 } else { | 911 } else { |
| 912 PredictableCodeSizeScope predictible_code_size_scope( | 912 PredictableCodeSizeScope predictible_code_size_scope( |
| 913 this, kNoCodeAgeSequenceLength); | 913 this, kNoCodeAgeSequenceLength); |
| 914 // The following three instructions must remain together and unmodified | 914 // The following three instructions must remain together and unmodified |
| 915 // for code aging to work properly. | 915 // for code aging to work properly. |
| 916 if (isolate()->IsCodePreAgingActive()) { | 916 if (info->IsCodePreAgingActive()) { |
| 917 // Pre-age the code. | 917 // Pre-age the code. |
| 918 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); | 918 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); |
| 919 add(r0, pc, Operand(-8)); | 919 add(r0, pc, Operand(-8)); |
| 920 ldr(pc, MemOperand(pc, -4)); | 920 ldr(pc, MemOperand(pc, -4)); |
| 921 emit_code_stub_address(stub); | 921 emit_code_stub_address(stub); |
| 922 } else { | 922 } else { |
| 923 PushFixedFrame(r1); | 923 PushFixedFrame(r1); |
| 924 nop(ip.code()); | 924 nop(ip.code()); |
| 925 // Adjust FP to point to saved FP. | 925 // Adjust FP to point to saved FP. |
| 926 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 926 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| (...skipping 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4058 sub(result, result, Operand(dividend)); | 4058 sub(result, result, Operand(dividend)); |
| 4059 } | 4059 } |
| 4060 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); | 4060 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); |
| 4061 add(result, result, Operand(dividend, LSR, 31)); | 4061 add(result, result, Operand(dividend, LSR, 31)); |
| 4062 } | 4062 } |
| 4063 | 4063 |
| 4064 | 4064 |
| 4065 } } // namespace v8::internal | 4065 } } // namespace v8::internal |
| 4066 | 4066 |
| 4067 #endif // V8_TARGET_ARCH_ARM | 4067 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |