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

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

Issue 3767016: Fix bug in comparison of two smis that differ by MIN_SMI on full compiler on ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 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/ia32/code-stubs-ia32.cc ('k') | test/mjsunit/int32-ops.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 ASSERT(lhs_.is(no_reg) && rhs_.is(no_reg)); 2116 ASSERT(lhs_.is(no_reg) && rhs_.is(no_reg));
2117 2117
2118 Label check_unequal_objects, done; 2118 Label check_unequal_objects, done;
2119 2119
2120 // Compare two smis if required. 2120 // Compare two smis if required.
2121 if (include_smi_compare_) { 2121 if (include_smi_compare_) {
2122 Label non_smi, smi_done; 2122 Label non_smi, smi_done;
2123 __ JumpIfNotBothSmi(rax, rdx, &non_smi); 2123 __ JumpIfNotBothSmi(rax, rdx, &non_smi);
2124 __ subq(rdx, rax); 2124 __ subq(rdx, rax);
2125 __ j(no_overflow, &smi_done); 2125 __ j(no_overflow, &smi_done);
2126 __ neg(rdx); // Correct sign in case of overflow. 2126 __ not_(rdx); // Correct sign in case of overflow. rdx cannot be 0 here.
2127 __ bind(&smi_done); 2127 __ bind(&smi_done);
2128 __ movq(rax, rdx); 2128 __ movq(rax, rdx);
2129 __ ret(0); 2129 __ ret(0);
2130 __ bind(&non_smi); 2130 __ bind(&non_smi);
2131 } else if (FLAG_debug_code) { 2131 } else if (FLAG_debug_code) {
2132 Label ok; 2132 Label ok;
2133 __ JumpIfNotSmi(rdx, &ok); 2133 __ JumpIfNotSmi(rdx, &ok);
2134 __ JumpIfNotSmi(rax, &ok); 2134 __ JumpIfNotSmi(rax, &ok);
2135 __ Abort("CompareStub: smi operands"); 2135 __ Abort("CompareStub: smi operands");
2136 __ bind(&ok); 2136 __ bind(&ok);
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
4033 // tagged as a small integer. 4033 // tagged as a small integer.
4034 __ bind(&runtime); 4034 __ bind(&runtime);
4035 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 4035 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
4036 } 4036 }
4037 4037
4038 #undef __ 4038 #undef __
4039 4039
4040 } } // namespace v8::internal 4040 } } // namespace v8::internal
4041 4041
4042 #endif // V8_TARGET_ARCH_X64 4042 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | test/mjsunit/int32-ops.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698