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

Side by Side Diff: src/s390/macro-assembler-s390.cc

Issue 1865443002: S390: Fix LA overflow in return sequence (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: get ride of r0 Created 4 years, 8 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 #include <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_S390 8 #if V8_TARGET_ARCH_S390
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 int expected_size = CallSize(code, rmode, ast_id, cond); 147 int expected_size = CallSize(code, rmode, ast_id, cond);
148 Label start; 148 Label start;
149 bind(&start); 149 bind(&start);
150 #endif 150 #endif
151 call(code, rmode, ast_id); 151 call(code, rmode, ast_id);
152 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); 152 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start));
153 } 153 }
154 154
155 void MacroAssembler::Drop(int count) { 155 void MacroAssembler::Drop(int count) {
156 if (count > 0) { 156 if (count > 0) {
157 la(sp, MemOperand(sp, count * kPointerSize)); 157 int total = count * kPointerSize;
158 if (is_uint12(total)) {
159 la(sp, MemOperand(sp, total));
160 } else if (is_int20(total)) {
161 lay(sp, MemOperand(sp, total));
162 } else {
163 AddP(sp, Operand(total));
164 }
158 } 165 }
159 } 166 }
160 167
161 void MacroAssembler::Drop(Register count, Register scratch) { 168 void MacroAssembler::Drop(Register count, Register scratch) {
162 ShiftLeftP(scratch, count, Operand(kPointerSizeLog2)); 169 ShiftLeftP(scratch, count, Operand(kPointerSizeLog2));
163 AddP(sp, sp, scratch); 170 AddP(sp, sp, scratch);
164 } 171 }
165 172
166 void MacroAssembler::Call(Label* target) { b(r14, target); } 173 void MacroAssembler::Call(Label* target) { b(r14, target); }
167 174
(...skipping 5229 matching lines...) Expand 10 before | Expand all | Expand 10 after
5397 } 5404 }
5398 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); 5405 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift));
5399 ExtractBit(r0, dividend, 31); 5406 ExtractBit(r0, dividend, 31);
5400 AddP(result, r0); 5407 AddP(result, r0);
5401 } 5408 }
5402 5409
5403 } // namespace internal 5410 } // namespace internal
5404 } // namespace v8 5411 } // namespace v8
5405 5412
5406 #endif // V8_TARGET_ARCH_S390 5413 #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