| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 Condition cond, | 226 Condition cond, |
| 227 Register reg, | 227 Register reg, |
| 228 const Operand& op); | 228 const Operand& op); |
| 229 | 229 |
| 230 // Swap two registers. If the scratch register is omitted then a slightly | 230 // Swap two registers. If the scratch register is omitted then a slightly |
| 231 // less efficient form using xor instead of mov is emitted. | 231 // less efficient form using xor instead of mov is emitted. |
| 232 void Swap(Register reg1, Register reg2, Register scratch = no_reg); | 232 void Swap(Register reg1, Register reg2, Register scratch = no_reg); |
| 233 | 233 |
| 234 void Call(Label* target); | 234 void Call(Label* target); |
| 235 | 235 |
| 236 void Move(Register dst, Smi* smi) { li(dst, Operand(smi)); } |
| 237 |
| 236 inline void Move(Register dst, Register src) { | 238 inline void Move(Register dst, Register src) { |
| 237 if (!dst.is(src)) { | 239 if (!dst.is(src)) { |
| 238 mov(dst, src); | 240 mov(dst, src); |
| 239 } | 241 } |
| 240 } | 242 } |
| 241 | 243 |
| 242 inline void Move(FPURegister dst, FPURegister src) { | 244 inline void Move(FPURegister dst, FPURegister src) { |
| 243 if (!dst.is(src)) { | 245 if (!dst.is(src)) { |
| 244 mov_d(dst, src); | 246 mov_d(dst, src); |
| 245 } | 247 } |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 // HeapNumber utilities. | 1497 // HeapNumber utilities. |
| 1496 | 1498 |
| 1497 void JumpIfNotHeapNumber(Register object, | 1499 void JumpIfNotHeapNumber(Register object, |
| 1498 Register heap_number_map, | 1500 Register heap_number_map, |
| 1499 Register scratch, | 1501 Register scratch, |
| 1500 Label* on_not_heap_number); | 1502 Label* on_not_heap_number); |
| 1501 | 1503 |
| 1502 // ------------------------------------------------------------------------- | 1504 // ------------------------------------------------------------------------- |
| 1503 // String utilities. | 1505 // String utilities. |
| 1504 | 1506 |
| 1505 // Generate code to do a lookup in the number string cache. If the number in | |
| 1506 // the register object is found in the cache the generated code falls through | |
| 1507 // with the result in the result register. The object and the result register | |
| 1508 // can be the same. If the number is not found in the cache the code jumps to | |
| 1509 // the label not_found with only the content of register object unchanged. | |
| 1510 void LookupNumberStringCache(Register object, | |
| 1511 Register result, | |
| 1512 Register scratch1, | |
| 1513 Register scratch2, | |
| 1514 Register scratch3, | |
| 1515 Label* not_found); | |
| 1516 | |
| 1517 // Checks if both instance types are sequential ASCII strings and jumps to | 1507 // Checks if both instance types are sequential ASCII strings and jumps to |
| 1518 // label if either is not. | 1508 // label if either is not. |
| 1519 void JumpIfBothInstanceTypesAreNotSequentialOneByte( | 1509 void JumpIfBothInstanceTypesAreNotSequentialOneByte( |
| 1520 Register first_object_instance_type, Register second_object_instance_type, | 1510 Register first_object_instance_type, Register second_object_instance_type, |
| 1521 Register scratch1, Register scratch2, Label* failure); | 1511 Register scratch1, Register scratch2, Label* failure); |
| 1522 | 1512 |
| 1523 // Check if instance type is sequential one-byte string and jump to label if | 1513 // Check if instance type is sequential one-byte string and jump to label if |
| 1524 // it is not. | 1514 // it is not. |
| 1525 void JumpIfInstanceTypeIsNotSequentialOneByte(Register type, Register scratch, | 1515 void JumpIfInstanceTypeIsNotSequentialOneByte(Register type, Register scratch, |
| 1526 Label* failure); | 1516 Label* failure); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1737 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 1748 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1738 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1749 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1739 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1750 #else | 1740 #else |
| 1751 #define ACCESS_MASM(masm) masm-> | 1741 #define ACCESS_MASM(masm) masm-> |
| 1752 #endif | 1742 #endif |
| 1753 | 1743 |
| 1754 } } // namespace v8::internal | 1744 } } // namespace v8::internal |
| 1755 | 1745 |
| 1756 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1746 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| OLD | NEW |