| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 #include "src/mips/assembler-mips.h" | 10 #include "src/mips/assembler-mips.h" |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 void InvokeFunction(Handle<JSFunction> function, | 1074 void InvokeFunction(Handle<JSFunction> function, |
| 1075 const ParameterCount& expected, | 1075 const ParameterCount& expected, |
| 1076 const ParameterCount& actual, | 1076 const ParameterCount& actual, |
| 1077 InvokeFlag flag, | 1077 InvokeFlag flag, |
| 1078 const CallWrapper& call_wrapper); | 1078 const CallWrapper& call_wrapper); |
| 1079 | 1079 |
| 1080 void IsObjectJSStringType(Register object, | 1080 void IsObjectJSStringType(Register object, |
| 1081 Register scratch, | 1081 Register scratch, |
| 1082 Label* fail); | 1082 Label* fail); |
| 1083 | 1083 |
| 1084 void IsObjectNameType(Register object, | |
| 1085 Register scratch, | |
| 1086 Label* fail); | |
| 1087 | |
| 1088 // Frame restart support. | 1084 // Frame restart support. |
| 1089 void MaybeDropFrames(); | 1085 void MaybeDropFrames(); |
| 1090 | 1086 |
| 1091 // Exception handling. | 1087 // Exception handling. |
| 1092 | 1088 |
| 1093 // Push a new stack handler and link into stack handler chain. | 1089 // Push a new stack handler and link into stack handler chain. |
| 1094 void PushStackHandler(); | 1090 void PushStackHandler(); |
| 1095 | 1091 |
| 1096 // Unlink the stack handler on top of the stack from the stack handler chain. | 1092 // Unlink the stack handler on top of the stack from the stack handler chain. |
| 1097 // Must preserve the result register. | 1093 // Must preserve the result register. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 Label* fail, | 1140 Label* fail, |
| 1145 SmiCheckType smi_check_type); | 1141 SmiCheckType smi_check_type); |
| 1146 | 1142 |
| 1147 | 1143 |
| 1148 void CheckMap(Register obj, | 1144 void CheckMap(Register obj, |
| 1149 Register scratch, | 1145 Register scratch, |
| 1150 Heap::RootListIndex index, | 1146 Heap::RootListIndex index, |
| 1151 Label* fail, | 1147 Label* fail, |
| 1152 SmiCheckType smi_check_type); | 1148 SmiCheckType smi_check_type); |
| 1153 | 1149 |
| 1154 // Check if the map of an object is equal to a specified weak map and branch | |
| 1155 // to a specified target if equal. Skip the smi check if not required | |
| 1156 // (object is known to be a heap object) | |
| 1157 void DispatchWeakMap(Register obj, Register scratch1, Register scratch2, | |
| 1158 Handle<WeakCell> cell, Handle<Code> success, | |
| 1159 SmiCheckType smi_check_type); | |
| 1160 | |
| 1161 // If the value is a NaN, canonicalize the value else, do nothing. | 1150 // If the value is a NaN, canonicalize the value else, do nothing. |
| 1162 void FPUCanonicalizeNaN(const DoubleRegister dst, const DoubleRegister src); | 1151 void FPUCanonicalizeNaN(const DoubleRegister dst, const DoubleRegister src); |
| 1163 | 1152 |
| 1164 // Get value of the weak cell. | 1153 // Get value of the weak cell. |
| 1165 void GetWeakValue(Register value, Handle<WeakCell> cell); | 1154 void GetWeakValue(Register value, Handle<WeakCell> cell); |
| 1166 | 1155 |
| 1167 // Load the value of the weak cell in the value register. Branch to the | 1156 // Load the value of the weak cell in the value register. Branch to the |
| 1168 // given miss label is the weak cell was cleared. | 1157 // given miss label is the weak cell was cleared. |
| 1169 void LoadWeakValue(Register value, Handle<WeakCell> cell, Label* miss); | 1158 void LoadWeakValue(Register value, Handle<WeakCell> cell, Label* miss); |
| 1170 | 1159 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 void DecrementCounter(StatsCounter* counter, int value, | 1412 void DecrementCounter(StatsCounter* counter, int value, |
| 1424 Register scratch1, Register scratch2); | 1413 Register scratch1, Register scratch2); |
| 1425 | 1414 |
| 1426 | 1415 |
| 1427 // ------------------------------------------------------------------------- | 1416 // ------------------------------------------------------------------------- |
| 1428 // Debugging. | 1417 // Debugging. |
| 1429 | 1418 |
| 1430 // Calls Abort(msg) if the condition cc is not satisfied. | 1419 // Calls Abort(msg) if the condition cc is not satisfied. |
| 1431 // Use --debug_code to enable. | 1420 // Use --debug_code to enable. |
| 1432 void Assert(Condition cc, BailoutReason reason, Register rs, Operand rt); | 1421 void Assert(Condition cc, BailoutReason reason, Register rs, Operand rt); |
| 1433 void AssertFastElements(Register elements); | |
| 1434 | 1422 |
| 1435 // Like Assert(), but always enabled. | 1423 // Like Assert(), but always enabled. |
| 1436 void Check(Condition cc, BailoutReason reason, Register rs, Operand rt); | 1424 void Check(Condition cc, BailoutReason reason, Register rs, Operand rt); |
| 1437 | 1425 |
| 1438 // Print a message to stdout and abort execution. | 1426 // Print a message to stdout and abort execution. |
| 1439 void Abort(BailoutReason msg); | 1427 void Abort(BailoutReason msg); |
| 1440 | 1428 |
| 1441 // Verify restrictions about code generated in stubs. | 1429 // Verify restrictions about code generated in stubs. |
| 1442 void set_generating_stub(bool value) { generating_stub_ = value; } | 1430 void set_generating_stub(bool value) { generating_stub_ = value; } |
| 1443 bool generating_stub() { return generating_stub_; } | 1431 bool generating_stub() { return generating_stub_; } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 void JumpIfNotSmi(Register value, | 1513 void JumpIfNotSmi(Register value, |
| 1526 Label* not_smi_label, | 1514 Label* not_smi_label, |
| 1527 Register scratch = at, | 1515 Register scratch = at, |
| 1528 BranchDelaySlot bd = PROTECT); | 1516 BranchDelaySlot bd = PROTECT); |
| 1529 | 1517 |
| 1530 // Jump if either of the registers contain a non-smi. | 1518 // Jump if either of the registers contain a non-smi. |
| 1531 void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi); | 1519 void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi); |
| 1532 // Jump if either of the registers contain a smi. | 1520 // Jump if either of the registers contain a smi. |
| 1533 void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi); | 1521 void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi); |
| 1534 | 1522 |
| 1535 // Abort execution if argument is a number, enabled via --debug-code. | |
| 1536 void AssertNotNumber(Register object); | |
| 1537 | |
| 1538 // Abort execution if argument is a smi, enabled via --debug-code. | 1523 // Abort execution if argument is a smi, enabled via --debug-code. |
| 1539 void AssertNotSmi(Register object); | 1524 void AssertNotSmi(Register object); |
| 1540 void AssertSmi(Register object); | 1525 void AssertSmi(Register object); |
| 1541 | 1526 |
| 1542 // Abort execution if argument is not a string, enabled via --debug-code. | |
| 1543 void AssertString(Register object); | |
| 1544 | |
| 1545 // Abort execution if argument is not a name, enabled via --debug-code. | |
| 1546 void AssertName(Register object); | |
| 1547 | |
| 1548 // Abort execution if argument is not a JSFunction, enabled via --debug-code. | 1527 // Abort execution if argument is not a JSFunction, enabled via --debug-code. |
| 1549 void AssertFunction(Register object); | 1528 void AssertFunction(Register object); |
| 1550 | 1529 |
| 1551 // Abort execution if argument is not a JSBoundFunction, | 1530 // Abort execution if argument is not a JSBoundFunction, |
| 1552 // enabled via --debug-code. | 1531 // enabled via --debug-code. |
| 1553 void AssertBoundFunction(Register object); | 1532 void AssertBoundFunction(Register object); |
| 1554 | 1533 |
| 1555 // Abort execution if argument is not a JSGeneratorObject, | 1534 // Abort execution if argument is not a JSGeneratorObject, |
| 1556 // enabled via --debug-code. | 1535 // enabled via --debug-code. |
| 1557 void AssertGeneratorObject(Register object); | 1536 void AssertGeneratorObject(Register object); |
| 1558 | 1537 |
| 1559 // Abort execution if argument is not a JSReceiver, enabled via --debug-code. | |
| 1560 void AssertReceiver(Register object); | |
| 1561 | |
| 1562 // Abort execution if argument is not undefined or an AllocationSite, enabled | 1538 // Abort execution if argument is not undefined or an AllocationSite, enabled |
| 1563 // via --debug-code. | 1539 // via --debug-code. |
| 1564 void AssertUndefinedOrAllocationSite(Register object, Register scratch); | 1540 void AssertUndefinedOrAllocationSite(Register object, Register scratch); |
| 1565 | 1541 |
| 1566 // Abort execution if reg is not the root value with the given index, | 1542 // Abort execution if reg is not the root value with the given index, |
| 1567 // enabled via --debug-code. | 1543 // enabled via --debug-code. |
| 1568 void AssertIsRoot(Register reg, Heap::RootListIndex index); | 1544 void AssertIsRoot(Register reg, Heap::RootListIndex index); |
| 1569 | 1545 |
| 1570 // --------------------------------------------------------------------------- | 1546 // --------------------------------------------------------------------------- |
| 1571 // HeapNumber utilities. | 1547 // HeapNumber utilities. |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1822 dd(GetLabelFunction(index)); | 1798 dd(GetLabelFunction(index)); |
| 1823 } | 1799 } |
| 1824 } | 1800 } |
| 1825 | 1801 |
| 1826 #define ACCESS_MASM(masm) masm-> | 1802 #define ACCESS_MASM(masm) masm-> |
| 1827 | 1803 |
| 1828 } // namespace internal | 1804 } // namespace internal |
| 1829 } // namespace v8 | 1805 } // namespace v8 |
| 1830 | 1806 |
| 1831 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1807 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| OLD | NEW |