Chromium Code Reviews| 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/compiler/code-generator-impl.h" | 6 #include "src/compiler/code-generator-impl.h" |
| 7 #include "src/compiler/gap-resolver.h" | 7 #include "src/compiler/gap-resolver.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/mips/macro-assembler-mips.h" | 9 #include "src/mips/macro-assembler-mips.h" |
| 10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 678 __ trunc_w_d(scratch, i.InputDoubleRegister(0)); | 678 __ trunc_w_d(scratch, i.InputDoubleRegister(0)); |
| 679 __ mfc1(i.OutputRegister(), scratch); | 679 __ mfc1(i.OutputRegister(), scratch); |
| 680 break; | 680 break; |
| 681 } | 681 } |
| 682 case kMips64TruncUwD: { | 682 case kMips64TruncUwD: { |
| 683 FPURegister scratch = kScratchDoubleReg; | 683 FPURegister scratch = kScratchDoubleReg; |
| 684 // TODO(plind): Fix wrong param order of Trunc_uw_d() macro-asm function. | 684 // TODO(plind): Fix wrong param order of Trunc_uw_d() macro-asm function. |
| 685 __ Trunc_uw_d(i.InputDoubleRegister(0), i.OutputRegister(), scratch); | 685 __ Trunc_uw_d(i.InputDoubleRegister(0), i.OutputRegister(), scratch); |
| 686 break; | 686 break; |
| 687 } | 687 } |
| 688 case kMips64FmoveLowUwD: | |
| 689 __ FmoveLow(i.OutputRegister(), i.InputDoubleRegister(0)); | |
| 690 // remove sign. | |
| 691 __ li(at, Operand(32)); | |
| 692 __ dsllv(i.OutputRegister(), i.OutputRegister(), at); | |
| 693 __ dsrlv(i.OutputRegister(), i.OutputRegister(), at); | |
|
paul.l...
2015/03/05 17:40:48
You can avoid the load and use of 'at' register he
balazs.kilvady
2015/03/05 18:07:08
Thanks, I modify it. Anyway test are passed withou
paul.l...
2015/03/05 18:43:49
Let's leave the shifts to strip sign extension for
| |
| 694 break; | |
| 695 case kMips64FmoveLowDUw: | |
| 696 __ FmoveLow(i.OutputDoubleRegister(), i.InputRegister(1)); | |
| 697 break; | |
| 698 case kMips64FmoveHighUwD: | |
| 699 __ FmoveHigh(i.OutputRegister(), i.InputDoubleRegister(0)); | |
| 700 break; | |
| 701 case kMips64FmoveHighDUw: | |
| 702 __ FmoveHigh(i.OutputDoubleRegister(), i.InputRegister(1)); | |
| 703 break; | |
| 688 // ... more basic instructions ... | 704 // ... more basic instructions ... |
| 689 | 705 |
| 690 case kMips64Lbu: | 706 case kMips64Lbu: |
| 691 __ lbu(i.OutputRegister(), i.MemoryOperand()); | 707 __ lbu(i.OutputRegister(), i.MemoryOperand()); |
| 692 break; | 708 break; |
| 693 case kMips64Lb: | 709 case kMips64Lb: |
| 694 __ lb(i.OutputRegister(), i.MemoryOperand()); | 710 __ lb(i.OutputRegister(), i.MemoryOperand()); |
| 695 break; | 711 break; |
| 696 case kMips64Sb: | 712 case kMips64Sb: |
| 697 __ sb(i.InputRegister(2), i.MemoryOperand()); | 713 __ sb(i.InputRegister(2), i.MemoryOperand()); |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1365 } | 1381 } |
| 1366 } | 1382 } |
| 1367 MarkLazyDeoptSite(); | 1383 MarkLazyDeoptSite(); |
| 1368 } | 1384 } |
| 1369 | 1385 |
| 1370 #undef __ | 1386 #undef __ |
| 1371 | 1387 |
| 1372 } // namespace compiler | 1388 } // namespace compiler |
| 1373 } // namespace internal | 1389 } // namespace internal |
| 1374 } // namespace v8 | 1390 } // namespace v8 |
| OLD | NEW |