| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
| 6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 7 | 7 |
| 8 #if V8_TARGET_ARCH_S390 | 8 #if V8_TARGET_ARCH_S390 |
| 9 | 9 |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 lay(sp, MemOperand(sp, -kNumRequiredStackFrameSlots * kPointerSize)); | 1096 lay(sp, MemOperand(sp, -kNumRequiredStackFrameSlots * kPointerSize)); |
| 1097 StoreP(MemOperand(sp), Operand::Zero(), r0); | 1097 StoreP(MemOperand(sp), Operand::Zero(), r0); |
| 1098 // Set the exit frame sp value to point just before the return address | 1098 // Set the exit frame sp value to point just before the return address |
| 1099 // location. | 1099 // location. |
| 1100 lay(r1, MemOperand(sp, kStackFrameSPSlot * kPointerSize)); | 1100 lay(r1, MemOperand(sp, kStackFrameSPSlot * kPointerSize)); |
| 1101 StoreP(r1, MemOperand(fp, ExitFrameConstants::kSPOffset)); | 1101 StoreP(r1, MemOperand(fp, ExitFrameConstants::kSPOffset)); |
| 1102 } | 1102 } |
| 1103 | 1103 |
| 1104 void MacroAssembler::InitializeNewString(Register string, Register length, | |
| 1105 Heap::RootListIndex map_index, | |
| 1106 Register scratch1, Register scratch2) { | |
| 1107 SmiTag(scratch1, length); | |
| 1108 LoadRoot(scratch2, map_index); | |
| 1109 StoreP(scratch1, FieldMemOperand(string, String::kLengthOffset)); | |
| 1110 StoreP(FieldMemOperand(string, String::kHashFieldSlot), | |
| 1111 Operand(String::kEmptyHashField), scratch1); | |
| 1112 StoreP(scratch2, FieldMemOperand(string, HeapObject::kMapOffset)); | |
| 1113 } | |
| 1114 | |
| 1115 int MacroAssembler::ActivationFrameAlignment() { | 1104 int MacroAssembler::ActivationFrameAlignment() { |
| 1116 #if !defined(USE_SIMULATOR) | 1105 #if !defined(USE_SIMULATOR) |
| 1117 // Running on the real platform. Use the alignment as mandated by the local | 1106 // Running on the real platform. Use the alignment as mandated by the local |
| 1118 // environment. | 1107 // environment. |
| 1119 // Note: This will break if we ever start generating snapshots on one S390 | 1108 // Note: This will break if we ever start generating snapshots on one S390 |
| 1120 // platform for another S390 platform with a different alignment. | 1109 // platform for another S390 platform with a different alignment. |
| 1121 return base::OS::ActivationFrameAlignment(); | 1110 return base::OS::ActivationFrameAlignment(); |
| 1122 #else // Simulated | 1111 #else // Simulated |
| 1123 // If we are using the simulator then we should always align to the expected | 1112 // If we are using the simulator then we should always align to the expected |
| 1124 // alignment. As the simulator is used to generate snapshots we do not know | 1113 // alignment. As the simulator is used to generate snapshots we do not know |
| (...skipping 4238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5363 } | 5352 } |
| 5364 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5353 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
| 5365 ExtractBit(r0, dividend, 31); | 5354 ExtractBit(r0, dividend, 31); |
| 5366 AddP(result, r0); | 5355 AddP(result, r0); |
| 5367 } | 5356 } |
| 5368 | 5357 |
| 5369 } // namespace internal | 5358 } // namespace internal |
| 5370 } // namespace v8 | 5359 } // namespace v8 |
| 5371 | 5360 |
| 5372 #endif // V8_TARGET_ARCH_S390 | 5361 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |