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

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

Issue 1659883002: Reland of MIPS: Add FPXX support to MIPS32R2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix failure in RunFloat64InsertLowWord32 test Created 4 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/mips/constants-mips.h ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »
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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 // Simple conversion. 1389 // Simple conversion.
1390 bind(&simple_convert); 1390 bind(&simple_convert);
1391 trunc_w_d(scratch, fd); 1391 trunc_w_d(scratch, fd);
1392 mfc1(rs, scratch); 1392 mfc1(rs, scratch);
1393 1393
1394 bind(&done); 1394 bind(&done);
1395 } 1395 }
1396 1396
1397 1397
1398 void MacroAssembler::Mthc1(Register rt, FPURegister fs) { 1398 void MacroAssembler::Mthc1(Register rt, FPURegister fs) {
1399 if (IsFp64Mode()) { 1399 if (IsFp32Mode()) {
1400 mtc1(rt, fs.high());
1401 } else {
1402 DCHECK(IsFp64Mode() || IsFpxxMode());
1403 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6));
1400 mthc1(rt, fs); 1404 mthc1(rt, fs);
1401 } else {
1402 mtc1(rt, fs.high());
1403 } 1405 }
1404 } 1406 }
1405 1407
1406 1408
1407 void MacroAssembler::Mfhc1(Register rt, FPURegister fs) { 1409 void MacroAssembler::Mfhc1(Register rt, FPURegister fs) {
1408 if (IsFp64Mode()) { 1410 if (IsFp32Mode()) {
1411 mfc1(rt, fs.high());
1412 } else {
1413 DCHECK(IsFp64Mode() || IsFpxxMode());
1414 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6));
1409 mfhc1(rt, fs); 1415 mfhc1(rt, fs);
1410 } else {
1411 mfc1(rt, fs.high());
1412 } 1416 }
1413 } 1417 }
1414 1418
1415 1419
1416 void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target, 1420 void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
1417 Label* nan, Condition cond, FPURegister cmp1, 1421 Label* nan, Condition cond, FPURegister cmp1,
1418 FPURegister cmp2, BranchDelaySlot bd) { 1422 FPURegister cmp2, BranchDelaySlot bd) {
1419 { 1423 {
1420 BlockTrampolinePoolScope block_trampoline_pool(this); 1424 BlockTrampolinePoolScope block_trampoline_pool(this);
1421 if (cond == al) { 1425 if (cond == al) {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 } 1611 }
1608 } 1612 }
1609 } 1613 }
1610 if (bd == PROTECT) { 1614 if (bd == PROTECT) {
1611 nop(); 1615 nop();
1612 } 1616 }
1613 } 1617 }
1614 1618
1615 1619
1616 void MacroAssembler::FmoveLow(FPURegister dst, Register src_low) { 1620 void MacroAssembler::FmoveLow(FPURegister dst, Register src_low) {
1617 if (IsFp64Mode()) { 1621 if (IsFp32Mode()) {
1622 mtc1(src_low, dst);
1623 } else {
1624 DCHECK(IsFp64Mode() || IsFpxxMode());
1625 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6));
1618 DCHECK(!src_low.is(at)); 1626 DCHECK(!src_low.is(at));
1619 mfhc1(at, dst); 1627 mfhc1(at, dst);
1620 mtc1(src_low, dst); 1628 mtc1(src_low, dst);
1621 mthc1(at, dst); 1629 mthc1(at, dst);
1622 } else {
1623 mtc1(src_low, dst);
1624 } 1630 }
1625 } 1631 }
1626 1632
1627 1633
1628 void MacroAssembler::Move(FPURegister dst, float imm) { 1634 void MacroAssembler::Move(FPURegister dst, float imm) {
1629 li(at, Operand(bit_cast<int32_t>(imm))); 1635 li(at, Operand(bit_cast<int32_t>(imm)));
1630 mtc1(at, dst); 1636 mtc1(at, dst);
1631 } 1637 }
1632 1638
1633 1639
(...skipping 4134 matching lines...) Expand 10 before | Expand all | Expand 10 after
5768 if (mag.shift > 0) sra(result, result, mag.shift); 5774 if (mag.shift > 0) sra(result, result, mag.shift);
5769 srl(at, dividend, 31); 5775 srl(at, dividend, 31);
5770 Addu(result, result, Operand(at)); 5776 Addu(result, result, Operand(at));
5771 } 5777 }
5772 5778
5773 5779
5774 } // namespace internal 5780 } // namespace internal
5775 } // namespace v8 5781 } // namespace v8
5776 5782
5777 #endif // V8_TARGET_ARCH_MIPS 5783 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/constants-mips.h ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698