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

Side by Side Diff: src/s390/code-stubs-s390.cc

Issue 2744123002: s390: Fix to use correct compare instruction (Closed)
Patch Set: fixed other cmp instr Created 3 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #if V8_TARGET_ARCH_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3408 matching lines...) Expand 10 before | Expand all | Expand 10 after
3419 __ b(&ok, Label::kNear); 3419 __ b(&ok, Label::kNear);
3420 __ Abort(kInvalidFrameForFastNewRestArgumentsStub); 3420 __ Abort(kInvalidFrameForFastNewRestArgumentsStub);
3421 __ bind(&ok); 3421 __ bind(&ok);
3422 } 3422 }
3423 3423
3424 // Check if we have rest parameters (only possible if we have an 3424 // Check if we have rest parameters (only possible if we have an
3425 // arguments adaptor frame below the function frame). 3425 // arguments adaptor frame below the function frame).
3426 Label no_rest_parameters; 3426 Label no_rest_parameters;
3427 __ LoadP(r4, MemOperand(r4, StandardFrameConstants::kCallerFPOffset)); 3427 __ LoadP(r4, MemOperand(r4, StandardFrameConstants::kCallerFPOffset));
3428 __ LoadP(ip, MemOperand(r4, CommonFrameConstants::kContextOrFrameTypeOffset)); 3428 __ LoadP(ip, MemOperand(r4, CommonFrameConstants::kContextOrFrameTypeOffset));
3429 __ CmpSmiLiteral(ip, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); 3429 __ LoadSmiLiteral(r0, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
3430 __ CmpP(ip, r0);
3430 __ bne(&no_rest_parameters); 3431 __ bne(&no_rest_parameters);
3431 3432
3432 // Check if the arguments adaptor frame contains more arguments than 3433 // Check if the arguments adaptor frame contains more arguments than
3433 // specified by the function's internal formal parameter count. 3434 // specified by the function's internal formal parameter count.
3434 Label rest_parameters; 3435 Label rest_parameters;
3435 __ LoadP(r2, MemOperand(r4, ArgumentsAdaptorFrameConstants::kLengthOffset)); 3436 __ LoadP(r2, MemOperand(r4, ArgumentsAdaptorFrameConstants::kLengthOffset));
3436 __ LoadP(r5, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); 3437 __ LoadP(r5, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
3437 __ LoadW( 3438 __ LoadW(
3438 r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset)); 3439 r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset));
3439 #if V8_TARGET_ARCH_S390X 3440 #if V8_TARGET_ARCH_S390X
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
3829 __ CmpP(ip, r3); 3830 __ CmpP(ip, r3);
3830 __ beq(&ok, Label::kNear); 3831 __ beq(&ok, Label::kNear);
3831 __ Abort(kInvalidFrameForFastNewRestArgumentsStub); 3832 __ Abort(kInvalidFrameForFastNewRestArgumentsStub);
3832 __ bind(&ok); 3833 __ bind(&ok);
3833 } 3834 }
3834 3835
3835 // Check if we have an arguments adaptor frame below the function frame. 3836 // Check if we have an arguments adaptor frame below the function frame.
3836 Label arguments_adaptor, arguments_done; 3837 Label arguments_adaptor, arguments_done;
3837 __ LoadP(r5, MemOperand(r4, StandardFrameConstants::kCallerFPOffset)); 3838 __ LoadP(r5, MemOperand(r4, StandardFrameConstants::kCallerFPOffset));
3838 __ LoadP(ip, MemOperand(r5, CommonFrameConstants::kContextOrFrameTypeOffset)); 3839 __ LoadP(ip, MemOperand(r5, CommonFrameConstants::kContextOrFrameTypeOffset));
3839 __ CmpSmiLiteral(ip, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); 3840 __ LoadSmiLiteral(r0, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
3841 __ CmpP(ip, r0);
3840 __ beq(&arguments_adaptor); 3842 __ beq(&arguments_adaptor);
3841 { 3843 {
3842 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); 3844 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
3843 __ LoadW(r2, FieldMemOperand( 3845 __ LoadW(r2, FieldMemOperand(
3844 r6, SharedFunctionInfo::kFormalParameterCountOffset)); 3846 r6, SharedFunctionInfo::kFormalParameterCountOffset));
3845 #if V8_TARGET_ARCH_S390X 3847 #if V8_TARGET_ARCH_S390X
3846 __ SmiTag(r2); 3848 __ SmiTag(r2);
3847 #endif 3849 #endif
3848 __ SmiToPtrArrayOffset(r8, r2); 3850 __ SmiToPtrArrayOffset(r8, r2);
3849 __ AddP(r4, r4, r8); 3851 __ AddP(r4, r4, r8);
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
4273 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 4275 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
4274 kStackUnwindSpace, NULL, return_value_operand, NULL); 4276 kStackUnwindSpace, NULL, return_value_operand, NULL);
4275 } 4277 }
4276 4278
4277 #undef __ 4279 #undef __
4278 4280
4279 } // namespace internal 4281 } // namespace internal
4280 } // namespace v8 4282 } // namespace v8
4281 4283
4282 #endif // V8_TARGET_ARCH_S390 4284 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698