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_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 4472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4483 int offset = mem.offset(); | 4483 int offset = mem.offset(); |
4484 | 4484 |
4485 if (!is_int16(offset)) { | 4485 if (!is_int16(offset)) { |
4486 mov(scratch, Operand(offset)); | 4486 mov(scratch, Operand(offset)); |
4487 lfdx(dst, MemOperand(base, scratch)); | 4487 lfdx(dst, MemOperand(base, scratch)); |
4488 } else { | 4488 } else { |
4489 lfd(dst, mem); | 4489 lfd(dst, mem); |
4490 } | 4490 } |
4491 } | 4491 } |
4492 | 4492 |
| 4493 void MacroAssembler::LoadDoubleU(DoubleRegister dst, const MemOperand& mem, |
| 4494 Register scratch) { |
| 4495 Register base = mem.ra(); |
| 4496 int offset = mem.offset(); |
| 4497 |
| 4498 if (!is_int16(offset)) { |
| 4499 mov(scratch, Operand(offset)); |
| 4500 lfdux(dst, MemOperand(base, scratch)); |
| 4501 } else { |
| 4502 lfdu(dst, mem); |
| 4503 } |
| 4504 } |
| 4505 |
| 4506 void MacroAssembler::LoadSingle(DoubleRegister dst, const MemOperand& mem, |
| 4507 Register scratch) { |
| 4508 Register base = mem.ra(); |
| 4509 int offset = mem.offset(); |
| 4510 |
| 4511 if (!is_int16(offset)) { |
| 4512 mov(scratch, Operand(offset)); |
| 4513 lfsx(dst, MemOperand(base, scratch)); |
| 4514 } else { |
| 4515 lfs(dst, mem); |
| 4516 } |
| 4517 } |
| 4518 |
| 4519 void MacroAssembler::LoadSingleU(DoubleRegister dst, const MemOperand& mem, |
| 4520 Register scratch) { |
| 4521 Register base = mem.ra(); |
| 4522 int offset = mem.offset(); |
| 4523 |
| 4524 if (!is_int16(offset)) { |
| 4525 mov(scratch, Operand(offset)); |
| 4526 lfsux(dst, MemOperand(base, scratch)); |
| 4527 } else { |
| 4528 lfsu(dst, mem); |
| 4529 } |
| 4530 } |
4493 | 4531 |
4494 void MacroAssembler::StoreDouble(DoubleRegister src, const MemOperand& mem, | 4532 void MacroAssembler::StoreDouble(DoubleRegister src, const MemOperand& mem, |
4495 Register scratch) { | 4533 Register scratch) { |
4496 Register base = mem.ra(); | 4534 Register base = mem.ra(); |
4497 int offset = mem.offset(); | 4535 int offset = mem.offset(); |
4498 | 4536 |
4499 if (!is_int16(offset)) { | 4537 if (!is_int16(offset)) { |
4500 mov(scratch, Operand(offset)); | 4538 mov(scratch, Operand(offset)); |
4501 stfdx(src, MemOperand(base, scratch)); | 4539 stfdx(src, MemOperand(base, scratch)); |
4502 } else { | 4540 } else { |
4503 stfd(src, mem); | 4541 stfd(src, mem); |
4504 } | 4542 } |
4505 } | 4543 } |
4506 | 4544 |
| 4545 void MacroAssembler::StoreDoubleU(DoubleRegister src, const MemOperand& mem, |
| 4546 Register scratch) { |
| 4547 Register base = mem.ra(); |
| 4548 int offset = mem.offset(); |
| 4549 |
| 4550 if (!is_int16(offset)) { |
| 4551 mov(scratch, Operand(offset)); |
| 4552 stfdux(src, MemOperand(base, scratch)); |
| 4553 } else { |
| 4554 stfdu(src, mem); |
| 4555 } |
| 4556 } |
| 4557 |
| 4558 void MacroAssembler::StoreSingle(DoubleRegister src, const MemOperand& mem, |
| 4559 Register scratch) { |
| 4560 Register base = mem.ra(); |
| 4561 int offset = mem.offset(); |
| 4562 |
| 4563 if (!is_int16(offset)) { |
| 4564 mov(scratch, Operand(offset)); |
| 4565 stfsx(src, MemOperand(base, scratch)); |
| 4566 } else { |
| 4567 stfs(src, mem); |
| 4568 } |
| 4569 } |
| 4570 |
| 4571 void MacroAssembler::StoreSingleU(DoubleRegister src, const MemOperand& mem, |
| 4572 Register scratch) { |
| 4573 Register base = mem.ra(); |
| 4574 int offset = mem.offset(); |
| 4575 |
| 4576 if (!is_int16(offset)) { |
| 4577 mov(scratch, Operand(offset)); |
| 4578 stfsux(src, MemOperand(base, scratch)); |
| 4579 } else { |
| 4580 stfsu(src, mem); |
| 4581 } |
| 4582 } |
| 4583 |
4507 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, | 4584 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, |
4508 Register scratch_reg, | 4585 Register scratch_reg, |
4509 Register scratch2_reg, | 4586 Register scratch2_reg, |
4510 Label* no_memento_found) { | 4587 Label* no_memento_found) { |
4511 Label map_check; | 4588 Label map_check; |
4512 Label top_check; | 4589 Label top_check; |
4513 ExternalReference new_space_allocation_top = | 4590 ExternalReference new_space_allocation_top = |
4514 ExternalReference::new_space_allocation_top_address(isolate()); | 4591 ExternalReference::new_space_allocation_top_address(isolate()); |
4515 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag; | 4592 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag; |
4516 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize; | 4593 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4700 } | 4777 } |
4701 if (mag.shift > 0) srawi(result, result, mag.shift); | 4778 if (mag.shift > 0) srawi(result, result, mag.shift); |
4702 ExtractBit(r0, dividend, 31); | 4779 ExtractBit(r0, dividend, 31); |
4703 add(result, result, r0); | 4780 add(result, result, r0); |
4704 } | 4781 } |
4705 | 4782 |
4706 } // namespace internal | 4783 } // namespace internal |
4707 } // namespace v8 | 4784 } // namespace v8 |
4708 | 4785 |
4709 #endif // V8_TARGET_ARCH_PPC | 4786 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |