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

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

Issue 2011303002: [arm] [arm64] Add optional operators Float32Neg and Float64Neg. (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
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/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 break; 1176 break;
1177 case kArm64Float32Min: 1177 case kArm64Float32Min:
1178 // (a < b) ? a : b 1178 // (a < b) ? a : b
1179 __ Fcmp(i.InputFloat32Register(0), i.InputFloat32Register(1)); 1179 __ Fcmp(i.InputFloat32Register(0), i.InputFloat32Register(1));
1180 __ Fcsel(i.OutputFloat32Register(), i.InputFloat32Register(0), 1180 __ Fcsel(i.OutputFloat32Register(), i.InputFloat32Register(0),
1181 i.InputFloat32Register(1), lo); 1181 i.InputFloat32Register(1), lo);
1182 break; 1182 break;
1183 case kArm64Float32Abs: 1183 case kArm64Float32Abs:
1184 __ Fabs(i.OutputFloat32Register(), i.InputFloat32Register(0)); 1184 __ Fabs(i.OutputFloat32Register(), i.InputFloat32Register(0));
1185 break; 1185 break;
1186 case kArm64Float32Neg:
1187 __ Fneg(i.OutputFloat32Register(), i.InputFloat32Register(0));
1188 break;
1186 case kArm64Float32Sqrt: 1189 case kArm64Float32Sqrt:
1187 __ Fsqrt(i.OutputFloat32Register(), i.InputFloat32Register(0)); 1190 __ Fsqrt(i.OutputFloat32Register(), i.InputFloat32Register(0));
1188 break; 1191 break;
1189 case kArm64Float64Cmp: 1192 case kArm64Float64Cmp:
1190 if (instr->InputAt(1)->IsFPRegister()) { 1193 if (instr->InputAt(1)->IsFPRegister()) {
1191 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); 1194 __ Fcmp(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
1192 } else { 1195 } else {
1193 DCHECK(instr->InputAt(1)->IsImmediate()); 1196 DCHECK(instr->InputAt(1)->IsImmediate());
1194 // 0.0 is the only immediate supported by fcmp instructions. 1197 // 0.0 is the only immediate supported by fcmp instructions.
1195 DCHECK(i.InputDouble(1) == 0.0); 1198 DCHECK(i.InputDouble(1) == 0.0);
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 padding_size -= kInstructionSize; 1905 padding_size -= kInstructionSize;
1903 } 1906 }
1904 } 1907 }
1905 } 1908 }
1906 1909
1907 #undef __ 1910 #undef __
1908 1911
1909 } // namespace compiler 1912 } // namespace compiler
1910 } // namespace internal 1913 } // namespace internal
1911 } // namespace v8 1914 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/arm64/instruction-codes-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698