OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_IA32_MACRO_ASSEMBLER_IA32_H_ | 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/frames.h" | 9 #include "src/frames.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 MutableMode mode = IMMUTABLE); | 651 MutableMode mode = IMMUTABLE); |
652 | 652 |
653 // Allocate a sequential string. All the header fields of the string object | 653 // Allocate a sequential string. All the header fields of the string object |
654 // are initialized. | 654 // are initialized. |
655 void AllocateTwoByteString(Register result, | 655 void AllocateTwoByteString(Register result, |
656 Register length, | 656 Register length, |
657 Register scratch1, | 657 Register scratch1, |
658 Register scratch2, | 658 Register scratch2, |
659 Register scratch3, | 659 Register scratch3, |
660 Label* gc_required); | 660 Label* gc_required); |
661 void AllocateAsciiString(Register result, | 661 void AllocateOneByteString(Register result, Register length, |
662 Register length, | 662 Register scratch1, Register scratch2, |
663 Register scratch1, | 663 Register scratch3, Label* gc_required); |
664 Register scratch2, | 664 void AllocateOneByteString(Register result, int length, Register scratch1, |
665 Register scratch3, | 665 Register scratch2, Label* gc_required); |
666 Label* gc_required); | |
667 void AllocateAsciiString(Register result, | |
668 int length, | |
669 Register scratch1, | |
670 Register scratch2, | |
671 Label* gc_required); | |
672 | 666 |
673 // Allocate a raw cons string object. Only the map field of the result is | 667 // Allocate a raw cons string object. Only the map field of the result is |
674 // initialized. | 668 // initialized. |
675 void AllocateTwoByteConsString(Register result, | 669 void AllocateTwoByteConsString(Register result, |
676 Register scratch1, | 670 Register scratch1, |
677 Register scratch2, | 671 Register scratch2, |
678 Label* gc_required); | 672 Label* gc_required); |
679 void AllocateAsciiConsString(Register result, | 673 void AllocateOneByteConsString(Register result, Register scratch1, |
680 Register scratch1, | 674 Register scratch2, Label* gc_required); |
681 Register scratch2, | |
682 Label* gc_required); | |
683 | 675 |
684 // Allocate a raw sliced string object. Only the map field of the result is | 676 // Allocate a raw sliced string object. Only the map field of the result is |
685 // initialized. | 677 // initialized. |
686 void AllocateTwoByteSlicedString(Register result, | 678 void AllocateTwoByteSlicedString(Register result, |
687 Register scratch1, | 679 Register scratch1, |
688 Register scratch2, | 680 Register scratch2, |
689 Label* gc_required); | 681 Label* gc_required); |
690 void AllocateAsciiSlicedString(Register result, | 682 void AllocateOneByteSlicedString(Register result, Register scratch1, |
691 Register scratch1, | 683 Register scratch2, Label* gc_required); |
692 Register scratch2, | |
693 Label* gc_required); | |
694 | 684 |
695 // Copy memory, byte-by-byte, from source to destination. Not optimized for | 685 // Copy memory, byte-by-byte, from source to destination. Not optimized for |
696 // long or aligned copies. | 686 // long or aligned copies. |
697 // The contents of index and scratch are destroyed. | 687 // The contents of index and scratch are destroyed. |
698 void CopyBytes(Register source, | 688 void CopyBytes(Register source, |
699 Register destination, | 689 Register destination, |
700 Register length, | 690 Register length, |
701 Register scratch); | 691 Register scratch); |
702 | 692 |
703 // Initialize fields with filler values. Fields starting at |start_offset| | 693 // Initialize fields with filler values. Fields starting at |start_offset| |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 // the register object is found in the cache the generated code falls through | 897 // the register object is found in the cache the generated code falls through |
908 // with the result in the result register. The object and the result register | 898 // with the result in the result register. The object and the result register |
909 // can be the same. If the number is not found in the cache the code jumps to | 899 // can be the same. If the number is not found in the cache the code jumps to |
910 // the label not_found with only the content of register object unchanged. | 900 // the label not_found with only the content of register object unchanged. |
911 void LookupNumberStringCache(Register object, | 901 void LookupNumberStringCache(Register object, |
912 Register result, | 902 Register result, |
913 Register scratch1, | 903 Register scratch1, |
914 Register scratch2, | 904 Register scratch2, |
915 Label* not_found); | 905 Label* not_found); |
916 | 906 |
917 // Check whether the instance type represents a flat ASCII string. Jump to the | 907 // Check whether the instance type represents a flat one-byte string. Jump to |
918 // label if not. If the instance type can be scratched specify same register | 908 // the label if not. If the instance type can be scratched specify same |
919 // for both instance type and scratch. | 909 // register for both instance type and scratch. |
920 void JumpIfInstanceTypeIsNotSequentialAscii(Register instance_type, | 910 void JumpIfInstanceTypeIsNotSequentialOneByte( |
921 Register scratch, | 911 Register instance_type, Register scratch, |
922 Label* on_not_flat_ascii_string); | 912 Label* on_not_flat_one_byte_string); |
923 | 913 |
924 // Checks if both objects are sequential ASCII strings, and jumps to label | 914 // Checks if both objects are sequential one-byte strings, and jumps to label |
925 // if either is not. | 915 // if either is not. |
926 void JumpIfNotBothSequentialAsciiStrings(Register object1, | 916 void JumpIfNotBothSequentialOneByteStrings( |
927 Register object2, | 917 Register object1, Register object2, Register scratch1, Register scratch2, |
928 Register scratch1, | 918 Label* on_not_flat_one_byte_strings); |
929 Register scratch2, | |
930 Label* on_not_flat_ascii_strings); | |
931 | 919 |
932 // Checks if the given register or operand is a unique name | 920 // Checks if the given register or operand is a unique name |
933 void JumpIfNotUniqueName(Register reg, Label* not_unique_name, | 921 void JumpIfNotUniqueName(Register reg, Label* not_unique_name, |
934 Label::Distance distance = Label::kFar) { | 922 Label::Distance distance = Label::kFar) { |
935 JumpIfNotUniqueName(Operand(reg), not_unique_name, distance); | 923 JumpIfNotUniqueName(Operand(reg), not_unique_name, distance); |
936 } | 924 } |
937 | 925 |
938 void JumpIfNotUniqueName(Operand operand, Label* not_unique_name, | 926 void JumpIfNotUniqueName(Operand operand, Label* not_unique_name, |
939 Label::Distance distance = Label::kFar); | 927 Label::Distance distance = Label::kFar); |
940 | 928 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1117 } \ | 1105 } \ |
1118 masm-> | 1106 masm-> |
1119 #else | 1107 #else |
1120 #define ACCESS_MASM(masm) masm-> | 1108 #define ACCESS_MASM(masm) masm-> |
1121 #endif | 1109 #endif |
1122 | 1110 |
1123 | 1111 |
1124 } } // namespace v8::internal | 1112 } } // namespace v8::internal |
1125 | 1113 |
1126 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1114 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |