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 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1242 // Call a code stub. | 1242 // Call a code stub. |
1243 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None()); | 1243 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None()); |
1244 | 1244 |
1245 // Tail call a code stub (jump). | 1245 // Tail call a code stub (jump). |
1246 void TailCallStub(CodeStub* stub); | 1246 void TailCallStub(CodeStub* stub); |
1247 | 1247 |
1248 // Return from a code stub after popping its arguments. | 1248 // Return from a code stub after popping its arguments. |
1249 void StubReturn(int argc); | 1249 void StubReturn(int argc); |
1250 | 1250 |
1251 // Call a runtime routine. | 1251 // Call a runtime routine. |
1252 void CallRuntime(const Runtime::Function* f, int num_arguments); | 1252 void CallRuntime(const Runtime::Function* f, |
| 1253 int num_arguments, |
| 1254 SaveFPRegsMode save_doubles = kDontSaveFPRegs); |
1253 | 1255 |
1254 // Call a runtime function and save the value of XMM registers. | 1256 // Call a runtime function and save the value of XMM registers. |
1255 void CallRuntimeSaveDoubles(Runtime::FunctionId id); | 1257 void CallRuntimeSaveDoubles(Runtime::FunctionId id) { |
| 1258 const Runtime::Function* function = Runtime::FunctionForId(id); |
| 1259 CallRuntime(function, function->nargs, kSaveFPRegs); |
| 1260 } |
1256 | 1261 |
1257 // Convenience function: Same as above, but takes the fid instead. | 1262 // Convenience function: Same as above, but takes the fid instead. |
1258 void CallRuntime(Runtime::FunctionId id, int num_arguments); | 1263 void CallRuntime(Runtime::FunctionId id, int num_arguments) { |
| 1264 CallRuntime(Runtime::FunctionForId(id), num_arguments); |
| 1265 } |
1259 | 1266 |
1260 // Convenience function: call an external reference. | 1267 // Convenience function: call an external reference. |
1261 void CallExternalReference(const ExternalReference& ext, | 1268 void CallExternalReference(const ExternalReference& ext, |
1262 int num_arguments); | 1269 int num_arguments); |
1263 | 1270 |
1264 // Tail call of a runtime routine (jump). | 1271 // Tail call of a runtime routine (jump). |
1265 // Like JumpToExternalReference, but also takes care of passing the number | 1272 // Like JumpToExternalReference, but also takes care of passing the number |
1266 // of parameters. | 1273 // of parameters. |
1267 void TailCallExternalReference(const ExternalReference& ext, | 1274 void TailCallExternalReference(const ExternalReference& ext, |
1268 int num_arguments, | 1275 int num_arguments, |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 masm->popfq(); \ | 1589 masm->popfq(); \ |
1583 } \ | 1590 } \ |
1584 masm-> | 1591 masm-> |
1585 #else | 1592 #else |
1586 #define ACCESS_MASM(masm) masm-> | 1593 #define ACCESS_MASM(masm) masm-> |
1587 #endif | 1594 #endif |
1588 | 1595 |
1589 } } // namespace v8::internal | 1596 } } // namespace v8::internal |
1590 | 1597 |
1591 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1598 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |