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

Side by Side Diff: src/full-codegen/s390/full-codegen-s390.cc

Issue 2220313002: S390: Decouple Add/Sub/Neg to 32/64 Bit Op (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Neg32 to use lcr Created 4 years, 4 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 | « src/compiler/s390/instruction-selector-s390.cc ('k') | src/s390/assembler-s390.h » ('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 #if V8_TARGET_ARCH_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 case Token::SHR: { 1891 case Token::SHR: {
1892 __ SmiUntag(scratch1, left); 1892 __ SmiUntag(scratch1, left);
1893 __ GetLeastBitsFromSmi(scratch2, right, 5); 1893 __ GetLeastBitsFromSmi(scratch2, right, 5);
1894 __ srl(scratch1, scratch2); 1894 __ srl(scratch1, scratch2);
1895 // Unsigned shift is not allowed to produce a negative number. 1895 // Unsigned shift is not allowed to produce a negative number.
1896 __ JumpIfNotUnsignedSmiCandidate(scratch1, r0, &stub_call); 1896 __ JumpIfNotUnsignedSmiCandidate(scratch1, r0, &stub_call);
1897 __ SmiTag(right, scratch1); 1897 __ SmiTag(right, scratch1);
1898 break; 1898 break;
1899 } 1899 }
1900 case Token::ADD: { 1900 case Token::ADD: {
1901 __ AddAndCheckForOverflow(scratch1, left, right, scratch2, r0); 1901 __ AddP(scratch1, left, right);
1902 __ BranchOnOverflow(&stub_call); 1902 __ b(overflow, &stub_call);
1903 __ LoadRR(right, scratch1); 1903 __ LoadRR(right, scratch1);
1904 break; 1904 break;
1905 } 1905 }
1906 case Token::SUB: { 1906 case Token::SUB: {
1907 __ SubAndCheckForOverflow(scratch1, left, right, scratch2, r0); 1907 __ SubP(scratch1, left, right);
1908 __ BranchOnOverflow(&stub_call); 1908 __ b(overflow, &stub_call);
1909 __ LoadRR(right, scratch1); 1909 __ LoadRR(right, scratch1);
1910 break; 1910 break;
1911 } 1911 }
1912 case Token::MUL: { 1912 case Token::MUL: {
1913 Label mul_zero; 1913 Label mul_zero;
1914 #if V8_TARGET_ARCH_S390X 1914 #if V8_TARGET_ARCH_S390X
1915 // Remove tag from both operands. 1915 // Remove tag from both operands.
1916 __ SmiUntag(ip, right); 1916 __ SmiUntag(ip, right);
1917 __ SmiUntag(scratch2, left); 1917 __ SmiUntag(scratch2, left);
1918 __ mr_z(scratch1, ip); 1918 __ mr_z(scratch1, ip);
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 case KEYED_SUPER_PROPERTY: 3187 case KEYED_SUPER_PROPERTY:
3188 __ StoreP(r2, MemOperand(sp, 3 * kPointerSize)); 3188 __ StoreP(r2, MemOperand(sp, 3 * kPointerSize));
3189 break; 3189 break;
3190 } 3190 }
3191 } 3191 }
3192 } 3192 }
3193 3193
3194 Register scratch1 = r3; 3194 Register scratch1 = r3;
3195 Register scratch2 = r4; 3195 Register scratch2 = r4;
3196 __ LoadSmiLiteral(scratch1, Smi::FromInt(count_value)); 3196 __ LoadSmiLiteral(scratch1, Smi::FromInt(count_value));
3197 __ AddAndCheckForOverflow(r2, r2, scratch1, scratch2, r0); 3197 __ AddP(scratch2, r2, scratch1);
3198 __ BranchOnNoOverflow(&done); 3198 __ LoadOnConditionP(nooverflow, r2, scratch2);
3199 __ b(nooverflow, &done);
3199 // Call stub. Undo operation first. 3200 // Call stub. Undo operation first.
3200 __ SubP(r2, r2, scratch1);
3201 __ b(&stub_call); 3201 __ b(&stub_call);
3202 __ bind(&slow); 3202 __ bind(&slow);
3203 } 3203 }
3204 3204
3205 // Convert old value into a number. 3205 // Convert old value into a number.
3206 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); 3206 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET);
3207 RestoreContext(); 3207 RestoreContext();
3208 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); 3208 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER);
3209 3209
3210 // Save result for postfix expressions. 3210 // Save result for postfix expressions.
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
3679 DCHECK(kOSRBranchInstruction == br_instr); 3679 DCHECK(kOSRBranchInstruction == br_instr);
3680 3680
3681 DCHECK(interrupt_address == 3681 DCHECK(interrupt_address ==
3682 isolate->builtins()->OnStackReplacement()->entry()); 3682 isolate->builtins()->OnStackReplacement()->entry());
3683 return ON_STACK_REPLACEMENT; 3683 return ON_STACK_REPLACEMENT;
3684 } 3684 }
3685 3685
3686 } // namespace internal 3686 } // namespace internal
3687 } // namespace v8 3687 } // namespace v8
3688 #endif // V8_TARGET_ARCH_S390 3688 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/compiler/s390/instruction-selector-s390.cc ('k') | src/s390/assembler-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698