| 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_X64_MACRO_ASSEMBLER_X64_H_ | 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ |
| 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ | 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/base/flags.h" | 10 #include "src/base/flags.h" |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 // Compare object type for heap object. | 1105 // Compare object type for heap object. |
| 1106 // Always use unsigned comparisons: above and below, not less and greater. | 1106 // Always use unsigned comparisons: above and below, not less and greater. |
| 1107 // Incoming register is heap_object and outgoing register is map. | 1107 // Incoming register is heap_object and outgoing register is map. |
| 1108 // They may be the same register, and may be kScratchRegister. | 1108 // They may be the same register, and may be kScratchRegister. |
| 1109 void CmpObjectType(Register heap_object, InstanceType type, Register map); | 1109 void CmpObjectType(Register heap_object, InstanceType type, Register map); |
| 1110 | 1110 |
| 1111 // Compare instance type for map. | 1111 // Compare instance type for map. |
| 1112 // Always use unsigned comparisons: above and below, not less and greater. | 1112 // Always use unsigned comparisons: above and below, not less and greater. |
| 1113 void CmpInstanceType(Register map, InstanceType type); | 1113 void CmpInstanceType(Register map, InstanceType type); |
| 1114 | 1114 |
| 1115 // Check if a map for a JSObject indicates that the object has fast elements. | |
| 1116 // Jump to the specified label if it does not. | |
| 1117 void CheckFastElements(Register map, | |
| 1118 Label* fail, | |
| 1119 Label::Distance distance = Label::kFar); | |
| 1120 | |
| 1121 // Check if a map for a JSObject indicates that the object can have both smi | 1115 // Check if a map for a JSObject indicates that the object can have both smi |
| 1122 // and HeapObject elements. Jump to the specified label if it does not. | 1116 // and HeapObject elements. Jump to the specified label if it does not. |
| 1123 void CheckFastObjectElements(Register map, | 1117 void CheckFastObjectElements(Register map, |
| 1124 Label* fail, | 1118 Label* fail, |
| 1125 Label::Distance distance = Label::kFar); | 1119 Label::Distance distance = Label::kFar); |
| 1126 | 1120 |
| 1127 // Check if a map for a JSObject indicates that the object has fast smi only | 1121 // Check if a map for a JSObject indicates that the object has fast smi only |
| 1128 // elements. Jump to the specified label if it does not. | 1122 // elements. Jump to the specified label if it does not. |
| 1129 void CheckFastSmiElements(Register map, | 1123 void CheckFastSmiElements(Register map, |
| 1130 Label* fail, | 1124 Label* fail, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 // Generate code for checking access rights - used for security checks | 1292 // Generate code for checking access rights - used for security checks |
| 1299 // on access to global objects across environments. The holder register | 1293 // on access to global objects across environments. The holder register |
| 1300 // is left untouched, but the scratch register and kScratchRegister, | 1294 // is left untouched, but the scratch register and kScratchRegister, |
| 1301 // which must be different, are clobbered. | 1295 // which must be different, are clobbered. |
| 1302 void CheckAccessGlobalProxy(Register holder_reg, | 1296 void CheckAccessGlobalProxy(Register holder_reg, |
| 1303 Register scratch, | 1297 Register scratch, |
| 1304 Label* miss); | 1298 Label* miss); |
| 1305 | 1299 |
| 1306 void GetNumberHash(Register r0, Register scratch); | 1300 void GetNumberHash(Register r0, Register scratch); |
| 1307 | 1301 |
| 1308 void LoadFromNumberDictionary(Label* miss, | |
| 1309 Register elements, | |
| 1310 Register key, | |
| 1311 Register r0, | |
| 1312 Register r1, | |
| 1313 Register r2, | |
| 1314 Register result); | |
| 1315 | |
| 1316 | |
| 1317 // --------------------------------------------------------------------------- | 1302 // --------------------------------------------------------------------------- |
| 1318 // Allocation support | 1303 // Allocation support |
| 1319 | 1304 |
| 1320 // Allocate an object in new space or old space. If the given space | 1305 // Allocate an object in new space or old space. If the given space |
| 1321 // is exhausted control continues at the gc_required label. The allocated | 1306 // is exhausted control continues at the gc_required label. The allocated |
| 1322 // object is returned in result and end of the new object is returned in | 1307 // object is returned in result and end of the new object is returned in |
| 1323 // result_end. The register scratch can be passed as no_reg in which case | 1308 // result_end. The register scratch can be passed as no_reg in which case |
| 1324 // an additional object reference will be added to the reloc info. The | 1309 // an additional object reference will be added to the reloc info. The |
| 1325 // returned pointers in result and result_end have not yet been tagged as | 1310 // returned pointers in result and result_end have not yet been tagged as |
| 1326 // heap objects. If result_contains_top_on_entry is true the content of | 1311 // heap objects. If result_contains_top_on_entry is true the content of |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 inline Operand StackOperandForReturnAddress(int32_t disp) { | 1786 inline Operand StackOperandForReturnAddress(int32_t disp) { |
| 1802 return Operand(rsp, disp); | 1787 return Operand(rsp, disp); |
| 1803 } | 1788 } |
| 1804 | 1789 |
| 1805 #define ACCESS_MASM(masm) masm-> | 1790 #define ACCESS_MASM(masm) masm-> |
| 1806 | 1791 |
| 1807 } // namespace internal | 1792 } // namespace internal |
| 1808 } // namespace v8 | 1793 } // namespace v8 |
| 1809 | 1794 |
| 1810 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1795 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |