OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 void InitializeRootRegister() { | 321 void InitializeRootRegister() { |
322 ExternalReference roots_array_start = | 322 ExternalReference roots_array_start = |
323 ExternalReference::roots_array_start(isolate()); | 323 ExternalReference::roots_array_start(isolate()); |
324 movq(kRootRegister, roots_array_start); | 324 movq(kRootRegister, roots_array_start); |
325 addq(kRootRegister, Immediate(kRootRegisterBias)); | 325 addq(kRootRegister, Immediate(kRootRegisterBias)); |
326 } | 326 } |
327 | 327 |
328 // --------------------------------------------------------------------------- | 328 // --------------------------------------------------------------------------- |
329 // JavaScript invokes | 329 // JavaScript invokes |
330 | 330 |
331 // Setup call kind marking in rcx. The method takes rcx as an | 331 // Set up call kind marking in rcx. The method takes rcx as an |
332 // explicit first parameter to make the code more readable at the | 332 // explicit first parameter to make the code more readable at the |
333 // call sites. | 333 // call sites. |
334 void SetCallKind(Register dst, CallKind kind); | 334 void SetCallKind(Register dst, CallKind kind); |
335 | 335 |
336 // Invoke the JavaScript function code by either calling or jumping. | 336 // Invoke the JavaScript function code by either calling or jumping. |
337 void InvokeCode(Register code, | 337 void InvokeCode(Register code, |
338 const ParameterCount& expected, | 338 const ParameterCount& expected, |
339 const ParameterCount& actual, | 339 const ParameterCount& actual, |
340 InvokeFlag flag, | 340 InvokeFlag flag, |
341 const CallWrapper& call_wrapper, | 341 const CallWrapper& call_wrapper, |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 // Check to see if maybe_number can be stored as a double in | 882 // Check to see if maybe_number can be stored as a double in |
883 // FastDoubleElements. If it can, store it at the index specified by index in | 883 // FastDoubleElements. If it can, store it at the index specified by index in |
884 // the FastDoubleElements array elements, otherwise jump to fail. Note that | 884 // the FastDoubleElements array elements, otherwise jump to fail. Note that |
885 // index must not be smi-tagged. | 885 // index must not be smi-tagged. |
886 void StoreNumberToDoubleElements(Register maybe_number, | 886 void StoreNumberToDoubleElements(Register maybe_number, |
887 Register elements, | 887 Register elements, |
888 Register index, | 888 Register index, |
889 XMMRegister xmm_scratch, | 889 XMMRegister xmm_scratch, |
890 Label* fail); | 890 Label* fail); |
891 | 891 |
892 // Check if the map of an object is equal to a specified map and | 892 // Compare an object's map with the specified map and its transitioned |
893 // branch to label if not. Skip the smi check if not required | 893 // elements maps if mode is ALLOW_ELEMENT_TRANSITION_MAPS. FLAGS are set with |
894 // (object is known to be a heap object) | 894 // result of map compare. If multiple map compares are required, the compare |
| 895 // sequences branches to early_success. |
| 896 void CompareMap(Register obj, |
| 897 Handle<Map> map, |
| 898 Label* early_success, |
| 899 CompareMapMode mode = REQUIRE_EXACT_MAP); |
| 900 |
| 901 // Check if the map of an object is equal to a specified map and branch to |
| 902 // label if not. Skip the smi check if not required (object is known to be a |
| 903 // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match |
| 904 // against maps that are ElementsKind transition maps of the specificed map. |
895 void CheckMap(Register obj, | 905 void CheckMap(Register obj, |
896 Handle<Map> map, | 906 Handle<Map> map, |
897 Label* fail, | 907 Label* fail, |
898 SmiCheckType smi_check_type); | 908 SmiCheckType smi_check_type, |
| 909 CompareMapMode mode = REQUIRE_EXACT_MAP); |
899 | 910 |
900 // Check if the map of an object is equal to a specified map and branch to a | 911 // Check if the map of an object is equal to a specified map and branch to a |
901 // specified target if equal. Skip the smi check if not required (object is | 912 // specified target if equal. Skip the smi check if not required (object is |
902 // known to be a heap object) | 913 // known to be a heap object) |
903 void DispatchMap(Register obj, | 914 void DispatchMap(Register obj, |
904 Handle<Map> map, | 915 Handle<Map> map, |
905 Handle<Code> success, | 916 Handle<Code> success, |
906 SmiCheckType smi_check_type); | 917 SmiCheckType smi_check_type); |
907 | 918 |
908 // Check if the object in register heap_object is a string. Afterwards the | 919 // Check if the object in register heap_object is a string. Afterwards the |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 // Inline caching support | 979 // Inline caching support |
969 | 980 |
970 // Generate code for checking access rights - used for security checks | 981 // Generate code for checking access rights - used for security checks |
971 // on access to global objects across environments. The holder register | 982 // on access to global objects across environments. The holder register |
972 // is left untouched, but the scratch register and kScratchRegister, | 983 // is left untouched, but the scratch register and kScratchRegister, |
973 // which must be different, are clobbered. | 984 // which must be different, are clobbered. |
974 void CheckAccessGlobalProxy(Register holder_reg, | 985 void CheckAccessGlobalProxy(Register holder_reg, |
975 Register scratch, | 986 Register scratch, |
976 Label* miss); | 987 Label* miss); |
977 | 988 |
| 989 void GetNumberHash(Register r0, Register scratch); |
978 | 990 |
979 void LoadFromNumberDictionary(Label* miss, | 991 void LoadFromNumberDictionary(Label* miss, |
980 Register elements, | 992 Register elements, |
981 Register key, | 993 Register key, |
982 Register r0, | 994 Register r0, |
983 Register r1, | 995 Register r1, |
984 Register r2, | 996 Register r2, |
985 Register result); | 997 Register result); |
986 | 998 |
987 | 999 |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 masm->popfd(); \ | 1448 masm->popfd(); \ |
1437 } \ | 1449 } \ |
1438 masm-> | 1450 masm-> |
1439 #else | 1451 #else |
1440 #define ACCESS_MASM(masm) masm-> | 1452 #define ACCESS_MASM(masm) masm-> |
1441 #endif | 1453 #endif |
1442 | 1454 |
1443 } } // namespace v8::internal | 1455 } } // namespace v8::internal |
1444 | 1456 |
1445 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1457 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |