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

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

Issue 329223006: MIPS: Fix unsigned comparison. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | 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 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 li(r2, rt); 2107 li(r2, rt);
2108 slt(scratch, r2, rs); 2108 slt(scratch, r2, rs);
2109 offset = shifted_branch_offset(L, false); 2109 offset = shifted_branch_offset(L, false);
2110 beq(scratch, zero_reg, offset); 2110 beq(scratch, zero_reg, offset);
2111 } 2111 }
2112 break; 2112 break;
2113 // Unsigned comparison. 2113 // Unsigned comparison.
2114 case Ugreater: 2114 case Ugreater:
2115 if (rt.imm32_ == 0) { 2115 if (rt.imm32_ == 0) {
2116 offset = shifted_branch_offset(L, false); 2116 offset = shifted_branch_offset(L, false);
2117 bgtz(rs, offset); 2117 bne(rs, zero_reg, offset);
2118 } else { 2118 } else {
2119 ASSERT(!scratch.is(rs)); 2119 ASSERT(!scratch.is(rs));
2120 r2 = scratch; 2120 r2 = scratch;
2121 li(r2, rt); 2121 li(r2, rt);
2122 sltu(scratch, r2, rs); 2122 sltu(scratch, r2, rs);
2123 offset = shifted_branch_offset(L, false); 2123 offset = shifted_branch_offset(L, false);
2124 bne(scratch, zero_reg, offset); 2124 bne(scratch, zero_reg, offset);
2125 } 2125 }
2126 break; 2126 break;
2127 case Ugreater_equal: 2127 case Ugreater_equal:
(...skipping 3628 matching lines...) Expand 10 before | Expand all | Expand 10 after
5756 } 5756 }
5757 if (ms.shift() > 0) sra(result, result, ms.shift()); 5757 if (ms.shift() > 0) sra(result, result, ms.shift());
5758 srl(at, dividend, 31); 5758 srl(at, dividend, 31);
5759 Addu(result, result, Operand(at)); 5759 Addu(result, result, Operand(at));
5760 } 5760 }
5761 5761
5762 5762
5763 } } // namespace v8::internal 5763 } } // namespace v8::internal
5764 5764
5765 #endif // V8_TARGET_ARCH_MIPS 5765 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698