| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 ExternalReference::store_buffer_top(isolate()); | 563 ExternalReference::store_buffer_top(isolate()); |
| 564 mov(ip, Operand(store_buffer)); | 564 mov(ip, Operand(store_buffer)); |
| 565 LoadP(scratch, MemOperand(ip)); | 565 LoadP(scratch, MemOperand(ip)); |
| 566 // Store pointer to buffer and increment buffer top. | 566 // Store pointer to buffer and increment buffer top. |
| 567 StoreP(address, MemOperand(scratch)); | 567 StoreP(address, MemOperand(scratch)); |
| 568 addi(scratch, scratch, Operand(kPointerSize)); | 568 addi(scratch, scratch, Operand(kPointerSize)); |
| 569 // Write back new top of buffer. | 569 // Write back new top of buffer. |
| 570 StoreP(scratch, MemOperand(ip)); | 570 StoreP(scratch, MemOperand(ip)); |
| 571 // Call stub on end of buffer. | 571 // Call stub on end of buffer. |
| 572 // Check for end of buffer. | 572 // Check for end of buffer. |
| 573 mov(r0, Operand(StoreBuffer::kStoreBufferOverflowBit)); | 573 mov(r0, Operand(StoreBuffer::kStoreBufferMask)); |
| 574 and_(r0, scratch, r0, SetRC); | 574 and_(r0, scratch, r0, SetRC); |
| 575 | 575 |
| 576 if (and_then == kFallThroughAtEnd) { | 576 if (and_then == kFallThroughAtEnd) { |
| 577 beq(&done, cr0); | 577 bne(&done, cr0); |
| 578 } else { | 578 } else { |
| 579 DCHECK(and_then == kReturnAtEnd); | 579 DCHECK(and_then == kReturnAtEnd); |
| 580 Ret(eq, cr0); | 580 Ret(ne, cr0); |
| 581 } | 581 } |
| 582 mflr(r0); | 582 mflr(r0); |
| 583 push(r0); | 583 push(r0); |
| 584 StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode); | 584 StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode); |
| 585 CallStub(&store_buffer_overflow); | 585 CallStub(&store_buffer_overflow); |
| 586 pop(r0); | 586 pop(r0); |
| 587 mtlr(r0); | 587 mtlr(r0); |
| 588 bind(&done); | 588 bind(&done); |
| 589 if (and_then == kReturnAtEnd) { | 589 if (and_then == kReturnAtEnd) { |
| 590 Ret(); | 590 Ret(); |
| (...skipping 4050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4641 } | 4641 } |
| 4642 if (mag.shift > 0) srawi(result, result, mag.shift); | 4642 if (mag.shift > 0) srawi(result, result, mag.shift); |
| 4643 ExtractBit(r0, dividend, 31); | 4643 ExtractBit(r0, dividend, 31); |
| 4644 add(result, result, r0); | 4644 add(result, result, r0); |
| 4645 } | 4645 } |
| 4646 | 4646 |
| 4647 } // namespace internal | 4647 } // namespace internal |
| 4648 } // namespace v8 | 4648 } // namespace v8 |
| 4649 | 4649 |
| 4650 #endif // V8_TARGET_ARCH_PPC | 4650 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |