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

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

Issue 1537973002: MIPS: Fix uninitialized upper word bits for Cvt_d_uw macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | test/cctest/test-assembler-mips.cc » ('j') | test/cctest/test-assembler-mips.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Copyright 2012 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
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_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 and_(at, rt, at); 1262 and_(at, rt, at);
1263 or_(rt, t8, at); 1263 or_(rt, t8, at);
1264 } 1264 }
1265 } 1265 }
1266 1266
1267 1267
1268 void MacroAssembler::Cvt_d_uw(FPURegister fd, Register rs, 1268 void MacroAssembler::Cvt_d_uw(FPURegister fd, Register rs,
1269 FPURegister scratch) { 1269 FPURegister scratch) {
1270 // In FP64Mode we do convertion from long. 1270 // In FP64Mode we do convertion from long.
1271 if (IsFp64Mode()) { 1271 if (IsFp64Mode()) {
1272 mtc1(rs, scratch); 1272 mtc1(rs, scratch);
ivica.bogosavljevic 2015/12/18 15:07:56 After mtc1, upper 32 bits of the register are unpr
1273 Mthc1(zero_reg, scratch);
1273 cvt_d_l(fd, scratch); 1274 cvt_d_l(fd, scratch);
1274 } else { 1275 } else {
1275 // Convert rs to a FP value in fd. 1276 // Convert rs to a FP value in fd.
1276 DCHECK(!fd.is(scratch)); 1277 DCHECK(!fd.is(scratch));
1277 DCHECK(!rs.is(at)); 1278 DCHECK(!rs.is(at));
1278 1279
1279 Label msb_clear, conversion_done; 1280 Label msb_clear, conversion_done;
1280 // For a value which is < 2^31, regard it as a signed positve word. 1281 // For a value which is < 2^31, regard it as a signed positve word.
1281 Branch(&msb_clear, ge, rs, Operand(zero_reg), USE_DELAY_SLOT); 1282 Branch(&msb_clear, ge, rs, Operand(zero_reg), USE_DELAY_SLOT);
1282 mtc1(rs, fd); 1283 mtc1(rs, fd);
(...skipping 4580 matching lines...) Expand 10 before | Expand all | Expand 10 after
5863 if (mag.shift > 0) sra(result, result, mag.shift); 5864 if (mag.shift > 0) sra(result, result, mag.shift);
5864 srl(at, dividend, 31); 5865 srl(at, dividend, 31);
5865 Addu(result, result, Operand(at)); 5866 Addu(result, result, Operand(at));
5866 } 5867 }
5867 5868
5868 5869
5869 } // namespace internal 5870 } // namespace internal
5870 } // namespace v8 5871 } // namespace v8
5871 5872
5872 #endif // V8_TARGET_ARCH_MIPS 5873 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-assembler-mips.cc » ('j') | test/cctest/test-assembler-mips.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698