| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_S390_MACRO_ASSEMBLER_S390_H_ | 5 #ifndef V8_S390_MACRO_ASSEMBLER_S390_H_ |
| 6 #define V8_S390_MACRO_ASSEMBLER_S390_H_ | 6 #define V8_S390_MACRO_ASSEMBLER_S390_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/frames.h" | 10 #include "src/frames.h" |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1545 true); | 1545 true); |
| 1546 } | 1546 } |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 // Untag the source value into destination and jump if source is a smi. | 1549 // Untag the source value into destination and jump if source is a smi. |
| 1550 // Souce and destination can be the same register. | 1550 // Souce and destination can be the same register. |
| 1551 void UntagAndJumpIfSmi(Register dst, Register src, Label* smi_case); | 1551 void UntagAndJumpIfSmi(Register dst, Register src, Label* smi_case); |
| 1552 | 1552 |
| 1553 inline void TestIfSmi(Register value) { tmll(value, Operand(1)); } | 1553 inline void TestIfSmi(Register value) { tmll(value, Operand(1)); } |
| 1554 | 1554 |
| 1555 inline void TestIfSmi(MemOperand value) { |
| 1556 if (is_uint12(value.offset())) { |
| 1557 tm(value, Operand(1)); |
| 1558 } else if (is_int20(value.offset())) { |
| 1559 tmy(value, Operand(1)); |
| 1560 } else { |
| 1561 LoadP(r0, value); |
| 1562 tmll(r0, Operand(1)); |
| 1563 } |
| 1564 } |
| 1565 |
| 1555 inline void TestIfPositiveSmi(Register value, Register scratch) { | 1566 inline void TestIfPositiveSmi(Register value, Register scratch) { |
| 1556 STATIC_ASSERT((kSmiTagMask | kSmiSignMask) == | 1567 STATIC_ASSERT((kSmiTagMask | kSmiSignMask) == |
| 1557 (intptr_t)(1UL << (kBitsPerPointer - 1) | 1)); | 1568 (intptr_t)(1UL << (kBitsPerPointer - 1) | 1)); |
| 1558 mov(scratch, Operand(kIntptrSignBit | kSmiTagMask)); | 1569 mov(scratch, Operand(kIntptrSignBit | kSmiTagMask)); |
| 1559 AndP(scratch, value); | 1570 AndP(scratch, value); |
| 1560 } | 1571 } |
| 1561 | 1572 |
| 1562 // Jump the register contains a smi. | 1573 // Jump the register contains a smi. |
| 1563 inline void JumpIfSmi(Register value, Label* smi_label) { | 1574 inline void JumpIfSmi(Register value, Label* smi_label) { |
| 1564 TestIfSmi(value); | 1575 TestIfSmi(value); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1823 inline MemOperand NativeContextMemOperand() { | 1834 inline MemOperand NativeContextMemOperand() { |
| 1824 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); | 1835 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); |
| 1825 } | 1836 } |
| 1826 | 1837 |
| 1827 #define ACCESS_MASM(masm) masm-> | 1838 #define ACCESS_MASM(masm) masm-> |
| 1828 | 1839 |
| 1829 } // namespace internal | 1840 } // namespace internal |
| 1830 } // namespace v8 | 1841 } // namespace v8 |
| 1831 | 1842 |
| 1832 #endif // V8_S390_MACRO_ASSEMBLER_S390_H_ | 1843 #endif // V8_S390_MACRO_ASSEMBLER_S390_H_ |
| OLD | NEW |