| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 COND_TYPED_ARGS) { \ | 162 COND_TYPED_ARGS) { \ |
| 163 Name(target, COND_ARGS, bd); \ | 163 Name(target, COND_ARGS, bd); \ |
| 164 } | 164 } |
| 165 | 165 |
| 166 #define DECLARE_BRANCH_PROTOTYPES(Name) \ | 166 #define DECLARE_BRANCH_PROTOTYPES(Name) \ |
| 167 DECLARE_NORELOC_PROTOTYPE(Name, Label*) \ | 167 DECLARE_NORELOC_PROTOTYPE(Name, Label*) \ |
| 168 DECLARE_NORELOC_PROTOTYPE(Name, int16_t) | 168 DECLARE_NORELOC_PROTOTYPE(Name, int16_t) |
| 169 | 169 |
| 170 DECLARE_BRANCH_PROTOTYPES(Branch) | 170 DECLARE_BRANCH_PROTOTYPES(Branch) |
| 171 DECLARE_BRANCH_PROTOTYPES(BranchAndLink) | 171 DECLARE_BRANCH_PROTOTYPES(BranchAndLink) |
| 172 DECLARE_BRANCH_PROTOTYPES(BranchShort) |
| 172 | 173 |
| 173 #undef DECLARE_BRANCH_PROTOTYPES | 174 #undef DECLARE_BRANCH_PROTOTYPES |
| 174 #undef COND_TYPED_ARGS | 175 #undef COND_TYPED_ARGS |
| 175 #undef COND_ARGS | 176 #undef COND_ARGS |
| 176 | 177 |
| 177 | 178 |
| 178 // Jump, Call, and Ret pseudo instructions implementing inter-working. | 179 // Jump, Call, and Ret pseudo instructions implementing inter-working. |
| 179 #define COND_ARGS Condition cond = al, Register rs = zero_reg, \ | 180 #define COND_ARGS Condition cond = al, Register rs = zero_reg, \ |
| 180 const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT | 181 const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT |
| 181 | 182 |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 // transitioned_kind from the native context if the map in register | 864 // transitioned_kind from the native context if the map in register |
| 864 // map_in_out is the cached Array map in the native context of | 865 // map_in_out is the cached Array map in the native context of |
| 865 // expected_kind. | 866 // expected_kind. |
| 866 void LoadTransitionedArrayMapConditional( | 867 void LoadTransitionedArrayMapConditional( |
| 867 ElementsKind expected_kind, | 868 ElementsKind expected_kind, |
| 868 ElementsKind transitioned_kind, | 869 ElementsKind transitioned_kind, |
| 869 Register map_in_out, | 870 Register map_in_out, |
| 870 Register scratch, | 871 Register scratch, |
| 871 Label* no_map_match); | 872 Label* no_map_match); |
| 872 | 873 |
| 873 // Load the initial map for new Arrays from a JSFunction. | |
| 874 void LoadInitialArrayMap(Register function_in, | |
| 875 Register scratch, | |
| 876 Register map_out, | |
| 877 bool can_have_holes); | |
| 878 | |
| 879 void LoadGlobalFunction(int index, Register function); | 874 void LoadGlobalFunction(int index, Register function); |
| 880 void LoadArrayFunction(Register function); | |
| 881 | 875 |
| 882 // Load the initial map from the global function. The registers | 876 // Load the initial map from the global function. The registers |
| 883 // function and map can be the same, function is then overwritten. | 877 // function and map can be the same, function is then overwritten. |
| 884 void LoadGlobalFunctionInitialMap(Register function, | 878 void LoadGlobalFunctionInitialMap(Register function, |
| 885 Register map, | 879 Register map, |
| 886 Register scratch); | 880 Register scratch); |
| 887 | 881 |
| 888 void InitializeRootRegister() { | 882 void InitializeRootRegister() { |
| 889 ExternalReference roots_array_start = | 883 ExternalReference roots_array_start = |
| 890 ExternalReference::roots_array_start(isolate()); | 884 ExternalReference::roots_array_start(isolate()); |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 // abstract parameter passing for the three different ways we call | 1263 // abstract parameter passing for the three different ways we call |
| 1270 // C functions from generated code. | 1264 // C functions from generated code. |
| 1271 void MovToFloatParameter(DoubleRegister src); | 1265 void MovToFloatParameter(DoubleRegister src); |
| 1272 void MovToFloatParameters(DoubleRegister src1, DoubleRegister src2); | 1266 void MovToFloatParameters(DoubleRegister src1, DoubleRegister src2); |
| 1273 void MovToFloatResult(DoubleRegister src); | 1267 void MovToFloatResult(DoubleRegister src); |
| 1274 | 1268 |
| 1275 // Calls an API function. Allocates HandleScope, extracts returned value | 1269 // Calls an API function. Allocates HandleScope, extracts returned value |
| 1276 // from handle and propagates exceptions. Restores context. stack_space | 1270 // from handle and propagates exceptions. Restores context. stack_space |
| 1277 // - space to be unwound on exit (includes the call JS arguments space and | 1271 // - space to be unwound on exit (includes the call JS arguments space and |
| 1278 // the additional space allocated for the fast call). | 1272 // the additional space allocated for the fast call). |
| 1279 void CallApiFunctionAndReturn(ExternalReference function, | 1273 void CallApiFunctionAndReturn(Register function_address, |
| 1280 Address function_address, | |
| 1281 ExternalReference thunk_ref, | 1274 ExternalReference thunk_ref, |
| 1282 Register thunk_last_arg, | |
| 1283 int stack_space, | 1275 int stack_space, |
| 1284 MemOperand return_value_operand, | 1276 MemOperand return_value_operand, |
| 1285 MemOperand* context_restore_operand); | 1277 MemOperand* context_restore_operand); |
| 1286 | 1278 |
| 1287 // Jump to the builtin routine. | 1279 // Jump to the builtin routine. |
| 1288 void JumpToExternalReference(const ExternalReference& builtin, | 1280 void JumpToExternalReference(const ExternalReference& builtin, |
| 1289 BranchDelaySlot bd = PROTECT); | 1281 BranchDelaySlot bd = PROTECT); |
| 1290 | 1282 |
| 1291 // Invoke specified builtin JavaScript function. Adds an entry to | 1283 // Invoke specified builtin JavaScript function. Adds an entry to |
| 1292 // the unresolved list if the name does not resolve. | 1284 // the unresolved list if the name does not resolve. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 | 1557 |
| 1566 // Jumps to found label if a prototype map has dictionary elements. | 1558 // Jumps to found label if a prototype map has dictionary elements. |
| 1567 void JumpIfDictionaryInPrototypeChain(Register object, Register scratch0, | 1559 void JumpIfDictionaryInPrototypeChain(Register object, Register scratch0, |
| 1568 Register scratch1, Label* found); | 1560 Register scratch1, Label* found); |
| 1569 | 1561 |
| 1570 private: | 1562 private: |
| 1571 void CallCFunctionHelper(Register function, | 1563 void CallCFunctionHelper(Register function, |
| 1572 int num_reg_arguments, | 1564 int num_reg_arguments, |
| 1573 int num_double_arguments); | 1565 int num_double_arguments); |
| 1574 | 1566 |
| 1575 void BranchShort(int16_t offset, BranchDelaySlot bdslot = PROTECT); | |
| 1576 void BranchShort(int16_t offset, Condition cond, Register rs, | |
| 1577 const Operand& rt, | |
| 1578 BranchDelaySlot bdslot = PROTECT); | |
| 1579 void BranchShort(Label* L, BranchDelaySlot bdslot = PROTECT); | |
| 1580 void BranchShort(Label* L, Condition cond, Register rs, | |
| 1581 const Operand& rt, | |
| 1582 BranchDelaySlot bdslot = PROTECT); | |
| 1583 void BranchAndLinkShort(int16_t offset, BranchDelaySlot bdslot = PROTECT); | 1567 void BranchAndLinkShort(int16_t offset, BranchDelaySlot bdslot = PROTECT); |
| 1584 void BranchAndLinkShort(int16_t offset, Condition cond, Register rs, | 1568 void BranchAndLinkShort(int16_t offset, Condition cond, Register rs, |
| 1585 const Operand& rt, | 1569 const Operand& rt, |
| 1586 BranchDelaySlot bdslot = PROTECT); | 1570 BranchDelaySlot bdslot = PROTECT); |
| 1587 void BranchAndLinkShort(Label* L, BranchDelaySlot bdslot = PROTECT); | 1571 void BranchAndLinkShort(Label* L, BranchDelaySlot bdslot = PROTECT); |
| 1588 void BranchAndLinkShort(Label* L, Condition cond, Register rs, | 1572 void BranchAndLinkShort(Label* L, Condition cond, Register rs, |
| 1589 const Operand& rt, | 1573 const Operand& rt, |
| 1590 BranchDelaySlot bdslot = PROTECT); | 1574 BranchDelaySlot bdslot = PROTECT); |
| 1591 void J(Label* L, BranchDelaySlot bdslot); | 1575 void J(Label* L, BranchDelaySlot bdslot); |
| 1592 void Jr(Label* L, BranchDelaySlot bdslot); | 1576 void Jr(Label* L, BranchDelaySlot bdslot); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1681 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1665 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 1682 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1666 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1683 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1667 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1684 #else | 1668 #else |
| 1685 #define ACCESS_MASM(masm) masm-> | 1669 #define ACCESS_MASM(masm) masm-> |
| 1686 #endif | 1670 #endif |
| 1687 | 1671 |
| 1688 } } // namespace v8::internal | 1672 } } // namespace v8::internal |
| 1689 | 1673 |
| 1690 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1674 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| OLD | NEW |