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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 DCHECK(dst0.IsValid()); | 900 DCHECK(dst0.IsValid()); |
901 | 901 |
902 int count = 1 + dst1.IsValid() + dst2.IsValid() + dst3.IsValid(); | 902 int count = 1 + dst1.IsValid() + dst2.IsValid() + dst3.IsValid(); |
903 int size = dst0.SizeInBytes(); | 903 int size = dst0.SizeInBytes(); |
904 | 904 |
905 PopHelper(count, size, dst0, dst1, dst2, dst3); | 905 PopHelper(count, size, dst0, dst1, dst2, dst3); |
906 PopPostamble(count, size); | 906 PopPostamble(count, size); |
907 } | 907 } |
908 | 908 |
909 | 909 |
| 910 void MacroAssembler::Pop(const CPURegister& dst0, const CPURegister& dst1, |
| 911 const CPURegister& dst2, const CPURegister& dst3, |
| 912 const CPURegister& dst4, const CPURegister& dst5, |
| 913 const CPURegister& dst6, const CPURegister& dst7) { |
| 914 // It is not valid to pop into the same register more than once in one |
| 915 // instruction, not even into the zero register. |
| 916 DCHECK(!AreAliased(dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7)); |
| 917 DCHECK(AreSameSizeAndType(dst0, dst1, dst2, dst3, dst4, dst5, dst6, dst7)); |
| 918 DCHECK(dst0.IsValid()); |
| 919 |
| 920 int count = 5 + dst5.IsValid() + dst6.IsValid() + dst7.IsValid(); |
| 921 int size = dst0.SizeInBytes(); |
| 922 |
| 923 PopHelper(4, size, dst0, dst1, dst2, dst3); |
| 924 PopHelper(count - 4, size, dst4, dst5, dst6, dst7); |
| 925 PopPostamble(count, size); |
| 926 } |
| 927 |
| 928 |
910 void MacroAssembler::Push(const Register& src0, const FPRegister& src1) { | 929 void MacroAssembler::Push(const Register& src0, const FPRegister& src1) { |
911 int size = src0.SizeInBytes() + src1.SizeInBytes(); | 930 int size = src0.SizeInBytes() + src1.SizeInBytes(); |
912 | 931 |
913 PushPreamble(size); | 932 PushPreamble(size); |
914 // Reserve room for src0 and push src1. | 933 // Reserve room for src0 and push src1. |
915 str(src1, MemOperand(StackPointer(), -size, PreIndex)); | 934 str(src1, MemOperand(StackPointer(), -size, PreIndex)); |
916 // Fill the gap with src0. | 935 // Fill the gap with src0. |
917 str(src0, MemOperand(StackPointer(), src1.SizeInBytes())); | 936 str(src0, MemOperand(StackPointer(), src1.SizeInBytes())); |
918 } | 937 } |
919 | 938 |
(...skipping 4217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5137 } | 5156 } |
5138 | 5157 |
5139 | 5158 |
5140 #undef __ | 5159 #undef __ |
5141 | 5160 |
5142 | 5161 |
5143 } // namespace internal | 5162 } // namespace internal |
5144 } // namespace v8 | 5163 } // namespace v8 |
5145 | 5164 |
5146 #endif // V8_TARGET_ARCH_ARM64 | 5165 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |