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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 453043002: MIPS: Add support for arch. revision 6 to mips32 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/codegen-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 // 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 Label nan; 1015 Label nan;
1016 __ li(t0, Operand(LESS)); 1016 __ li(t0, Operand(LESS));
1017 __ li(t1, Operand(GREATER)); 1017 __ li(t1, Operand(GREATER));
1018 __ li(t2, Operand(EQUAL)); 1018 __ li(t2, Operand(EQUAL));
1019 1019
1020 // Check if either rhs or lhs is NaN. 1020 // Check if either rhs or lhs is NaN.
1021 __ BranchF(NULL, &nan, eq, f12, f14); 1021 __ BranchF(NULL, &nan, eq, f12, f14);
1022 1022
1023 // Check if LESS condition is satisfied. If true, move conditionally 1023 // Check if LESS condition is satisfied. If true, move conditionally
1024 // result to v0. 1024 // result to v0.
1025 __ c(OLT, D, f12, f14); 1025 if (!IsMipsArchVariant(kMips32r6)) {
1026 __ Movt(v0, t0); 1026 __ c(OLT, D, f12, f14);
1027 // Use previous check to store conditionally to v0 oposite condition 1027 __ Movt(v0, t0);
1028 // (GREATER). If rhs is equal to lhs, this will be corrected in next 1028 // Use previous check to store conditionally to v0 oposite condition
1029 // check. 1029 // (GREATER). If rhs is equal to lhs, this will be corrected in next
1030 __ Movf(v0, t1); 1030 // check.
1031 // Check if EQUAL condition is satisfied. If true, move conditionally 1031 __ Movf(v0, t1);
1032 // result to v0. 1032 // Check if EQUAL condition is satisfied. If true, move conditionally
1033 __ c(EQ, D, f12, f14); 1033 // result to v0.
1034 __ Movt(v0, t2); 1034 __ c(EQ, D, f12, f14);
1035 __ Movt(v0, t2);
1036 } else {
1037 Label skip;
1038 __ BranchF(USE_DELAY_SLOT, &skip, NULL, lt, f12, f14);
1039 __ mov(v0, t0); // Return LESS as result.
1040
1041 __ BranchF(USE_DELAY_SLOT, &skip, NULL, eq, f12, f14);
1042 __ mov(v0, t2); // Return EQUAL as result.
1043
1044 __ mov(v0, t1); // Return GREATER as result.
1045 __ bind(&skip);
1046 }
1035 1047
1036 __ Ret(); 1048 __ Ret();
1037 1049
1038 __ bind(&nan); 1050 __ bind(&nan);
1039 // NaN comparisons always fail. 1051 // NaN comparisons always fail.
1040 // Load whatever we need in v0 to make the comparison fail. 1052 // Load whatever we need in v0 to make the comparison fail.
1041 DCHECK(is_int16(GREATER) && is_int16(LESS)); 1053 DCHECK(is_int16(GREATER) && is_int16(LESS));
1042 __ Ret(USE_DELAY_SLOT); 1054 __ Ret(USE_DELAY_SLOT);
1043 if (cc == lt || cc == le) { 1055 if (cc == lt || cc == le) {
1044 __ li(v0, Operand(GREATER)); 1056 __ li(v0, Operand(GREATER));
(...skipping 4226 matching lines...) Expand 10 before | Expand all | Expand 10 after
5271 MemOperand(fp, 6 * kPointerSize), 5283 MemOperand(fp, 6 * kPointerSize),
5272 NULL); 5284 NULL);
5273 } 5285 }
5274 5286
5275 5287
5276 #undef __ 5288 #undef __
5277 5289
5278 } } // namespace v8::internal 5290 } } // namespace v8::internal
5279 5291
5280 #endif // V8_TARGET_ARCH_MIPS 5292 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698