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

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

Issue 2569683002: MIPS[64]: Disable fusion multiple-accumulate instructions (Closed)
Patch Set: Created 4 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 | « src/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 void MacroAssembler::Mfhc1(Register rt, FPURegister fs) { 1991 void MacroAssembler::Mfhc1(Register rt, FPURegister fs) {
1992 if (IsFp32Mode()) { 1992 if (IsFp32Mode()) {
1993 mfc1(rt, fs.high()); 1993 mfc1(rt, fs.high());
1994 } else { 1994 } else {
1995 DCHECK(IsFp64Mode() || IsFpxxMode()); 1995 DCHECK(IsFp64Mode() || IsFpxxMode());
1996 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); 1996 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6));
1997 mfhc1(rt, fs); 1997 mfhc1(rt, fs);
1998 } 1998 }
1999 } 1999 }
2000 2000
2001 void MacroAssembler::Madd_s(FPURegister fd, FPURegister fr, FPURegister fs,
2002 FPURegister ft, FPURegister scratch) {
2003 if (IsMipsArchVariant(kMips32r2)) {
2004 madd_s(fd, fr, fs, ft);
2005 } else {
2006 DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch));
2007 mul_s(scratch, fs, ft);
2008 add_s(fd, fr, scratch);
2009 }
2010 }
2011
2012 void MacroAssembler::Madd_d(FPURegister fd, FPURegister fr, FPURegister fs,
2013 FPURegister ft, FPURegister scratch) {
2014 if (IsMipsArchVariant(kMips32r2)) {
2015 madd_d(fd, fr, fs, ft);
2016 } else {
2017 DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch));
2018 mul_d(scratch, fs, ft);
2019 add_d(fd, fr, scratch);
2020 }
2021 }
2022
2023 void MacroAssembler::Msub_s(FPURegister fd, FPURegister fr, FPURegister fs,
2024 FPURegister ft, FPURegister scratch) {
2025 if (IsMipsArchVariant(kMips32r2)) {
2026 msub_s(fd, fr, fs, ft);
2027 } else {
2028 DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch));
2029 mul_s(scratch, fs, ft);
2030 sub_s(fd, scratch, fr);
2031 }
2032 }
2033
2034 void MacroAssembler::Msub_d(FPURegister fd, FPURegister fr, FPURegister fs,
2035 FPURegister ft, FPURegister scratch) {
2036 if (IsMipsArchVariant(kMips32r2)) {
2037 msub_d(fd, fr, fs, ft);
2038 } else {
2039 DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch));
2040 mul_d(scratch, fs, ft);
2041 sub_d(fd, scratch, fr);
2042 }
2043 }
2001 2044
2002 void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target, 2045 void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target,
2003 Label* nan, Condition cond, FPURegister cmp1, 2046 Label* nan, Condition cond, FPURegister cmp1,
2004 FPURegister cmp2, BranchDelaySlot bd) { 2047 FPURegister cmp2, BranchDelaySlot bd) {
2005 { 2048 {
2006 BlockTrampolinePoolScope block_trampoline_pool(this); 2049 BlockTrampolinePoolScope block_trampoline_pool(this);
2007 if (cond == al) { 2050 if (cond == al) {
2008 Branch(bd, target); 2051 Branch(bd, target);
2009 return; 2052 return;
2010 } 2053 }
(...skipping 4591 matching lines...) Expand 10 before | Expand all | Expand 10 after
6602 if (mag.shift > 0) sra(result, result, mag.shift); 6645 if (mag.shift > 0) sra(result, result, mag.shift);
6603 srl(at, dividend, 31); 6646 srl(at, dividend, 31);
6604 Addu(result, result, Operand(at)); 6647 Addu(result, result, Operand(at));
6605 } 6648 }
6606 6649
6607 6650
6608 } // namespace internal 6651 } // namespace internal
6609 } // namespace v8 6652 } // namespace v8
6610 6653
6611 #endif // V8_TARGET_ARCH_MIPS 6654 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698