Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: src/compiler/ppc/code-generator-ppc.cc

Issue 1899033002: PPC: [Atomics] Remove Atomics code stubs; use TF ops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix to address the comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 Register value = i.InputRegister(3); \ 665 Register value = i.InputRegister(3); \
666 if (mode == kMode_MRI) { \ 666 if (mode == kMode_MRI) { \
667 __ asm_instr(value, operand); \ 667 __ asm_instr(value, operand); \
668 } else { \ 668 } else { \
669 __ asm_instrx(value, operand); \ 669 __ asm_instrx(value, operand); \
670 } \ 670 } \
671 __ bind(&done); \ 671 __ bind(&done); \
672 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ 672 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \
673 } while (0) 673 } while (0)
674 674
675 #define ASSEMBLE_ATOMIC_LOAD_INTEGER(asm_instr, asm_instrx) \
676 do { \
677 Label done; \
678 Register result = i.OutputRegister(); \
679 AddressingMode mode = kMode_None; \
680 MemOperand operand = i.MemoryOperand(&mode); \
681 __ sync(); \
682 if (mode == kMode_MRI) { \
683 __ asm_instr(result, operand); \
684 } else { \
685 __ asm_instrx(result, operand); \
686 } \
687 __ bind(&done); \
688 __ cmp(result, result); \
689 __ bne(&done); \
690 __ isync(); \
691 } while (0)
692
675 void CodeGenerator::AssembleDeconstructFrame() { 693 void CodeGenerator::AssembleDeconstructFrame() {
676 __ LeaveFrame(StackFrame::MANUAL); 694 __ LeaveFrame(StackFrame::MANUAL);
677 } 695 }
678 696
679 void CodeGenerator::AssembleSetupStackPointer() {} 697 void CodeGenerator::AssembleSetupStackPointer() {}
680 698
681 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { 699 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
682 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); 700 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta);
683 if (sp_slot_delta > 0) { 701 if (sp_slot_delta > 0) {
684 __ Add(sp, sp, sp_slot_delta * kPointerSize, r0); 702 __ Add(sp, sp, sp_slot_delta * kPointerSize, r0);
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 #else 1596 #else
1579 UNREACHABLE(); 1597 UNREACHABLE();
1580 #endif 1598 #endif
1581 break; 1599 break;
1582 case kCheckedStoreFloat32: 1600 case kCheckedStoreFloat32:
1583 ASSEMBLE_CHECKED_STORE_FLOAT32(); 1601 ASSEMBLE_CHECKED_STORE_FLOAT32();
1584 break; 1602 break;
1585 case kCheckedStoreFloat64: 1603 case kCheckedStoreFloat64:
1586 ASSEMBLE_CHECKED_STORE_DOUBLE(); 1604 ASSEMBLE_CHECKED_STORE_DOUBLE();
1587 break; 1605 break;
1606
1607 case kAtomicLoadInt8:
1608 ASSEMBLE_ATOMIC_LOAD_INTEGER(lbz, lbzx);
1609 __ extsb(i.OutputRegister(), i.OutputRegister());
1610 break;
1611 case kAtomicLoadUint8:
1612 ASSEMBLE_ATOMIC_LOAD_INTEGER(lbz, lbzx);
1613 break;
1614 case kAtomicLoadInt16:
1615 ASSEMBLE_ATOMIC_LOAD_INTEGER(lha, lhax);
1616 break;
1617 case kAtomicLoadUint16:
1618 ASSEMBLE_ATOMIC_LOAD_INTEGER(lhz, lhzx);
1619 break;
1620 case kAtomicLoadWord32:
1621 ASSEMBLE_ATOMIC_LOAD_INTEGER(lwa, lwax);
1622 break;
1588 default: 1623 default:
1589 UNREACHABLE(); 1624 UNREACHABLE();
1590 break; 1625 break;
1591 } 1626 }
1592 } // NOLINT(readability/fn_size) 1627 } // NOLINT(readability/fn_size)
1593 1628
1594 1629
1595 // Assembles branches after an instruction. 1630 // Assembles branches after an instruction.
1596 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) { 1631 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
1597 PPCOperandConverter i(this, instr); 1632 PPCOperandConverter i(this, instr);
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 padding_size -= v8::internal::Assembler::kInstrSize; 2080 padding_size -= v8::internal::Assembler::kInstrSize;
2046 } 2081 }
2047 } 2082 }
2048 } 2083 }
2049 2084
2050 #undef __ 2085 #undef __
2051 2086
2052 } // namespace compiler 2087 } // namespace compiler
2053 } // namespace internal 2088 } // namespace internal
2054 } // namespace v8 2089 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698