| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3239 __ Push(code_); | 3239 __ Push(code_); |
| 3240 __ CallRuntime(Runtime::kCharFromCode, 1); | 3240 __ CallRuntime(Runtime::kCharFromCode, 1); |
| 3241 __ Mov(result_, x0); | 3241 __ Mov(result_, x0); |
| 3242 call_helper.AfterCall(masm); | 3242 call_helper.AfterCall(masm); |
| 3243 __ B(&exit_); | 3243 __ B(&exit_); |
| 3244 | 3244 |
| 3245 __ Abort(kUnexpectedFallthroughFromCharFromCodeSlowCase); | 3245 __ Abort(kUnexpectedFallthroughFromCharFromCodeSlowCase); |
| 3246 } | 3246 } |
| 3247 | 3247 |
| 3248 | 3248 |
| 3249 void CompareICStub::GenerateBooleans(MacroAssembler* masm) { |
| 3250 // Inputs are in x0 (lhs) and x1 (rhs). |
| 3251 DCHECK_EQ(CompareICState::BOOLEAN, state()); |
| 3252 ASM_LOCATION("CompareICStub[Booleans]"); |
| 3253 Label miss; |
| 3254 |
| 3255 __ CheckMap(x1, x2, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
| 3256 __ CheckMap(x0, x3, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
| 3257 if (op() != Token::EQ_STRICT && is_strong(strength())) { |
| 3258 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
| 3259 } else { |
| 3260 if (!Token::IsEqualityOp(op())) { |
| 3261 __ Ldr(x1, FieldMemOperand(x1, Oddball::kToNumberOffset)); |
| 3262 __ AssertSmi(x1); |
| 3263 __ Ldr(x0, FieldMemOperand(x0, Oddball::kToNumberOffset)); |
| 3264 __ AssertSmi(x0); |
| 3265 } |
| 3266 __ Sub(x0, x1, x0); |
| 3267 __ Ret(); |
| 3268 } |
| 3269 |
| 3270 __ Bind(&miss); |
| 3271 GenerateMiss(masm); |
| 3272 } |
| 3273 |
| 3274 |
| 3249 void CompareICStub::GenerateSmis(MacroAssembler* masm) { | 3275 void CompareICStub::GenerateSmis(MacroAssembler* masm) { |
| 3250 // Inputs are in x0 (lhs) and x1 (rhs). | 3276 // Inputs are in x0 (lhs) and x1 (rhs). |
| 3251 DCHECK(state() == CompareICState::SMI); | 3277 DCHECK(state() == CompareICState::SMI); |
| 3252 ASM_LOCATION("CompareICStub[Smis]"); | 3278 ASM_LOCATION("CompareICStub[Smis]"); |
| 3253 Label miss; | 3279 Label miss; |
| 3254 // Bail out (to 'miss') unless both x0 and x1 are smis. | 3280 // Bail out (to 'miss') unless both x0 and x1 are smis. |
| 3255 __ JumpIfEitherNotSmi(x0, x1, &miss); | 3281 __ JumpIfEitherNotSmi(x0, x1, &miss); |
| 3256 | 3282 |
| 3257 if (GetCondition() == eq) { | 3283 if (GetCondition() == eq) { |
| 3258 // For equality we do not care about the sign of the result. | 3284 // For equality we do not care about the sign of the result. |
| (...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5963 MemOperand(fp, 6 * kPointerSize), NULL); | 5989 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5964 } | 5990 } |
| 5965 | 5991 |
| 5966 | 5992 |
| 5967 #undef __ | 5993 #undef __ |
| 5968 | 5994 |
| 5969 } // namespace internal | 5995 } // namespace internal |
| 5970 } // namespace v8 | 5996 } // namespace v8 |
| 5971 | 5997 |
| 5972 #endif // V8_TARGET_ARCH_ARM64 | 5998 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |