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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 5859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5870 } | 5870 } |
5871 } | 5871 } |
5872 | 5872 |
5873 if (do_return) { | 5873 if (do_return) { |
5874 Ret(USE_DELAY_SLOT); | 5874 Ret(USE_DELAY_SLOT); |
5875 // If returning, the instruction in the delay slot will be the addiu below. | 5875 // If returning, the instruction in the delay slot will be the addiu below. |
5876 } | 5876 } |
5877 daddiu(sp, sp, 2 * kPointerSize); | 5877 daddiu(sp, sp, 2 * kPointerSize); |
5878 } | 5878 } |
5879 | 5879 |
5880 | |
5881 void MacroAssembler::InitializeNewString(Register string, | |
5882 Register length, | |
5883 Heap::RootListIndex map_index, | |
5884 Register scratch1, | |
5885 Register scratch2) { | |
5886 // dsll(scratch1, length, kSmiTagSize); | |
5887 dsll32(scratch1, length, 0); | |
5888 LoadRoot(scratch2, map_index); | |
5889 sd(scratch1, FieldMemOperand(string, String::kLengthOffset)); | |
5890 li(scratch1, Operand(String::kEmptyHashField)); | |
5891 sd(scratch2, FieldMemOperand(string, HeapObject::kMapOffset)); | |
5892 sw(scratch1, FieldMemOperand(string, String::kHashFieldOffset)); | |
5893 } | |
5894 | |
5895 | |
5896 int MacroAssembler::ActivationFrameAlignment() { | 5880 int MacroAssembler::ActivationFrameAlignment() { |
5897 #if V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64 | 5881 #if V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64 |
5898 // Running on the real platform. Use the alignment as mandated by the local | 5882 // Running on the real platform. Use the alignment as mandated by the local |
5899 // environment. | 5883 // environment. |
5900 // Note: This will break if we ever start generating snapshots on one Mips | 5884 // Note: This will break if we ever start generating snapshots on one Mips |
5901 // platform for another Mips platform with a different alignment. | 5885 // platform for another Mips platform with a different alignment. |
5902 return base::OS::ActivationFrameAlignment(); | 5886 return base::OS::ActivationFrameAlignment(); |
5903 #else // V8_HOST_ARCH_MIPS | 5887 #else // V8_HOST_ARCH_MIPS |
5904 // If we are using the simulator then we should always align to the expected | 5888 // If we are using the simulator then we should always align to the expected |
5905 // alignment. As the simulator is used to generate snapshots we do not know | 5889 // alignment. As the simulator is used to generate snapshots we do not know |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6941 if (mag.shift > 0) sra(result, result, mag.shift); | 6925 if (mag.shift > 0) sra(result, result, mag.shift); |
6942 srl(at, dividend, 31); | 6926 srl(at, dividend, 31); |
6943 Addu(result, result, Operand(at)); | 6927 Addu(result, result, Operand(at)); |
6944 } | 6928 } |
6945 | 6929 |
6946 | 6930 |
6947 } // namespace internal | 6931 } // namespace internal |
6948 } // namespace v8 | 6932 } // namespace v8 |
6949 | 6933 |
6950 #endif // V8_TARGET_ARCH_MIPS64 | 6934 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |