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

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

Issue 2753903004: MIPS[64]: Support for some SIMD operations (Closed)
Patch Set: rebased Created 3 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
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 #include "src/compilation-info.h" 6 #include "src/compilation-info.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 case kAtomicCompareExchangeUint8: 1925 case kAtomicCompareExchangeUint8:
1926 case kAtomicCompareExchangeInt16: 1926 case kAtomicCompareExchangeInt16:
1927 case kAtomicCompareExchangeUint16: 1927 case kAtomicCompareExchangeUint16:
1928 case kAtomicCompareExchangeWord32: 1928 case kAtomicCompareExchangeWord32:
1929 UNREACHABLE(); 1929 UNREACHABLE();
1930 break; 1930 break;
1931 case kMips64AssertEqual: 1931 case kMips64AssertEqual:
1932 __ Assert(eq, static_cast<BailoutReason>(i.InputOperand(2).immediate()), 1932 __ Assert(eq, static_cast<BailoutReason>(i.InputOperand(2).immediate()),
1933 i.InputRegister(0), Operand(i.InputRegister(1))); 1933 i.InputRegister(0), Operand(i.InputRegister(1)));
1934 break; 1934 break;
1935 case kMips64S128Zero: {
1936 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1937 __ xor_v(i.OutputSimd128Register(), i.OutputSimd128Register(),
1938 i.OutputSimd128Register());
1939 break;
1940 }
1941 case kMips64I32x4Splat: {
1942 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1943 __ fill_w(i.OutputSimd128Register(), i.InputRegister(0));
1944 break;
1945 }
1946 case kMips64I32x4ExtractLane: {
1947 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1948 __ copy_s_w(i.OutputRegister(), i.InputSimd128Register(0),
1949 i.InputInt8(1));
1950 break;
1951 }
1952 case kMips64I32x4ReplaceLane: {
1953 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1954 Simd128Register src = i.InputSimd128Register(0);
1955 Simd128Register dst = i.OutputSimd128Register();
1956 if (!src.is(dst)) {
1957 __ move_v(dst, src);
1958 }
1959 __ insert_w(dst, i.InputInt8(1), i.InputRegister(2));
1960 break;
1961 }
1962 case kMips64I32x4Add: {
1963 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1964 __ addv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1965 i.InputSimd128Register(1));
1966 break;
1967 }
1968 case kMips64I32x4Sub: {
1969 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1970 __ subv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1971 i.InputSimd128Register(1));
1972 break;
1973 }
1935 } 1974 }
1936 return kSuccess; 1975 return kSuccess;
1937 } // NOLINT(readability/fn_size) 1976 } // NOLINT(readability/fn_size)
1938 1977
1939 1978
1940 #define UNSUPPORTED_COND(opcode, condition) \ 1979 #define UNSUPPORTED_COND(opcode, condition) \
1941 OFStream out(stdout); \ 1980 OFStream out(stdout); \
1942 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 1981 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
1943 UNIMPLEMENTED(); 1982 UNIMPLEMENTED();
1944 1983
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 padding_size -= v8::internal::Assembler::kInstrSize; 2730 padding_size -= v8::internal::Assembler::kInstrSize;
2692 } 2731 }
2693 } 2732 }
2694 } 2733 }
2695 2734
2696 #undef __ 2735 #undef __
2697 2736
2698 } // namespace compiler 2737 } // namespace compiler
2699 } // namespace internal 2738 } // namespace internal
2700 } // namespace v8 2739 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698