| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 void JumpIfHeapNumber(Register object, | 790 void JumpIfHeapNumber(Register object, |
| 791 Label* on_heap_number, | 791 Label* on_heap_number, |
| 792 Register heap_number_map = NoReg); | 792 Register heap_number_map = NoReg); |
| 793 void JumpIfNotHeapNumber(Register object, | 793 void JumpIfNotHeapNumber(Register object, |
| 794 Label* on_not_heap_number, | 794 Label* on_not_heap_number, |
| 795 Register heap_number_map = NoReg); | 795 Register heap_number_map = NoReg); |
| 796 | 796 |
| 797 // Jump to label if the input double register contains -0.0. | 797 // Jump to label if the input double register contains -0.0. |
| 798 void JumpIfMinusZero(DoubleRegister input, Label* on_negative_zero); | 798 void JumpIfMinusZero(DoubleRegister input, Label* on_negative_zero); |
| 799 | 799 |
| 800 // Generate code to do a lookup in the number string cache. If the number in |
| 801 // the register object is found in the cache the generated code falls through |
| 802 // with the result in the result register. The object and the result register |
| 803 // can be the same. If the number is not found in the cache the code jumps to |
| 804 // the label not_found with only the content of register object unchanged. |
| 805 void LookupNumberStringCache(Register object, |
| 806 Register result, |
| 807 Register scratch1, |
| 808 Register scratch2, |
| 809 Register scratch3, |
| 810 Label* not_found); |
| 811 |
| 800 // Saturate a signed 32-bit integer in input to an unsigned 8-bit integer in | 812 // Saturate a signed 32-bit integer in input to an unsigned 8-bit integer in |
| 801 // output. | 813 // output. |
| 802 void ClampInt32ToUint8(Register in_out); | 814 void ClampInt32ToUint8(Register in_out); |
| 803 void ClampInt32ToUint8(Register output, Register input); | 815 void ClampInt32ToUint8(Register output, Register input); |
| 804 | 816 |
| 805 // Saturate a double in input to an unsigned 8-bit integer in output. | 817 // Saturate a double in input to an unsigned 8-bit integer in output. |
| 806 void ClampDoubleToUint8(Register output, | 818 void ClampDoubleToUint8(Register output, |
| 807 DoubleRegister input, | 819 DoubleRegister input, |
| 808 DoubleRegister dbl_scratch); | 820 DoubleRegister dbl_scratch); |
| 809 | 821 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 // 'stack_space' is the space to be unwound on exit (includes the call JS | 966 // 'stack_space' is the space to be unwound on exit (includes the call JS |
| 955 // arguments space and the additional space allocated for the fast call). | 967 // arguments space and the additional space allocated for the fast call). |
| 956 // 'spill_offset' is the offset from the stack pointer where | 968 // 'spill_offset' is the offset from the stack pointer where |
| 957 // CallApiFunctionAndReturn can spill registers. | 969 // CallApiFunctionAndReturn can spill registers. |
| 958 void CallApiFunctionAndReturn(ExternalReference function, | 970 void CallApiFunctionAndReturn(ExternalReference function, |
| 959 Address function_address, | 971 Address function_address, |
| 960 ExternalReference thunk_ref, | 972 ExternalReference thunk_ref, |
| 961 Register thunk_last_arg, | 973 Register thunk_last_arg, |
| 962 int stack_space, | 974 int stack_space, |
| 963 int spill_offset, | 975 int spill_offset, |
| 964 int return_value_offset_from_fp); | 976 MemOperand return_value_operand, |
| 977 MemOperand* context_restore_operand); |
| 965 | 978 |
| 966 // The number of register that CallApiFunctionAndReturn will need to save on | 979 // The number of register that CallApiFunctionAndReturn will need to save on |
| 967 // the stack. The space for these registers need to be allocated in the | 980 // the stack. The space for these registers need to be allocated in the |
| 968 // ExitFrame before calling CallApiFunctionAndReturn. | 981 // ExitFrame before calling CallApiFunctionAndReturn. |
| 969 static const int kCallApiFunctionSpillSpace = 4; | 982 static const int kCallApiFunctionSpillSpace = 4; |
| 970 | 983 |
| 971 // Jump to a runtime routine. | 984 // Jump to a runtime routine. |
| 972 void JumpToExternalReference(const ExternalReference& builtin); | 985 void JumpToExternalReference(const ExternalReference& builtin); |
| 973 // Tail call of a runtime routine (jump). | 986 // Tail call of a runtime routine (jump). |
| 974 // Like JumpToExternalReference, but also takes care of passing the number | 987 // Like JumpToExternalReference, but also takes care of passing the number |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1531 // Leave the current exit frame, after a C function has returned to generated | 1544 // Leave the current exit frame, after a C function has returned to generated |
| 1532 // (JavaScript) code. | 1545 // (JavaScript) code. |
| 1533 // | 1546 // |
| 1534 // This effectively unwinds the operation of EnterExitFrame: | 1547 // This effectively unwinds the operation of EnterExitFrame: |
| 1535 // * Preserved doubles are restored (if restore_doubles is true). | 1548 // * Preserved doubles are restored (if restore_doubles is true). |
| 1536 // * The frame information is removed from the top frame. | 1549 // * The frame information is removed from the top frame. |
| 1537 // * The exit frame is dropped. | 1550 // * The exit frame is dropped. |
| 1538 // * The stack pointer is reset to jssp. | 1551 // * The stack pointer is reset to jssp. |
| 1539 // | 1552 // |
| 1540 // The stack pointer must be csp on entry. | 1553 // The stack pointer must be csp on entry. |
| 1541 void LeaveExitFrame(bool restore_doubles, const Register& scratch); | 1554 void LeaveExitFrame(bool save_doubles, |
| 1555 const Register& scratch, |
| 1556 bool restore_context); |
| 1542 | 1557 |
| 1543 void LoadContext(Register dst, int context_chain_length); | 1558 void LoadContext(Register dst, int context_chain_length); |
| 1544 | 1559 |
| 1545 // --------------------------------------------------------------------------- | 1560 // --------------------------------------------------------------------------- |
| 1546 // StatsCounter support | 1561 // StatsCounter support |
| 1547 | 1562 |
| 1548 void SetCounter(StatsCounter* counter, int value, Register scratch1, | 1563 void SetCounter(StatsCounter* counter, int value, Register scratch1, |
| 1549 Register scratch2); | 1564 Register scratch2); |
| 1550 void IncrementCounter(StatsCounter* counter, int value, Register scratch1, | 1565 void IncrementCounter(StatsCounter* counter, int value, Register scratch1, |
| 1551 Register scratch2); | 1566 Register scratch2); |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 #error "Unsupported option" | 2144 #error "Unsupported option" |
| 2130 #define CODE_COVERAGE_STRINGIFY(x) #x | 2145 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 2131 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2146 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 2132 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2147 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 2133 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2148 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 2134 #else | 2149 #else |
| 2135 #define ACCESS_MASM(masm) masm-> | 2150 #define ACCESS_MASM(masm) masm-> |
| 2136 #endif | 2151 #endif |
| 2137 | 2152 |
| 2138 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ | 2153 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ |
| OLD | NEW |