| 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 | 1048 |
| 1049 // For every Call variant, there is a matching CallSize function that returns | 1049 // For every Call variant, there is a matching CallSize function that returns |
| 1050 // the size (in bytes) of the call sequence. | 1050 // the size (in bytes) of the call sequence. |
| 1051 static int CallSize(Register target); | 1051 static int CallSize(Register target); |
| 1052 static int CallSize(Label* target); | 1052 static int CallSize(Label* target); |
| 1053 static int CallSize(Address target, RelocInfo::Mode rmode); | 1053 static int CallSize(Address target, RelocInfo::Mode rmode); |
| 1054 static int CallSize(Handle<Code> code, | 1054 static int CallSize(Handle<Code> code, |
| 1055 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, | 1055 RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, |
| 1056 TypeFeedbackId ast_id = TypeFeedbackId::None()); | 1056 TypeFeedbackId ast_id = TypeFeedbackId::None()); |
| 1057 | 1057 |
| 1058 // Set up call kind marking in x5. The method takes x5 as an | |
| 1059 // explicit first parameter to make the code more readable at the | |
| 1060 // call sites. | |
| 1061 void SetCallKind(Register dst, CallKind kind); | |
| 1062 | |
| 1063 // Registers used through the invocation chain are hard-coded. | 1058 // Registers used through the invocation chain are hard-coded. |
| 1064 // We force passing the parameters to ensure the contracts are correctly | 1059 // We force passing the parameters to ensure the contracts are correctly |
| 1065 // honoured by the caller. | 1060 // honoured by the caller. |
| 1066 // 'function' must be x1. | 1061 // 'function' must be x1. |
| 1067 // 'actual' must use an immediate or x0. | 1062 // 'actual' must use an immediate or x0. |
| 1068 // 'expected' must use an immediate or x2. | 1063 // 'expected' must use an immediate or x2. |
| 1069 // 'call_kind' must be x5. | 1064 // 'call_kind' must be x5. |
| 1070 void InvokePrologue(const ParameterCount& expected, | 1065 void InvokePrologue(const ParameterCount& expected, |
| 1071 const ParameterCount& actual, | 1066 const ParameterCount& actual, |
| 1072 Handle<Code> code_constant, | 1067 Handle<Code> code_constant, |
| 1073 Register code_reg, | 1068 Register code_reg, |
| 1074 Label* done, | 1069 Label* done, |
| 1075 InvokeFlag flag, | 1070 InvokeFlag flag, |
| 1076 bool* definitely_mismatches, | 1071 bool* definitely_mismatches, |
| 1077 const CallWrapper& call_wrapper, | 1072 const CallWrapper& call_wrapper); |
| 1078 CallKind call_kind); | |
| 1079 void InvokeCode(Register code, | 1073 void InvokeCode(Register code, |
| 1080 const ParameterCount& expected, | 1074 const ParameterCount& expected, |
| 1081 const ParameterCount& actual, | 1075 const ParameterCount& actual, |
| 1082 InvokeFlag flag, | 1076 InvokeFlag flag, |
| 1083 const CallWrapper& call_wrapper, | 1077 const CallWrapper& call_wrapper); |
| 1084 CallKind call_kind); | |
| 1085 void InvokeCode(Handle<Code> code, | |
| 1086 const ParameterCount& expected, | |
| 1087 const ParameterCount& actual, | |
| 1088 RelocInfo::Mode rmode, | |
| 1089 InvokeFlag flag, | |
| 1090 CallKind call_kind); | |
| 1091 // Invoke the JavaScript function in the given register. | 1078 // Invoke the JavaScript function in the given register. |
| 1092 // Changes the current context to the context in the function before invoking. | 1079 // Changes the current context to the context in the function before invoking. |
| 1093 void InvokeFunction(Register function, | 1080 void InvokeFunction(Register function, |
| 1094 const ParameterCount& actual, | 1081 const ParameterCount& actual, |
| 1095 InvokeFlag flag, | 1082 InvokeFlag flag, |
| 1096 const CallWrapper& call_wrapper, | 1083 const CallWrapper& call_wrapper); |
| 1097 CallKind call_kind); | |
| 1098 void InvokeFunction(Register function, | 1084 void InvokeFunction(Register function, |
| 1099 const ParameterCount& expected, | 1085 const ParameterCount& expected, |
| 1100 const ParameterCount& actual, | 1086 const ParameterCount& actual, |
| 1101 InvokeFlag flag, | 1087 InvokeFlag flag, |
| 1102 const CallWrapper& call_wrapper, | 1088 const CallWrapper& call_wrapper); |
| 1103 CallKind call_kind); | |
| 1104 void InvokeFunction(Handle<JSFunction> function, | 1089 void InvokeFunction(Handle<JSFunction> function, |
| 1105 const ParameterCount& expected, | 1090 const ParameterCount& expected, |
| 1106 const ParameterCount& actual, | 1091 const ParameterCount& actual, |
| 1107 InvokeFlag flag, | 1092 InvokeFlag flag, |
| 1108 const CallWrapper& call_wrapper, | 1093 const CallWrapper& call_wrapper); |
| 1109 CallKind call_kind); | |
| 1110 | 1094 |
| 1111 | 1095 |
| 1112 // ---- Floating point helpers ---- | 1096 // ---- Floating point helpers ---- |
| 1113 | 1097 |
| 1114 enum ECMA262ToInt32Result { | 1098 enum ECMA262ToInt32Result { |
| 1115 // Provide an untagged int32_t which can be read using result.W(). That is, | 1099 // Provide an untagged int32_t which can be read using result.W(). That is, |
| 1116 // the upper 32 bits of result are undefined. | 1100 // the upper 32 bits of result are undefined. |
| 1117 INT32_IN_W, | 1101 INT32_IN_W, |
| 1118 | 1102 |
| 1119 // Provide an untagged int32_t which can be read using the 64-bit result | 1103 // Provide an untagged int32_t which can be read using the 64-bit result |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2200 #error "Unsupported option" | 2184 #error "Unsupported option" |
| 2201 #define CODE_COVERAGE_STRINGIFY(x) #x | 2185 #define CODE_COVERAGE_STRINGIFY(x) #x |
| 2202 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2186 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 2203 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2187 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 2204 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2188 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 2205 #else | 2189 #else |
| 2206 #define ACCESS_MASM(masm) masm-> | 2190 #define ACCESS_MASM(masm) masm-> |
| 2207 #endif | 2191 #endif |
| 2208 | 2192 |
| 2209 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ | 2193 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ |
| OLD | NEW |