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

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

Issue 596703004: [turbofan] Add backend support for float32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 3 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 | Annotate | Revision Log
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/macro-assembler-arm64.h" 7 #include "src/arm64/macro-assembler-arm64.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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 DCHECK(d1.is(i.InputDoubleRegister(1))); 369 DCHECK(d1.is(i.InputDoubleRegister(1)));
370 DCHECK(d0.is(i.OutputDoubleRegister())); 370 DCHECK(d0.is(i.OutputDoubleRegister()));
371 // TODO(dcarney): make sure this saves all relevant registers. 371 // TODO(dcarney): make sure this saves all relevant registers.
372 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), 372 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()),
373 0, 2); 373 0, 2);
374 break; 374 break;
375 } 375 }
376 case kArm64Float64Sqrt: 376 case kArm64Float64Sqrt:
377 __ Fsqrt(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 377 __ Fsqrt(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
378 break; 378 break;
379 case kArm64Float32ToFloat64:
380 __ Fcvt(i.OutputDoubleRegister(), i.InputDoubleRegister(0).S());
381 break;
382 case kArm64Float64ToFloat32:
383 __ Fcvt(i.OutputDoubleRegister().S(), i.InputDoubleRegister(0));
384 break;
379 case kArm64Float64ToInt32: 385 case kArm64Float64ToInt32:
380 __ Fcvtzs(i.OutputRegister32(), i.InputDoubleRegister(0)); 386 __ Fcvtzs(i.OutputRegister32(), i.InputDoubleRegister(0));
381 break; 387 break;
382 case kArm64Float64ToUint32: 388 case kArm64Float64ToUint32:
383 __ Fcvtzu(i.OutputRegister32(), i.InputDoubleRegister(0)); 389 __ Fcvtzu(i.OutputRegister32(), i.InputDoubleRegister(0));
384 break; 390 break;
385 case kArm64Int32ToFloat64: 391 case kArm64Int32ToFloat64:
386 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); 392 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0));
387 break; 393 break;
388 case kArm64Uint32ToFloat64: 394 case kArm64Uint32ToFloat64:
(...skipping 22 matching lines...) Expand all
411 break; 417 break;
412 case kArm64StrW: 418 case kArm64StrW:
413 __ Str(i.InputRegister32(2), i.MemoryOperand()); 419 __ Str(i.InputRegister32(2), i.MemoryOperand());
414 break; 420 break;
415 case kArm64Ldr: 421 case kArm64Ldr:
416 __ Ldr(i.OutputRegister(), i.MemoryOperand()); 422 __ Ldr(i.OutputRegister(), i.MemoryOperand());
417 break; 423 break;
418 case kArm64Str: 424 case kArm64Str:
419 __ Str(i.InputRegister(2), i.MemoryOperand()); 425 __ Str(i.InputRegister(2), i.MemoryOperand());
420 break; 426 break;
421 case kArm64LdrS: { 427 case kArm64LdrS:
422 UseScratchRegisterScope scope(masm()); 428 __ Ldr(i.OutputDoubleRegister().S(), i.MemoryOperand());
423 FPRegister scratch = scope.AcquireS();
424 __ Ldr(scratch, i.MemoryOperand());
425 __ Fcvt(i.OutputDoubleRegister(), scratch);
426 break; 429 break;
427 } 430 case kArm64StrS:
428 case kArm64StrS: { 431 __ Str(i.InputDoubleRegister(2).S(), i.MemoryOperand());
429 UseScratchRegisterScope scope(masm());
430 FPRegister scratch = scope.AcquireS();
431 __ Fcvt(scratch, i.InputDoubleRegister(2));
432 __ Str(scratch, i.MemoryOperand());
433 break; 432 break;
434 }
435 case kArm64LdrD: 433 case kArm64LdrD:
436 __ Ldr(i.OutputDoubleRegister(), i.MemoryOperand()); 434 __ Ldr(i.OutputDoubleRegister(), i.MemoryOperand());
437 break; 435 break;
438 case kArm64StrD: 436 case kArm64StrD:
439 __ Str(i.InputDoubleRegister(2), i.MemoryOperand()); 437 __ Str(i.InputDoubleRegister(2), i.MemoryOperand());
440 break; 438 break;
441 case kArm64StoreWriteBarrier: { 439 case kArm64StoreWriteBarrier: {
442 Register object = i.InputRegister(0); 440 Register object = i.InputRegister(0);
443 Register index = i.InputRegister(1); 441 Register index = i.InputRegister(1);
444 Register value = i.InputRegister(2); 442 Register value = i.InputRegister(2);
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 } 868 }
871 } 869 }
872 MarkLazyDeoptSite(); 870 MarkLazyDeoptSite();
873 } 871 }
874 872
875 #undef __ 873 #undef __
876 874
877 } // namespace compiler 875 } // namespace compiler
878 } // namespace internal 876 } // namespace internal
879 } // namespace v8 877 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm-unittest.cc ('k') | src/compiler/arm64/instruction-codes-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698