OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_S390 | 7 #if V8_TARGET_ARCH_S390 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 __ b(code_pointer()); | 1219 __ b(code_pointer()); |
1220 __ bind(&ret); | 1220 __ bind(&ret); |
1221 if (base::OS::ActivationFrameAlignment() > kPointerSize) { | 1221 if (base::OS::ActivationFrameAlignment() > kPointerSize) { |
1222 __ LoadP(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize))); | 1222 __ LoadP(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize))); |
1223 } else { | 1223 } else { |
1224 __ la(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize))); | 1224 __ la(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize))); |
1225 } | 1225 } |
1226 __ mov(code_pointer(), Operand(masm_->CodeObject())); | 1226 __ mov(code_pointer(), Operand(masm_->CodeObject())); |
1227 } | 1227 } |
1228 | 1228 |
1229 bool RegExpMacroAssemblerS390::CanReadUnaligned() { | |
1230 return CpuFeatures::IsSupported(UNALIGNED_ACCESSES) && !slow_safe(); | |
1231 } | |
1232 | 1229 |
1233 void RegExpMacroAssemblerS390::LoadCurrentCharacterUnchecked(int cp_offset, | 1230 void RegExpMacroAssemblerS390::LoadCurrentCharacterUnchecked(int cp_offset, |
1234 int characters) { | 1231 int characters) { |
1235 DCHECK(characters == 1 || CanReadUnaligned()); | |
1236 if (mode_ == LATIN1) { | 1232 if (mode_ == LATIN1) { |
1237 // using load reverse for big-endian platforms | 1233 // using load reverse for big-endian platforms |
1238 if (characters == 4) { | 1234 if (characters == 4) { |
1239 #if V8_TARGET_LITTLE_ENDIAN | 1235 #if V8_TARGET_LITTLE_ENDIAN |
1240 __ LoadlW(current_character(), | 1236 __ LoadlW(current_character(), |
1241 MemOperand(current_input_offset(), end_of_input_address(), | 1237 MemOperand(current_input_offset(), end_of_input_address(), |
1242 cp_offset * char_size())); | 1238 cp_offset * char_size())); |
1243 #else | 1239 #else |
1244 __ LoadLogicalReversedWordP(current_character(), | 1240 __ LoadLogicalReversedWordP(current_character(), |
1245 MemOperand(current_input_offset(), end_of_input_address(), | 1241 MemOperand(current_input_offset(), end_of_input_address(), |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 } | 1277 } |
1282 } | 1278 } |
1283 | 1279 |
1284 #undef __ | 1280 #undef __ |
1285 | 1281 |
1286 #endif // V8_INTERPRETED_REGEXP | 1282 #endif // V8_INTERPRETED_REGEXP |
1287 } // namespace internal | 1283 } // namespace internal |
1288 } // namespace v8 | 1284 } // namespace v8 |
1289 | 1285 |
1290 #endif // V8_TARGET_ARCH_S390 | 1286 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |