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

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

Issue 2696343002: s390: optimize for compares (Closed)
Patch Set: add todo Created 3 years, 10 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/s390/disasm-s390.cc ('k') | src/s390/simulator-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 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 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3324 3324
3325 #define Generate_Mul32WithOverflowIfCCUnequal(instr) \ 3325 #define Generate_Mul32WithOverflowIfCCUnequal(instr) \
3326 { \ 3326 { \
3327 lgfr(dst, src1); \ 3327 lgfr(dst, src1); \
3328 instr(dst, src2); \ 3328 instr(dst, src2); \
3329 cgfr(dst, dst); \ 3329 cgfr(dst, dst); \
3330 } 3330 }
3331 3331
3332 void MacroAssembler::Mul32WithOverflowIfCCUnequal(Register dst, Register src1, 3332 void MacroAssembler::Mul32WithOverflowIfCCUnequal(Register dst, Register src1,
3333 const MemOperand& src2) { 3333 const MemOperand& src2) {
3334 Register result = dst;
3335 if (src2.rx().is(dst) || src2.rb().is(dst)) dst = r0;
3334 Generate_Mul32WithOverflowIfCCUnequal(msgf); 3336 Generate_Mul32WithOverflowIfCCUnequal(msgf);
3337 if (!result.is(dst)) llgfr(result, dst);
3335 } 3338 }
3336 3339
3337 void MacroAssembler::Mul32WithOverflowIfCCUnequal(Register dst, Register src1, 3340 void MacroAssembler::Mul32WithOverflowIfCCUnequal(Register dst, Register src1,
3338 Register src2) { 3341 Register src2) {
3339 if (dst.is(src2)) { 3342 if (dst.is(src2)) {
3340 std::swap(src1, src2); 3343 std::swap(src1, src2);
3341 } 3344 }
3342 Generate_Mul32WithOverflowIfCCUnequal(msgfr); 3345 Generate_Mul32WithOverflowIfCCUnequal(msgfr);
3343 } 3346 }
3344 3347
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
5352 } 5355 }
5353 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); 5356 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift));
5354 ExtractBit(r0, dividend, 31); 5357 ExtractBit(r0, dividend, 31);
5355 AddP(result, r0); 5358 AddP(result, r0);
5356 } 5359 }
5357 5360
5358 } // namespace internal 5361 } // namespace internal
5359 } // namespace v8 5362 } // namespace v8
5360 5363
5361 #endif // V8_TARGET_ARCH_S390 5364 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/s390/disasm-s390.cc ('k') | src/s390/simulator-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698