| 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 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 233 } |
| 234 | 234 |
| 235 | 235 |
| 236 void MacroAssembler::Push(Handle<Object> handle) { | 236 void MacroAssembler::Push(Handle<Object> handle) { |
| 237 mov(ip, Operand(handle)); | 237 mov(ip, Operand(handle)); |
| 238 push(ip); | 238 push(ip); |
| 239 } | 239 } |
| 240 | 240 |
| 241 | 241 |
| 242 void MacroAssembler::Move(Register dst, Handle<Object> value) { | 242 void MacroAssembler::Move(Register dst, Handle<Object> value) { |
| 243 AllowDeferredHandleDereference smi_check; | 243 mov(dst, Operand(value)); |
| 244 if (value->IsSmi()) { | |
| 245 mov(dst, Operand(value)); | |
| 246 } else { | |
| 247 DCHECK(value->IsHeapObject()); | |
| 248 if (isolate()->heap()->InNewSpace(*value)) { | |
| 249 Handle<Cell> cell = isolate()->factory()->NewCell(value); | |
| 250 mov(dst, Operand(cell)); | |
| 251 ldr(dst, FieldMemOperand(dst, Cell::kValueOffset)); | |
| 252 } else { | |
| 253 mov(dst, Operand(value)); | |
| 254 } | |
| 255 } | |
| 256 } | 244 } |
| 257 | 245 |
| 258 | 246 |
| 259 void MacroAssembler::Move(Register dst, Register src, Condition cond) { | 247 void MacroAssembler::Move(Register dst, Register src, Condition cond) { |
| 260 if (!dst.is(src)) { | 248 if (!dst.is(src)) { |
| 261 mov(dst, src, LeaveCC, cond); | 249 mov(dst, src, LeaveCC, cond); |
| 262 } | 250 } |
| 263 } | 251 } |
| 264 | 252 |
| 265 void MacroAssembler::Move(SwVfpRegister dst, SwVfpRegister src) { | 253 void MacroAssembler::Move(SwVfpRegister dst, SwVfpRegister src) { |
| (...skipping 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4036 } | 4024 } |
| 4037 } | 4025 } |
| 4038 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 4026 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 4039 add(result, result, Operand(dividend, LSR, 31)); | 4027 add(result, result, Operand(dividend, LSR, 31)); |
| 4040 } | 4028 } |
| 4041 | 4029 |
| 4042 } // namespace internal | 4030 } // namespace internal |
| 4043 } // namespace v8 | 4031 } // namespace v8 |
| 4044 | 4032 |
| 4045 #endif // V8_TARGET_ARCH_ARM | 4033 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |