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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 398 |
399 void MacroAssembler::Store(Register src, | 399 void MacroAssembler::Store(Register src, |
400 const MemOperand& dst, | 400 const MemOperand& dst, |
401 Representation r) { | 401 Representation r) { |
402 ASSERT(!r.IsDouble()); | 402 ASSERT(!r.IsDouble()); |
403 if (r.IsInteger8() || r.IsUInteger8()) { | 403 if (r.IsInteger8() || r.IsUInteger8()) { |
404 strb(src, dst); | 404 strb(src, dst); |
405 } else if (r.IsInteger16() || r.IsUInteger16()) { | 405 } else if (r.IsInteger16() || r.IsUInteger16()) { |
406 strh(src, dst); | 406 strh(src, dst); |
407 } else { | 407 } else { |
408 if (r.IsHeapObject()) { | |
409 AssertNotSmi(src); | |
410 } else if (r.IsSmi()) { | |
411 AssertSmi(src); | |
412 } | |
413 str(src, dst); | 408 str(src, dst); |
414 } | 409 } |
415 } | 410 } |
416 | 411 |
417 | 412 |
418 void MacroAssembler::LoadRoot(Register destination, | 413 void MacroAssembler::LoadRoot(Register destination, |
419 Heap::RootListIndex index, | 414 Heap::RootListIndex index, |
420 Condition cond) { | 415 Condition cond) { |
421 if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) && | 416 if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) && |
422 isolate()->heap()->RootCanBeTreatedAsConstant(index) && | 417 isolate()->heap()->RootCanBeTreatedAsConstant(index) && |
(...skipping 3650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4073 sub(result, result, Operand(dividend)); | 4068 sub(result, result, Operand(dividend)); |
4074 } | 4069 } |
4075 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); | 4070 if (ms.shift() > 0) mov(result, Operand(result, ASR, ms.shift())); |
4076 add(result, result, Operand(dividend, LSR, 31)); | 4071 add(result, result, Operand(dividend, LSR, 31)); |
4077 } | 4072 } |
4078 | 4073 |
4079 | 4074 |
4080 } } // namespace v8::internal | 4075 } } // namespace v8::internal |
4081 | 4076 |
4082 #endif // V8_TARGET_ARCH_ARM | 4077 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |