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

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

Issue 2622073006: s390: optimize TF to use tmll and fix tmll sim (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | src/compiler/s390/instruction-selector-s390.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compilation-info.h" 7 #include "src/compilation-info.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 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 break; 1668 break;
1669 #endif 1669 #endif
1670 case kS390_CmpFloat: 1670 case kS390_CmpFloat:
1671 __ cebr(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); 1671 __ cebr(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
1672 break; 1672 break;
1673 case kS390_CmpDouble: 1673 case kS390_CmpDouble:
1674 __ cdbr(i.InputDoubleRegister(0), i.InputDoubleRegister(1)); 1674 __ cdbr(i.InputDoubleRegister(0), i.InputDoubleRegister(1));
1675 break; 1675 break;
1676 case kS390_Tst32: 1676 case kS390_Tst32:
1677 if (HasRegisterInput(instr, 1)) { 1677 if (HasRegisterInput(instr, 1)) {
1678 __ AndP(r0, i.InputRegister(0), i.InputRegister(1)); 1678 __ lr(r0, i.InputRegister(0));
1679 __ nr(r0, i.InputRegister(1));
1679 } else { 1680 } else {
1680 __ AndP(r0, i.InputRegister(0), i.InputImmediate(1)); 1681 Operand opnd = i.InputImmediate(1);
1682 if (is_uint16(opnd.immediate())) {
1683 __ tmll(i.InputRegister(0), opnd);
1684 } else {
1685 __ lr(r0, i.InputRegister(0));
1686 __ nilf(r0, opnd);
1687 }
1681 } 1688 }
1682 __ LoadAndTestP_ExtendSrc(r0, r0);
1683 break; 1689 break;
1684 #if V8_TARGET_ARCH_S390X
1685 case kS390_Tst64: 1690 case kS390_Tst64:
1686 if (HasRegisterInput(instr, 1)) { 1691 if (HasRegisterInput(instr, 1)) {
1687 __ AndP(r0, i.InputRegister(0), i.InputRegister(1)); 1692 __ AndP(r0, i.InputRegister(0), i.InputRegister(1));
1688 } else { 1693 } else {
1689 __ AndP(r0, i.InputRegister(0), i.InputImmediate(1)); 1694 Operand opnd = i.InputImmediate(1);
1695 if (is_uint16(opnd.immediate())) {
1696 __ tmll(i.InputRegister(0), opnd);
1697 } else {
1698 __ AndP(r0, i.InputRegister(0), opnd);
1699 }
1690 } 1700 }
1691 break; 1701 break;
1692 #endif
1693 case kS390_Float64SilenceNaN: { 1702 case kS390_Float64SilenceNaN: {
1694 DoubleRegister value = i.InputDoubleRegister(0); 1703 DoubleRegister value = i.InputDoubleRegister(0);
1695 DoubleRegister result = i.OutputDoubleRegister(); 1704 DoubleRegister result = i.OutputDoubleRegister();
1696 __ CanonicalizeNaN(result, value); 1705 __ CanonicalizeNaN(result, value);
1697 break; 1706 break;
1698 } 1707 }
1699 case kS390_Push: 1708 case kS390_Push:
1700 if (instr->InputAt(0)->IsFPRegister()) { 1709 if (instr->InputAt(0)->IsFPRegister()) {
1701 __ lay(sp, MemOperand(sp, -kDoubleSize)); 1710 __ lay(sp, MemOperand(sp, -kDoubleSize));
1702 __ StoreDouble(i.InputDoubleRegister(0), MemOperand(sp)); 1711 __ StoreDouble(i.InputDoubleRegister(0), MemOperand(sp));
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 padding_size -= 2; 2571 padding_size -= 2;
2563 } 2572 }
2564 } 2573 }
2565 } 2574 }
2566 2575
2567 #undef __ 2576 #undef __
2568 2577
2569 } // namespace compiler 2578 } // namespace compiler
2570 } // namespace internal 2579 } // namespace internal
2571 } // namespace v8 2580 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/s390/instruction-selector-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698