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

Side by Side Diff: src/compiler/mips64/instruction-selector-mips64.cc

Issue 1902433003: [Atomics] Remove Atomics code stubs; use TF ops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix mips compile 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 | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/opcodes.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 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1956 1956
1957 1957
1958 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) { 1958 void InstructionSelector::VisitFloat64InsertHighWord32(Node* node) {
1959 Mips64OperandGenerator g(this); 1959 Mips64OperandGenerator g(this);
1960 Node* left = node->InputAt(0); 1960 Node* left = node->InputAt(0);
1961 Node* right = node->InputAt(1); 1961 Node* right = node->InputAt(1);
1962 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node), 1962 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node),
1963 g.UseRegister(left), g.UseRegister(right)); 1963 g.UseRegister(left), g.UseRegister(right));
1964 } 1964 }
1965 1965
1966 void InstructionSelector::VisitAtomicLoad(Node* node) {
1967 LoadRepresentation load_rep = LoadRepresentationOf(node->op());
1968 Mips64OperandGenerator g(this);
1969 Node* base = node->InputAt(0);
1970 Node* index = node->InputAt(1);
1971 ArchOpcode opcode = kArchNop;
1972 switch (load_rep.representation()) {
1973 case MachineRepresentation::kWord8:
1974 opcode = load_rep.IsSigned() ? kAtomicLoadInt8 : kAtomicLoadUint8;
1975 break;
1976 case MachineRepresentation::kWord16:
1977 opcode = load_rep.IsSigned() ? kAtomicLoadInt16 : kAtomicLoadUint16;
1978 break;
1979 case MachineRepresentation::kWord32:
1980 opcode = kAtomicLoadWord32;
1981 break;
1982 default:
1983 UNREACHABLE();
1984 return;
1985 }
1986 Emit(opcode | AddressingModeField::encode(kMode_MRI),
1987 g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(index));
1988 }
1966 1989
1967 // static 1990 // static
1968 MachineOperatorBuilder::Flags 1991 MachineOperatorBuilder::Flags
1969 InstructionSelector::SupportedMachineOperatorFlags() { 1992 InstructionSelector::SupportedMachineOperatorFlags() {
1970 return MachineOperatorBuilder::kWord32Ctz | 1993 return MachineOperatorBuilder::kWord32Ctz |
1971 MachineOperatorBuilder::kWord64Ctz | 1994 MachineOperatorBuilder::kWord64Ctz |
1972 MachineOperatorBuilder::kWord32Popcnt | 1995 MachineOperatorBuilder::kWord32Popcnt |
1973 MachineOperatorBuilder::kWord64Popcnt | 1996 MachineOperatorBuilder::kWord64Popcnt |
1974 MachineOperatorBuilder::kWord32ShiftIsSafe | 1997 MachineOperatorBuilder::kWord32ShiftIsSafe |
1975 MachineOperatorBuilder::kInt32DivIsSafe | 1998 MachineOperatorBuilder::kInt32DivIsSafe |
1976 MachineOperatorBuilder::kUint32DivIsSafe | 1999 MachineOperatorBuilder::kUint32DivIsSafe |
1977 MachineOperatorBuilder::kFloat64Min | 2000 MachineOperatorBuilder::kFloat64Min |
1978 MachineOperatorBuilder::kFloat64Max | 2001 MachineOperatorBuilder::kFloat64Max |
1979 MachineOperatorBuilder::kFloat32Min | 2002 MachineOperatorBuilder::kFloat32Min |
1980 MachineOperatorBuilder::kFloat32Max | 2003 MachineOperatorBuilder::kFloat32Max |
1981 MachineOperatorBuilder::kFloat64RoundDown | 2004 MachineOperatorBuilder::kFloat64RoundDown |
1982 MachineOperatorBuilder::kFloat32RoundDown | 2005 MachineOperatorBuilder::kFloat32RoundDown |
1983 MachineOperatorBuilder::kFloat64RoundUp | 2006 MachineOperatorBuilder::kFloat64RoundUp |
1984 MachineOperatorBuilder::kFloat32RoundUp | 2007 MachineOperatorBuilder::kFloat32RoundUp |
1985 MachineOperatorBuilder::kFloat64RoundTruncate | 2008 MachineOperatorBuilder::kFloat64RoundTruncate |
1986 MachineOperatorBuilder::kFloat32RoundTruncate | 2009 MachineOperatorBuilder::kFloat32RoundTruncate |
1987 MachineOperatorBuilder::kFloat64RoundTiesEven | 2010 MachineOperatorBuilder::kFloat64RoundTiesEven |
1988 MachineOperatorBuilder::kFloat32RoundTiesEven; 2011 MachineOperatorBuilder::kFloat32RoundTiesEven;
1989 } 2012 }
1990 2013
1991 } // namespace compiler 2014 } // namespace compiler
1992 } // namespace internal 2015 } // namespace internal
1993 } // namespace v8 2016 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698