| 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 "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 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2105     case kMips64F32x4Neg: { | 2105     case kMips64F32x4Neg: { | 
| 2106       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2106       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 
| 2107       __ bnegi_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 31); | 2107       __ bnegi_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 31); | 
| 2108       break; | 2108       break; | 
| 2109     } | 2109     } | 
| 2110     case kMips64F32x4RecipApprox: { | 2110     case kMips64F32x4RecipApprox: { | 
| 2111       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2111       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 
| 2112       __ frcp_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 2112       __ frcp_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 
| 2113       break; | 2113       break; | 
| 2114     } | 2114     } | 
| 2115     case kMips64F32x4RecipRefine: { |  | 
| 2116       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |  | 
| 2117       Simd128Register dst = i.OutputSimd128Register(); |  | 
| 2118       // Emulate with 2.0f - a * b |  | 
| 2119       __ ldi_w(kSimd128ScratchReg, 2); |  | 
| 2120       __ ffint_u_w(kSimd128ScratchReg, kSimd128ScratchReg); |  | 
| 2121       __ fmul_w(dst, i.InputSimd128Register(0), i.InputSimd128Register(1)); |  | 
| 2122       __ fsub_w(dst, kSimd128ScratchReg, dst); |  | 
| 2123       break; |  | 
| 2124     } |  | 
| 2125     case kMips64F32x4RecipSqrtApprox: { | 2115     case kMips64F32x4RecipSqrtApprox: { | 
| 2126       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2116       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 
| 2127       __ frsqrt_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 2117       __ frsqrt_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 
| 2128       break; | 2118       break; | 
| 2129     } | 2119     } | 
| 2130     case kMips64F32x4RecipSqrtRefine: { |  | 
| 2131       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |  | 
| 2132       Simd128Register dst = i.OutputSimd128Register(); |  | 
| 2133       // Emulate with (3.0f - a * b) * 0.5f; |  | 
| 2134       __ ldi_w(kSimd128ScratchReg, 3); |  | 
| 2135       __ ffint_u_w(kSimd128ScratchReg, kSimd128ScratchReg); |  | 
| 2136       __ fmul_w(dst, i.InputSimd128Register(0), i.InputSimd128Register(1)); |  | 
| 2137       __ fsub_w(dst, kSimd128ScratchReg, dst); |  | 
| 2138       __ ldi_w(kSimd128ScratchReg, 0x3f); |  | 
| 2139       __ slli_w(kSimd128ScratchReg, kSimd128ScratchReg, 24); |  | 
| 2140       __ fmul_w(dst, dst, kSimd128ScratchReg); |  | 
| 2141       break; |  | 
| 2142     } |  | 
| 2143     case kMips64F32x4Add: { | 2120     case kMips64F32x4Add: { | 
| 2144       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2121       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 
| 2145       __ fadd_w(i.OutputSimd128Register(), i.InputSimd128Register(0), | 2122       __ fadd_w(i.OutputSimd128Register(), i.InputSimd128Register(0), | 
| 2146                 i.InputSimd128Register(1)); | 2123                 i.InputSimd128Register(1)); | 
| 2147       break; | 2124       break; | 
| 2148     } | 2125     } | 
| 2149     case kMips64F32x4Sub: { | 2126     case kMips64F32x4Sub: { | 
| 2150       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2127       CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 
| 2151       __ fsub_w(i.OutputSimd128Register(), i.InputSimd128Register(0), | 2128       __ fsub_w(i.OutputSimd128Register(), i.InputSimd128Register(0), | 
| 2152                 i.InputSimd128Register(1)); | 2129                 i.InputSimd128Register(1)); | 
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2963       padding_size -= v8::internal::Assembler::kInstrSize; | 2940       padding_size -= v8::internal::Assembler::kInstrSize; | 
| 2964     } | 2941     } | 
| 2965   } | 2942   } | 
| 2966 } | 2943 } | 
| 2967 | 2944 | 
| 2968 #undef __ | 2945 #undef __ | 
| 2969 | 2946 | 
| 2970 }  // namespace compiler | 2947 }  // namespace compiler | 
| 2971 }  // namespace internal | 2948 }  // namespace internal | 
| 2972 }  // namespace v8 | 2949 }  // namespace v8 | 
| OLD | NEW | 
|---|