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 #include <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_S390 | 8 #if V8_TARGET_ARCH_S390 |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 4567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4578 if (!dst.is(src)) lr(dst, src); | 4578 if (!dst.is(src)) lr(dst, src); |
4579 xilf(dst, opnd); | 4579 xilf(dst, opnd); |
4580 } | 4580 } |
4581 | 4581 |
4582 // XOR Pointer Size - dst = src & imm | 4582 // XOR Pointer Size - dst = src & imm |
4583 void MacroAssembler::XorP(Register dst, Register src, const Operand& opnd) { | 4583 void MacroAssembler::XorP(Register dst, Register src, const Operand& opnd) { |
4584 if (!dst.is(src)) LoadRR(dst, src); | 4584 if (!dst.is(src)) LoadRR(dst, src); |
4585 XorP(dst, opnd); | 4585 XorP(dst, opnd); |
4586 } | 4586 } |
4587 | 4587 |
4588 void MacroAssembler::NotP(Register dst) { | 4588 void MacroAssembler::Not32(Register dst, Register src) { |
4589 #if V8_TARGET_ARCH_S390X | 4589 if (!src.is(no_reg) && !src.is(dst)) lr(dst, src); |
| 4590 xilf(dst, Operand(0xFFFFFFFF)); |
| 4591 } |
| 4592 |
| 4593 void MacroAssembler::Not64(Register dst, Register src) { |
| 4594 if (!src.is(no_reg) && !src.is(dst)) lgr(dst, src); |
4590 xihf(dst, Operand(0xFFFFFFFF)); | 4595 xihf(dst, Operand(0xFFFFFFFF)); |
4591 xilf(dst, Operand(0xFFFFFFFF)); | 4596 xilf(dst, Operand(0xFFFFFFFF)); |
| 4597 } |
| 4598 |
| 4599 void MacroAssembler::NotP(Register dst, Register src) { |
| 4600 #if V8_TARGET_ARCH_S390X |
| 4601 Not64(dst, src); |
4592 #else | 4602 #else |
4593 XorP(dst, Operand(0xFFFFFFFF)); | 4603 Not32(dst, src); |
4594 #endif | 4604 #endif |
4595 } | 4605 } |
4596 | 4606 |
4597 // works the same as mov | 4607 // works the same as mov |
4598 void MacroAssembler::Load(Register dst, const Operand& opnd) { | 4608 void MacroAssembler::Load(Register dst, const Operand& opnd) { |
4599 intptr_t value = opnd.immediate(); | 4609 intptr_t value = opnd.immediate(); |
4600 if (is_int16(value)) { | 4610 if (is_int16(value)) { |
4601 #if V8_TARGET_ARCH_S390X | 4611 #if V8_TARGET_ARCH_S390X |
4602 lghi(dst, opnd); | 4612 lghi(dst, opnd); |
4603 #else | 4613 #else |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5563 } | 5573 } |
5564 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5574 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
5565 ExtractBit(r0, dividend, 31); | 5575 ExtractBit(r0, dividend, 31); |
5566 AddP(result, r0); | 5576 AddP(result, r0); |
5567 } | 5577 } |
5568 | 5578 |
5569 } // namespace internal | 5579 } // namespace internal |
5570 } // namespace v8 | 5580 } // namespace v8 |
5571 | 5581 |
5572 #endif // V8_TARGET_ARCH_S390 | 5582 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |