| OLD | NEW |
| 1 // Copyright 2012 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 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 // Ensure that FPSCR contains values needed by JavaScript. | 462 // Ensure that FPSCR contains values needed by JavaScript. |
| 463 // We need the NaNModeControlBit to be sure that operations like | 463 // We need the NaNModeControlBit to be sure that operations like |
| 464 // vadd and vsub generate the Canonical NaN (if a NaN must be generated). | 464 // vadd and vsub generate the Canonical NaN (if a NaN must be generated). |
| 465 // In VFP3 it will be always the Canonical NaN. | 465 // In VFP3 it will be always the Canonical NaN. |
| 466 // In VFP2 it will be either the Canonical NaN or the negative version | 466 // In VFP2 it will be either the Canonical NaN or the negative version |
| 467 // of the Canonical NaN. It doesn't matter if we have two values. The aim | 467 // of the Canonical NaN. It doesn't matter if we have two values. The aim |
| 468 // is to be sure to never generate the hole NaN. | 468 // is to be sure to never generate the hole NaN. |
| 469 void VFPEnsureFPSCRState(Register scratch); | 469 void VFPEnsureFPSCRState(Register scratch); |
| 470 | 470 |
| 471 // If the value is a NaN, canonicalize the value else, do nothing. | 471 // If the value is a NaN, canonicalize the value else, do nothing. |
| 472 void VFPCanonicalizeNaN(const DwVfpRegister dst, |
| 473 const DwVfpRegister src, |
| 474 const Condition cond = al); |
| 472 void VFPCanonicalizeNaN(const DwVfpRegister value, | 475 void VFPCanonicalizeNaN(const DwVfpRegister value, |
| 473 const Condition cond = al); | 476 const Condition cond = al) { |
| 477 VFPCanonicalizeNaN(value, value, cond); |
| 478 } |
| 474 | 479 |
| 475 // Compare double values and move the result to the normal condition flags. | 480 // Compare double values and move the result to the normal condition flags. |
| 476 void VFPCompareAndSetFlags(const DwVfpRegister src1, | 481 void VFPCompareAndSetFlags(const DwVfpRegister src1, |
| 477 const DwVfpRegister src2, | 482 const DwVfpRegister src2, |
| 478 const Condition cond = al); | 483 const Condition cond = al); |
| 479 void VFPCompareAndSetFlags(const DwVfpRegister src1, | 484 void VFPCompareAndSetFlags(const DwVfpRegister src1, |
| 480 const double src2, | 485 const double src2, |
| 481 const Condition cond = al); | 486 const Condition cond = al); |
| 482 | 487 |
| 483 // Compare double values and then load the fpscr flags to a register. | 488 // Compare double values and then load the fpscr flags to a register. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 Label* not_int32); | 539 Label* not_int32); |
| 535 | 540 |
| 536 | 541 |
| 537 // Enter exit frame. | 542 // Enter exit frame. |
| 538 // stack_space - extra stack space, used for alignment before call to C. | 543 // stack_space - extra stack space, used for alignment before call to C. |
| 539 void EnterExitFrame(bool save_doubles, int stack_space = 0); | 544 void EnterExitFrame(bool save_doubles, int stack_space = 0); |
| 540 | 545 |
| 541 // Leave the current exit frame. Expects the return value in r0. | 546 // Leave the current exit frame. Expects the return value in r0. |
| 542 // Expect the number of values, pushed prior to the exit frame, to | 547 // Expect the number of values, pushed prior to the exit frame, to |
| 543 // remove in a register (or no_reg, if there is nothing to remove). | 548 // remove in a register (or no_reg, if there is nothing to remove). |
| 544 void LeaveExitFrame(bool save_doubles, Register argument_count); | 549 void LeaveExitFrame(bool save_doubles, |
| 550 Register argument_count, |
| 551 bool restore_context); |
| 545 | 552 |
| 546 // Get the actual activation frame alignment for target environment. | 553 // Get the actual activation frame alignment for target environment. |
| 547 static int ActivationFrameAlignment(); | 554 static int ActivationFrameAlignment(); |
| 548 | 555 |
| 549 void LoadContext(Register dst, int context_chain_length); | 556 void LoadContext(Register dst, int context_chain_length); |
| 550 | 557 |
| 551 // Conditionally load the cached Array transitioned map of type | 558 // Conditionally load the cached Array transitioned map of type |
| 552 // transitioned_kind from the native context if the map in register | 559 // transitioned_kind from the native context if the map in register |
| 553 // map_in_out is the cached Array map in the native context of | 560 // map_in_out is the cached Array map in the native context of |
| 554 // expected_kind. | 561 // expected_kind. |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1104 | 1111 |
| 1105 // Calls an API function. Allocates HandleScope, extracts returned value | 1112 // Calls an API function. Allocates HandleScope, extracts returned value |
| 1106 // from handle and propagates exceptions. Restores context. stack_space | 1113 // from handle and propagates exceptions. Restores context. stack_space |
| 1107 // - space to be unwound on exit (includes the call JS arguments space and | 1114 // - space to be unwound on exit (includes the call JS arguments space and |
| 1108 // the additional space allocated for the fast call). | 1115 // the additional space allocated for the fast call). |
| 1109 void CallApiFunctionAndReturn(ExternalReference function, | 1116 void CallApiFunctionAndReturn(ExternalReference function, |
| 1110 Address function_address, | 1117 Address function_address, |
| 1111 ExternalReference thunk_ref, | 1118 ExternalReference thunk_ref, |
| 1112 Register thunk_last_arg, | 1119 Register thunk_last_arg, |
| 1113 int stack_space, | 1120 int stack_space, |
| 1114 int return_value_offset_from_fp); | 1121 MemOperand return_value_operand, |
| 1122 MemOperand* context_restore_operand); |
| 1115 | 1123 |
| 1116 // Jump to a runtime routine. | 1124 // Jump to a runtime routine. |
| 1117 void JumpToExternalReference(const ExternalReference& builtin); | 1125 void JumpToExternalReference(const ExternalReference& builtin); |
| 1118 | 1126 |
| 1119 // Invoke specified builtin JavaScript function. Adds an entry to | 1127 // Invoke specified builtin JavaScript function. Adds an entry to |
| 1120 // the unresolved list if the name does not resolve. | 1128 // the unresolved list if the name does not resolve. |
| 1121 void InvokeBuiltin(Builtins::JavaScript id, | 1129 void InvokeBuiltin(Builtins::JavaScript id, |
| 1122 InvokeFlag flag, | 1130 InvokeFlag flag, |
| 1123 const CallWrapper& call_wrapper = NullCallWrapper()); | 1131 const CallWrapper& call_wrapper = NullCallWrapper()); |
| 1124 | 1132 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 // HeapNumber utilities | 1287 // HeapNumber utilities |
| 1280 | 1288 |
| 1281 void JumpIfNotHeapNumber(Register object, | 1289 void JumpIfNotHeapNumber(Register object, |
| 1282 Register heap_number_map, | 1290 Register heap_number_map, |
| 1283 Register scratch, | 1291 Register scratch, |
| 1284 Label* on_not_heap_number); | 1292 Label* on_not_heap_number); |
| 1285 | 1293 |
| 1286 // --------------------------------------------------------------------------- | 1294 // --------------------------------------------------------------------------- |
| 1287 // String utilities | 1295 // String utilities |
| 1288 | 1296 |
| 1297 // Generate code to do a lookup in the number string cache. If the number in |
| 1298 // the register object is found in the cache the generated code falls through |
| 1299 // with the result in the result register. The object and the result register |
| 1300 // can be the same. If the number is not found in the cache the code jumps to |
| 1301 // the label not_found with only the content of register object unchanged. |
| 1302 void LookupNumberStringCache(Register object, |
| 1303 Register result, |
| 1304 Register scratch1, |
| 1305 Register scratch2, |
| 1306 Register scratch3, |
| 1307 Label* not_found); |
| 1308 |
| 1289 // Checks if both objects are sequential ASCII strings and jumps to label | 1309 // Checks if both objects are sequential ASCII strings and jumps to label |
| 1290 // if either is not. Assumes that neither object is a smi. | 1310 // if either is not. Assumes that neither object is a smi. |
| 1291 void JumpIfNonSmisNotBothSequentialAsciiStrings(Register object1, | 1311 void JumpIfNonSmisNotBothSequentialAsciiStrings(Register object1, |
| 1292 Register object2, | 1312 Register object2, |
| 1293 Register scratch1, | 1313 Register scratch1, |
| 1294 Register scratch2, | 1314 Register scratch2, |
| 1295 Label* failure); | 1315 Label* failure); |
| 1296 | 1316 |
| 1297 // Checks if both objects are sequential ASCII strings and jumps to label | 1317 // Checks if both objects are sequential ASCII strings and jumps to label |
| 1298 // if either is not. | 1318 // if either is not. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1499 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1480 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1500 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1481 #else | 1501 #else |
| 1482 #define ACCESS_MASM(masm) masm-> | 1502 #define ACCESS_MASM(masm) masm-> |
| 1483 #endif | 1503 #endif |
| 1484 | 1504 |
| 1485 | 1505 |
| 1486 } } // namespace v8::internal | 1506 } } // namespace v8::internal |
| 1487 | 1507 |
| 1488 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1508 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |