| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 ASSERT(dst0.IsValid()); | 805 ASSERT(dst0.IsValid()); |
| 806 | 806 |
| 807 int count = 1 + dst1.IsValid() + dst2.IsValid() + dst3.IsValid(); | 807 int count = 1 + dst1.IsValid() + dst2.IsValid() + dst3.IsValid(); |
| 808 int size = dst0.SizeInBytes(); | 808 int size = dst0.SizeInBytes(); |
| 809 | 809 |
| 810 PopHelper(count, size, dst0, dst1, dst2, dst3); | 810 PopHelper(count, size, dst0, dst1, dst2, dst3); |
| 811 PopPostamble(count, size); | 811 PopPostamble(count, size); |
| 812 } | 812 } |
| 813 | 813 |
| 814 | 814 |
| 815 void MacroAssembler::Push(const Register& src0, const FPRegister& src1) { |
| 816 int size = src0.SizeInBytes() + src1.SizeInBytes(); |
| 817 |
| 818 PushPreamble(size); |
| 819 // Reserve room for src0 and push src1. |
| 820 str(src1, MemOperand(StackPointer(), -size, PreIndex)); |
| 821 // Fill the gap with src0. |
| 822 str(src0, MemOperand(StackPointer(), src1.SizeInBytes())); |
| 823 } |
| 824 |
| 825 |
| 815 void MacroAssembler::PushPopQueue::PushQueued( | 826 void MacroAssembler::PushPopQueue::PushQueued( |
| 816 PreambleDirective preamble_directive) { | 827 PreambleDirective preamble_directive) { |
| 817 if (queued_.empty()) return; | 828 if (queued_.empty()) return; |
| 818 | 829 |
| 819 if (preamble_directive == WITH_PREAMBLE) { | 830 if (preamble_directive == WITH_PREAMBLE) { |
| 820 masm_->PushPreamble(size_); | 831 masm_->PushPreamble(size_); |
| 821 } | 832 } |
| 822 | 833 |
| 823 int count = queued_.size(); | 834 int count = queued_.size(); |
| 824 int index = 0; | 835 int index = 0; |
| (...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2908 void MacroAssembler::TruncateDoubleToI(Register result, | 2919 void MacroAssembler::TruncateDoubleToI(Register result, |
| 2909 DoubleRegister double_input) { | 2920 DoubleRegister double_input) { |
| 2910 Label done; | 2921 Label done; |
| 2911 ASSERT(jssp.Is(StackPointer())); | 2922 ASSERT(jssp.Is(StackPointer())); |
| 2912 | 2923 |
| 2913 // Try to convert the double to an int64. If successful, the bottom 32 bits | 2924 // Try to convert the double to an int64. If successful, the bottom 32 bits |
| 2914 // contain our truncated int32 result. | 2925 // contain our truncated int32 result. |
| 2915 TryConvertDoubleToInt64(result, double_input, &done); | 2926 TryConvertDoubleToInt64(result, double_input, &done); |
| 2916 | 2927 |
| 2917 // If we fell through then inline version didn't succeed - call stub instead. | 2928 // If we fell through then inline version didn't succeed - call stub instead. |
| 2918 Push(lr); | 2929 Push(lr, double_input); |
| 2919 Push(double_input); // Put input on stack. | |
| 2920 | 2930 |
| 2921 DoubleToIStub stub(isolate(), | 2931 DoubleToIStub stub(isolate(), |
| 2922 jssp, | 2932 jssp, |
| 2923 result, | 2933 result, |
| 2924 0, | 2934 0, |
| 2925 true, // is_truncating | 2935 true, // is_truncating |
| 2926 true); // skip_fastpath | 2936 true); // skip_fastpath |
| 2927 CallStub(&stub); // DoubleToIStub preserves any registers it needs to clobber | 2937 CallStub(&stub); // DoubleToIStub preserves any registers it needs to clobber |
| 2928 | 2938 |
| 2929 Drop(1, kDoubleSize); // Drop the double input on the stack. | 2939 Drop(1, kDoubleSize); // Drop the double input on the stack. |
| (...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5294 } | 5304 } |
| 5295 } | 5305 } |
| 5296 | 5306 |
| 5297 | 5307 |
| 5298 #undef __ | 5308 #undef __ |
| 5299 | 5309 |
| 5300 | 5310 |
| 5301 } } // namespace v8::internal | 5311 } } // namespace v8::internal |
| 5302 | 5312 |
| 5303 #endif // V8_TARGET_ARCH_ARM64 | 5313 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |