| 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 "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
| 10 | 10 |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 } | 960 } |
| 961 | 961 |
| 962 | 962 |
| 963 void MacroAssembler::StubPrologue() { | 963 void MacroAssembler::StubPrologue() { |
| 964 PushFixedFrame(); | 964 PushFixedFrame(); |
| 965 Push(Smi::FromInt(StackFrame::STUB)); | 965 Push(Smi::FromInt(StackFrame::STUB)); |
| 966 // Adjust FP to point to saved FP. | 966 // Adjust FP to point to saved FP. |
| 967 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 967 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| 968 if (FLAG_enable_ool_constant_pool) { | 968 if (FLAG_enable_ool_constant_pool) { |
| 969 LoadConstantPoolPointerRegister(); | 969 LoadConstantPoolPointerRegister(); |
| 970 set_constant_pool_available(true); | 970 set_ool_constant_pool_available(true); |
| 971 } | 971 } |
| 972 } | 972 } |
| 973 | 973 |
| 974 | 974 |
| 975 void MacroAssembler::Prologue(bool code_pre_aging) { | 975 void MacroAssembler::Prologue(bool code_pre_aging) { |
| 976 { PredictableCodeSizeScope predictible_code_size_scope( | 976 { PredictableCodeSizeScope predictible_code_size_scope( |
| 977 this, kNoCodeAgeSequenceLength); | 977 this, kNoCodeAgeSequenceLength); |
| 978 // The following three instructions must remain together and unmodified | 978 // The following three instructions must remain together and unmodified |
| 979 // for code aging to work properly. | 979 // for code aging to work properly. |
| 980 if (code_pre_aging) { | 980 if (code_pre_aging) { |
| 981 // Pre-age the code. | 981 // Pre-age the code. |
| 982 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); | 982 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); |
| 983 add(r0, pc, Operand(-8)); | 983 add(r0, pc, Operand(-8)); |
| 984 ldr(pc, MemOperand(pc, -4)); | 984 ldr(pc, MemOperand(pc, -4)); |
| 985 emit_code_stub_address(stub); | 985 emit_code_stub_address(stub); |
| 986 } else { | 986 } else { |
| 987 PushFixedFrame(r1); | 987 PushFixedFrame(r1); |
| 988 nop(ip.code()); | 988 nop(ip.code()); |
| 989 // Adjust FP to point to saved FP. | 989 // Adjust FP to point to saved FP. |
| 990 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 990 add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| 991 } | 991 } |
| 992 } | 992 } |
| 993 if (FLAG_enable_ool_constant_pool) { | 993 if (FLAG_enable_ool_constant_pool) { |
| 994 LoadConstantPoolPointerRegister(); | 994 LoadConstantPoolPointerRegister(); |
| 995 set_constant_pool_available(true); | 995 set_ool_constant_pool_available(true); |
| 996 } | 996 } |
| 997 } | 997 } |
| 998 | 998 |
| 999 | 999 |
| 1000 void MacroAssembler::EnterFrame(StackFrame::Type type, | 1000 void MacroAssembler::EnterFrame(StackFrame::Type type, |
| 1001 bool load_constant_pool) { | 1001 bool load_constant_pool_pointer_reg) { |
| 1002 // r0-r3: preserved | 1002 // r0-r3: preserved |
| 1003 PushFixedFrame(); | 1003 PushFixedFrame(); |
| 1004 if (FLAG_enable_ool_constant_pool && load_constant_pool) { | 1004 if (FLAG_enable_ool_constant_pool && load_constant_pool_pointer_reg) { |
| 1005 LoadConstantPoolPointerRegister(); | 1005 LoadConstantPoolPointerRegister(); |
| 1006 } | 1006 } |
| 1007 mov(ip, Operand(Smi::FromInt(type))); | 1007 mov(ip, Operand(Smi::FromInt(type))); |
| 1008 push(ip); | 1008 push(ip); |
| 1009 mov(ip, Operand(CodeObject())); | 1009 mov(ip, Operand(CodeObject())); |
| 1010 push(ip); | 1010 push(ip); |
| 1011 // Adjust FP to point to saved FP. | 1011 // Adjust FP to point to saved FP. |
| 1012 add(fp, sp, | 1012 add(fp, sp, |
| 1013 Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); | 1013 Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); |
| 1014 } | 1014 } |
| (...skipping 3067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4082 sub(result, result, Operand(dividend)); | 4082 sub(result, result, Operand(dividend)); |
| 4083 } | 4083 } |
| 4084 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 4084 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 4085 add(result, result, Operand(dividend, LSR, 31)); | 4085 add(result, result, Operand(dividend, LSR, 31)); |
| 4086 } | 4086 } |
| 4087 | 4087 |
| 4088 | 4088 |
| 4089 } } // namespace v8::internal | 4089 } } // namespace v8::internal |
| 4090 | 4090 |
| 4091 #endif // V8_TARGET_ARCH_ARM | 4091 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |