OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef V8_X64_CODE_STUBS_X64_H_ | 5 #ifndef V8_X64_CODE_STUBS_X64_H_ |
6 #define V8_X64_CODE_STUBS_X64_H_ | 6 #define V8_X64_CODE_STUBS_X64_H_ |
7 | 7 |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 | 13 |
14 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code); | 14 void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code); |
15 | 15 |
16 | 16 |
17 class StringHelper : public AllStatic { | 17 class StringHelper : public AllStatic { |
18 public: | 18 public: |
19 // Generate code for copying characters using the rep movs instruction. | 19 // Generate code for copying characters using the rep movs instruction. |
20 // Copies rcx characters from rsi to rdi. Copying of overlapping regions is | 20 // Copies rcx characters from rsi to rdi. Copying of overlapping regions is |
21 // not supported. | 21 // not supported. |
22 static void GenerateCopyCharacters(MacroAssembler* masm, | 22 static void GenerateCopyCharacters(MacroAssembler* masm, |
23 Register dest, | 23 Register dest, |
24 Register src, | 24 Register src, |
25 Register count, | 25 Register count, |
26 String::Encoding encoding); | 26 String::Encoding encoding); |
27 | 27 |
28 | |
29 // Generate string hash. | |
30 static void GenerateHashInit(MacroAssembler* masm, | |
31 Register hash, | |
32 Register character, | |
33 Register scratch); | |
34 | |
35 static void GenerateHashAddCharacter(MacroAssembler* masm, | |
36 Register hash, | |
37 Register character, | |
38 Register scratch); | |
39 | |
40 static void GenerateHashGetHash(MacroAssembler* masm, | |
41 Register hash, | |
42 Register scratch); | |
43 | |
44 // Compares two flat ASCII strings and returns result in rax. | 28 // Compares two flat ASCII strings and returns result in rax. |
45 static void GenerateCompareFlatAsciiStrings( | 29 static void GenerateCompareFlatAsciiStrings( |
46 MacroAssembler* masm, Register left, Register right, Register scratch1, | 30 MacroAssembler* masm, Register left, Register right, Register scratch1, |
47 Register scratch2, Register scratch3, Register scratch4); | 31 Register scratch2, Register scratch3, Register scratch4); |
48 | 32 |
49 // Compares two flat ASCII strings for equality and returns result in rax. | 33 // Compares two flat ASCII strings for equality and returns result in rax. |
50 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, | 34 static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
51 Register left, | 35 Register left, |
52 Register right, | 36 Register right, |
53 Register scratch1, | 37 Register scratch1, |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 Label slow_; | 361 Label slow_; |
378 RegisterAllocation regs_; | 362 RegisterAllocation regs_; |
379 | 363 |
380 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); | 364 DISALLOW_COPY_AND_ASSIGN(RecordWriteStub); |
381 }; | 365 }; |
382 | 366 |
383 | 367 |
384 } } // namespace v8::internal | 368 } } // namespace v8::internal |
385 | 369 |
386 #endif // V8_X64_CODE_STUBS_X64_H_ | 370 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |