OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 11 matching lines...) Expand all Loading... |
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ | 28 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
29 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 29 #define V8_X64_MACRO_ASSEMBLER_X64_H_ |
30 | 30 |
31 #include "assembler.h" | 31 #include "assembler.h" |
| 32 #include "v8globals.h" |
32 | 33 |
33 namespace v8 { | 34 namespace v8 { |
34 namespace internal { | 35 namespace internal { |
35 | 36 |
36 // Flags used for the AllocateInNewSpace functions. | 37 // Flags used for the AllocateInNewSpace functions. |
37 enum AllocationFlags { | 38 enum AllocationFlags { |
38 // No special flags. | 39 // No special flags. |
39 NO_ALLOCATION_FLAGS = 0, | 40 NO_ALLOCATION_FLAGS = 0, |
40 // Return the pointer to the allocated already tagged as a heap object. | 41 // Return the pointer to the allocated already tagged as a heap object. |
41 TAG_OBJECT = 1 << 0, | 42 TAG_OBJECT = 1 << 0, |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 // Compare instance type for map. | 743 // Compare instance type for map. |
743 // Always use unsigned comparisons: above and below, not less and greater. | 744 // Always use unsigned comparisons: above and below, not less and greater. |
744 void CmpInstanceType(Register map, InstanceType type); | 745 void CmpInstanceType(Register map, InstanceType type); |
745 | 746 |
746 // Check if the map of an object is equal to a specified map and | 747 // Check if the map of an object is equal to a specified map and |
747 // branch to label if not. Skip the smi check if not required | 748 // branch to label if not. Skip the smi check if not required |
748 // (object is known to be a heap object) | 749 // (object is known to be a heap object) |
749 void CheckMap(Register obj, | 750 void CheckMap(Register obj, |
750 Handle<Map> map, | 751 Handle<Map> map, |
751 Label* fail, | 752 Label* fail, |
752 bool is_heap_object); | 753 SmiCheckType smi_check_type); |
753 | 754 |
754 // Check if the object in register heap_object is a string. Afterwards the | 755 // Check if the object in register heap_object is a string. Afterwards the |
755 // register map contains the object map and the register instance_type | 756 // register map contains the object map and the register instance_type |
756 // contains the instance_type. The registers map and instance_type can be the | 757 // contains the instance_type. The registers map and instance_type can be the |
757 // same in which case it contains the instance type afterwards. Either of the | 758 // same in which case it contains the instance type afterwards. Either of the |
758 // registers map and instance_type can be the same as heap_object. | 759 // registers map and instance_type can be the same as heap_object. |
759 Condition IsObjectStringType(Register heap_object, | 760 Condition IsObjectStringType(Register heap_object, |
760 Register map, | 761 Register map, |
761 Register instance_type); | 762 Register instance_type); |
762 | 763 |
763 // FCmp compares and pops the two values on top of the FPU stack. | 764 // FCmp compares and pops the two values on top of the FPU stack. |
764 // The flag results are similar to integer cmp, but requires unsigned | 765 // The flag results are similar to integer cmp, but requires unsigned |
765 // jcc instructions (je, ja, jae, jb, jbe, je, and jz). | 766 // jcc instructions (je, ja, jae, jb, jbe, je, and jz). |
766 void FCmp(); | 767 void FCmp(); |
767 | 768 |
| 769 void ClampUint8(Register reg); |
| 770 |
| 771 void ClampDoubleToUint8(XMMRegister input_reg, |
| 772 XMMRegister temp_xmm_reg, |
| 773 Register result_reg, |
| 774 Register temp_reg); |
| 775 |
768 // Abort execution if argument is not a number. Used in debug code. | 776 // Abort execution if argument is not a number. Used in debug code. |
769 void AbortIfNotNumber(Register object); | 777 void AbortIfNotNumber(Register object); |
770 | 778 |
771 // Abort execution if argument is a smi. Used in debug code. | 779 // Abort execution if argument is a smi. Used in debug code. |
772 void AbortIfSmi(Register object); | 780 void AbortIfSmi(Register object); |
773 | 781 |
774 // Abort execution if argument is not a smi. Used in debug code. | 782 // Abort execution if argument is not a smi. Used in debug code. |
775 void AbortIfNotSmi(Register object); | 783 void AbortIfNotSmi(Register object); |
776 void AbortIfNotSmi(const Operand& object); | 784 void AbortIfNotSmi(const Operand& object); |
777 | 785 |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 masm->popfd(); \ | 1261 masm->popfd(); \ |
1254 } \ | 1262 } \ |
1255 masm-> | 1263 masm-> |
1256 #else | 1264 #else |
1257 #define ACCESS_MASM(masm) masm-> | 1265 #define ACCESS_MASM(masm) masm-> |
1258 #endif | 1266 #endif |
1259 | 1267 |
1260 } } // namespace v8::internal | 1268 } } // namespace v8::internal |
1261 | 1269 |
1262 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1270 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |