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/mips64/assembler-mips64.h" | 10 #include "src/mips64/assembler-mips64.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 Condition cond, | 247 Condition cond, |
248 Register reg, | 248 Register reg, |
249 const Operand& op); | 249 const Operand& op); |
250 | 250 |
251 // Swap two registers. If the scratch register is omitted then a slightly | 251 // Swap two registers. If the scratch register is omitted then a slightly |
252 // less efficient form using xor instead of mov is emitted. | 252 // less efficient form using xor instead of mov is emitted. |
253 void Swap(Register reg1, Register reg2, Register scratch = no_reg); | 253 void Swap(Register reg1, Register reg2, Register scratch = no_reg); |
254 | 254 |
255 void Call(Label* target); | 255 void Call(Label* target); |
256 | 256 |
| 257 void Move(Register dst, Smi* smi) { li(dst, Operand(smi)); } |
| 258 |
257 inline void Move(Register dst, Register src) { | 259 inline void Move(Register dst, Register src) { |
258 if (!dst.is(src)) { | 260 if (!dst.is(src)) { |
259 mov(dst, src); | 261 mov(dst, src); |
260 } | 262 } |
261 } | 263 } |
262 | 264 |
263 inline void Move(FPURegister dst, FPURegister src) { | 265 inline void Move(FPURegister dst, FPURegister src) { |
264 if (!dst.is(src)) { | 266 if (!dst.is(src)) { |
265 mov_d(dst, src); | 267 mov_d(dst, src); |
266 } | 268 } |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 // HeapNumber utilities. | 1590 // HeapNumber utilities. |
1589 | 1591 |
1590 void JumpIfNotHeapNumber(Register object, | 1592 void JumpIfNotHeapNumber(Register object, |
1591 Register heap_number_map, | 1593 Register heap_number_map, |
1592 Register scratch, | 1594 Register scratch, |
1593 Label* on_not_heap_number); | 1595 Label* on_not_heap_number); |
1594 | 1596 |
1595 // ------------------------------------------------------------------------- | 1597 // ------------------------------------------------------------------------- |
1596 // String utilities. | 1598 // String utilities. |
1597 | 1599 |
1598 // Generate code to do a lookup in the number string cache. If the number in | |
1599 // the register object is found in the cache the generated code falls through | |
1600 // with the result in the result register. The object and the result register | |
1601 // can be the same. If the number is not found in the cache the code jumps to | |
1602 // the label not_found with only the content of register object unchanged. | |
1603 void LookupNumberStringCache(Register object, | |
1604 Register result, | |
1605 Register scratch1, | |
1606 Register scratch2, | |
1607 Register scratch3, | |
1608 Label* not_found); | |
1609 | |
1610 // Checks if both instance types are sequential one-byte strings and jumps to | 1600 // Checks if both instance types are sequential one-byte strings and jumps to |
1611 // label if either is not. | 1601 // label if either is not. |
1612 void JumpIfBothInstanceTypesAreNotSequentialOneByte( | 1602 void JumpIfBothInstanceTypesAreNotSequentialOneByte( |
1613 Register first_object_instance_type, Register second_object_instance_type, | 1603 Register first_object_instance_type, Register second_object_instance_type, |
1614 Register scratch1, Register scratch2, Label* failure); | 1604 Register scratch1, Register scratch2, Label* failure); |
1615 | 1605 |
1616 // Check if instance type is sequential one-byte string and jump to label if | 1606 // Check if instance type is sequential one-byte string and jump to label if |
1617 // it is not. | 1607 // it is not. |
1618 void JumpIfInstanceTypeIsNotSequentialOneByte(Register type, Register scratch, | 1608 void JumpIfInstanceTypeIsNotSequentialOneByte(Register type, Register scratch, |
1619 Label* failure); | 1609 Label* failure); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1824 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1835 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1825 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1836 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1826 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1837 #else | 1827 #else |
1838 #define ACCESS_MASM(masm) masm-> | 1828 #define ACCESS_MASM(masm) masm-> |
1839 #endif | 1829 #endif |
1840 | 1830 |
1841 } } // namespace v8::internal | 1831 } } // namespace v8::internal |
1842 | 1832 |
1843 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1833 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |