| 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 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); | 1530 DCHECK(base::bits::IsPowerOfTwo32(frame_alignment)); |
| 1531 and_(sp, sp, Operand(-frame_alignment)); | 1531 and_(sp, sp, Operand(-frame_alignment)); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 // Set the exit frame sp value to point just before the return address | 1534 // Set the exit frame sp value to point just before the return address |
| 1535 // location. | 1535 // location. |
| 1536 add(ip, sp, Operand(kPointerSize)); | 1536 add(ip, sp, Operand(kPointerSize)); |
| 1537 str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset)); | 1537 str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset)); |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 | |
| 1541 void MacroAssembler::InitializeNewString(Register string, | |
| 1542 Register length, | |
| 1543 Heap::RootListIndex map_index, | |
| 1544 Register scratch1, | |
| 1545 Register scratch2) { | |
| 1546 SmiTag(scratch1, length); | |
| 1547 LoadRoot(scratch2, map_index); | |
| 1548 str(scratch1, FieldMemOperand(string, String::kLengthOffset)); | |
| 1549 mov(scratch1, Operand(String::kEmptyHashField)); | |
| 1550 str(scratch2, FieldMemOperand(string, HeapObject::kMapOffset)); | |
| 1551 str(scratch1, FieldMemOperand(string, String::kHashFieldOffset)); | |
| 1552 } | |
| 1553 | |
| 1554 | |
| 1555 int MacroAssembler::ActivationFrameAlignment() { | 1540 int MacroAssembler::ActivationFrameAlignment() { |
| 1556 #if V8_HOST_ARCH_ARM | 1541 #if V8_HOST_ARCH_ARM |
| 1557 // Running on the real platform. Use the alignment as mandated by the local | 1542 // Running on the real platform. Use the alignment as mandated by the local |
| 1558 // environment. | 1543 // environment. |
| 1559 // Note: This will break if we ever start generating snapshots on one ARM | 1544 // Note: This will break if we ever start generating snapshots on one ARM |
| 1560 // platform for another ARM platform with a different alignment. | 1545 // platform for another ARM platform with a different alignment. |
| 1561 return base::OS::ActivationFrameAlignment(); | 1546 return base::OS::ActivationFrameAlignment(); |
| 1562 #else // V8_HOST_ARCH_ARM | 1547 #else // V8_HOST_ARCH_ARM |
| 1563 // If we are using the simulator then we should always align to the expected | 1548 // If we are using the simulator then we should always align to the expected |
| 1564 // alignment. As the simulator is used to generate snapshots we do not know | 1549 // alignment. As the simulator is used to generate snapshots we do not know |
| (...skipping 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3877 } | 3862 } |
| 3878 } | 3863 } |
| 3879 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3864 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 3880 add(result, result, Operand(dividend, LSR, 31)); | 3865 add(result, result, Operand(dividend, LSR, 31)); |
| 3881 } | 3866 } |
| 3882 | 3867 |
| 3883 } // namespace internal | 3868 } // namespace internal |
| 3884 } // namespace v8 | 3869 } // namespace v8 |
| 3885 | 3870 |
| 3886 #endif // V8_TARGET_ARCH_ARM | 3871 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |