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_X87_MACRO_ASSEMBLER_X87_H_ | 5 #ifndef V8_X87_MACRO_ASSEMBLER_X87_H_ |
6 #define V8_X87_MACRO_ASSEMBLER_X87_H_ | 6 #define V8_X87_MACRO_ASSEMBLER_X87_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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 MutableMode mode = IMMUTABLE); | 630 MutableMode mode = IMMUTABLE); |
631 | 631 |
632 // Allocate a sequential string. All the header fields of the string object | 632 // Allocate a sequential string. All the header fields of the string object |
633 // are initialized. | 633 // are initialized. |
634 void AllocateTwoByteString(Register result, | 634 void AllocateTwoByteString(Register result, |
635 Register length, | 635 Register length, |
636 Register scratch1, | 636 Register scratch1, |
637 Register scratch2, | 637 Register scratch2, |
638 Register scratch3, | 638 Register scratch3, |
639 Label* gc_required); | 639 Label* gc_required); |
640 void AllocateAsciiString(Register result, | 640 void AllocateOneByteString(Register result, Register length, |
641 Register length, | 641 Register scratch1, Register scratch2, |
642 Register scratch1, | 642 Register scratch3, Label* gc_required); |
643 Register scratch2, | 643 void AllocateOneByteString(Register result, int length, Register scratch1, |
644 Register scratch3, | 644 Register scratch2, Label* gc_required); |
645 Label* gc_required); | |
646 void AllocateAsciiString(Register result, | |
647 int length, | |
648 Register scratch1, | |
649 Register scratch2, | |
650 Label* gc_required); | |
651 | 645 |
652 // Allocate a raw cons string object. Only the map field of the result is | 646 // Allocate a raw cons string object. Only the map field of the result is |
653 // initialized. | 647 // initialized. |
654 void AllocateTwoByteConsString(Register result, | 648 void AllocateTwoByteConsString(Register result, |
655 Register scratch1, | 649 Register scratch1, |
656 Register scratch2, | 650 Register scratch2, |
657 Label* gc_required); | 651 Label* gc_required); |
658 void AllocateAsciiConsString(Register result, | 652 void AllocateOneByteConsString(Register result, Register scratch1, |
659 Register scratch1, | 653 Register scratch2, Label* gc_required); |
660 Register scratch2, | |
661 Label* gc_required); | |
662 | 654 |
663 // Allocate a raw sliced string object. Only the map field of the result is | 655 // Allocate a raw sliced string object. Only the map field of the result is |
664 // initialized. | 656 // initialized. |
665 void AllocateTwoByteSlicedString(Register result, | 657 void AllocateTwoByteSlicedString(Register result, |
666 Register scratch1, | 658 Register scratch1, |
667 Register scratch2, | 659 Register scratch2, |
668 Label* gc_required); | 660 Label* gc_required); |
669 void AllocateAsciiSlicedString(Register result, | 661 void AllocateOneByteSlicedString(Register result, Register scratch1, |
670 Register scratch1, | 662 Register scratch2, Label* gc_required); |
671 Register scratch2, | |
672 Label* gc_required); | |
673 | 663 |
674 // Copy memory, byte-by-byte, from source to destination. Not optimized for | 664 // Copy memory, byte-by-byte, from source to destination. Not optimized for |
675 // long or aligned copies. | 665 // long or aligned copies. |
676 // The contents of index and scratch are destroyed. | 666 // The contents of index and scratch are destroyed. |
677 void CopyBytes(Register source, | 667 void CopyBytes(Register source, |
678 Register destination, | 668 Register destination, |
679 Register length, | 669 Register length, |
680 Register scratch); | 670 Register scratch); |
681 | 671 |
682 // Initialize fields with filler values. Fields starting at |start_offset| | 672 // Initialize fields with filler values. Fields starting at |start_offset| |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 // the register object is found in the cache the generated code falls through | 871 // the register object is found in the cache the generated code falls through |
882 // with the result in the result register. The object and the result register | 872 // with the result in the result register. The object and the result register |
883 // can be the same. If the number is not found in the cache the code jumps to | 873 // can be the same. If the number is not found in the cache the code jumps to |
884 // the label not_found with only the content of register object unchanged. | 874 // the label not_found with only the content of register object unchanged. |
885 void LookupNumberStringCache(Register object, | 875 void LookupNumberStringCache(Register object, |
886 Register result, | 876 Register result, |
887 Register scratch1, | 877 Register scratch1, |
888 Register scratch2, | 878 Register scratch2, |
889 Label* not_found); | 879 Label* not_found); |
890 | 880 |
891 // Check whether the instance type represents a flat ASCII string. Jump to the | 881 // Check whether the instance type represents a flat one-byte string. Jump to |
892 // label if not. If the instance type can be scratched specify same register | 882 // the label if not. If the instance type can be scratched specify same |
893 // for both instance type and scratch. | 883 // register for both instance type and scratch. |
894 void JumpIfInstanceTypeIsNotSequentialAscii(Register instance_type, | 884 void JumpIfInstanceTypeIsNotSequentialOneByte( |
895 Register scratch, | 885 Register instance_type, Register scratch, |
896 Label* on_not_flat_ascii_string); | 886 Label* on_not_flat_one_byte_string); |
897 | 887 |
898 // Checks if both objects are sequential ASCII strings, and jumps to label | 888 // Checks if both objects are sequential one-byte strings, and jumps to label |
899 // if either is not. | 889 // if either is not. |
900 void JumpIfNotBothSequentialAsciiStrings(Register object1, | 890 void JumpIfNotBothSequentialOneByteStrings( |
901 Register object2, | 891 Register object1, Register object2, Register scratch1, Register scratch2, |
902 Register scratch1, | 892 Label* on_not_flat_one_byte_strings); |
903 Register scratch2, | |
904 Label* on_not_flat_ascii_strings); | |
905 | 893 |
906 // Checks if the given register or operand is a unique name | 894 // Checks if the given register or operand is a unique name |
907 void JumpIfNotUniqueName(Register reg, Label* not_unique_name, | 895 void JumpIfNotUniqueName(Register reg, Label* not_unique_name, |
908 Label::Distance distance = Label::kFar) { | 896 Label::Distance distance = Label::kFar) { |
909 JumpIfNotUniqueName(Operand(reg), not_unique_name, distance); | 897 JumpIfNotUniqueName(Operand(reg), not_unique_name, distance); |
910 } | 898 } |
911 | 899 |
912 void JumpIfNotUniqueName(Operand operand, Label* not_unique_name, | 900 void JumpIfNotUniqueName(Operand operand, Label* not_unique_name, |
913 Label::Distance distance = Label::kFar); | 901 Label::Distance distance = Label::kFar); |
914 | 902 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 } \ | 1079 } \ |
1092 masm-> | 1080 masm-> |
1093 #else | 1081 #else |
1094 #define ACCESS_MASM(masm) masm-> | 1082 #define ACCESS_MASM(masm) masm-> |
1095 #endif | 1083 #endif |
1096 | 1084 |
1097 | 1085 |
1098 } } // namespace v8::internal | 1086 } } // namespace v8::internal |
1099 | 1087 |
1100 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ | 1088 #endif // V8_X87_MACRO_ASSEMBLER_X87_H_ |
OLD | NEW |