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

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

Issue 1947833002: X87: [Atomics] Make Atomics.store a builtin using TF. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/x87/instruction-codes-x87.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 break; 1691 break;
1692 case kX87Poke: { 1692 case kX87Poke: {
1693 int const slot = MiscField::decode(instr->opcode()); 1693 int const slot = MiscField::decode(instr->opcode());
1694 if (HasImmediateInput(instr, 0)) { 1694 if (HasImmediateInput(instr, 0)) {
1695 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); 1695 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0));
1696 } else { 1696 } else {
1697 __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0)); 1697 __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0));
1698 } 1698 }
1699 break; 1699 break;
1700 } 1700 }
1701 case kX87Xchgb: {
1702 size_t index = 0;
1703 Operand operand = i.MemoryOperand(&index);
1704 __ xchg_b(i.InputRegister(index), operand);
1705 break;
1706 }
1707 case kX87Xchgw: {
1708 size_t index = 0;
1709 Operand operand = i.MemoryOperand(&index);
1710 __ xchg_w(i.InputRegister(index), operand);
1711 break;
1712 }
1713 case kX87Xchgl: {
1714 size_t index = 0;
1715 Operand operand = i.MemoryOperand(&index);
1716 __ xchg(i.InputRegister(index), operand);
1717 break;
1718 }
1701 case kX87PushFloat32: 1719 case kX87PushFloat32:
1702 __ lea(esp, Operand(esp, -kFloatSize)); 1720 __ lea(esp, Operand(esp, -kFloatSize));
1703 if (instr->InputAt(0)->IsDoubleStackSlot()) { 1721 if (instr->InputAt(0)->IsDoubleStackSlot()) {
1704 __ fld_s(i.InputOperand(0)); 1722 __ fld_s(i.InputOperand(0));
1705 __ fstp_s(MemOperand(esp, 0)); 1723 __ fstp_s(MemOperand(esp, 0));
1706 } else if (instr->InputAt(0)->IsDoubleRegister()) { 1724 } else if (instr->InputAt(0)->IsDoubleRegister()) {
1707 __ fst_s(MemOperand(esp, 0)); 1725 __ fst_s(MemOperand(esp, 0));
1708 } else { 1726 } else {
1709 UNREACHABLE(); 1727 UNREACHABLE();
1710 } 1728 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 } 1782 }
1765 case kCheckedLoadWord64: 1783 case kCheckedLoadWord64:
1766 case kCheckedStoreWord64: 1784 case kCheckedStoreWord64:
1767 UNREACHABLE(); // currently unsupported checked int64 load/store. 1785 UNREACHABLE(); // currently unsupported checked int64 load/store.
1768 break; 1786 break;
1769 case kAtomicLoadInt8: 1787 case kAtomicLoadInt8:
1770 case kAtomicLoadUint8: 1788 case kAtomicLoadUint8:
1771 case kAtomicLoadInt16: 1789 case kAtomicLoadInt16:
1772 case kAtomicLoadUint16: 1790 case kAtomicLoadUint16:
1773 case kAtomicLoadWord32: 1791 case kAtomicLoadWord32:
1792 case kAtomicStoreWord8:
1793 case kAtomicStoreWord16:
1794 case kAtomicStoreWord32:
1774 UNREACHABLE(); // Won't be generated by instruction selector. 1795 UNREACHABLE(); // Won't be generated by instruction selector.
1775 break; 1796 break;
1776 } 1797 }
1777 return kSuccess; 1798 return kSuccess;
1778 } // NOLINT(readability/fn_size) 1799 } // NOLINT(readability/fn_size)
1779 1800
1780 1801
1781 // Assembles a branch after an instruction. 1802 // Assembles a branch after an instruction.
1782 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) { 1803 void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
1783 X87OperandConverter i(this, instr); 1804 X87OperandConverter i(this, instr);
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2489 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2469 __ Nop(padding_size); 2490 __ Nop(padding_size);
2470 } 2491 }
2471 } 2492 }
2472 2493
2473 #undef __ 2494 #undef __
2474 2495
2475 } // namespace compiler 2496 } // namespace compiler
2476 } // namespace internal 2497 } // namespace internal
2477 } // namespace v8 2498 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/x87/instruction-codes-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698