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

Side by Side Diff: src/ia32/code-stubs-ia32.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/arm/code-stubs-arm.cc ('k') | src/x64/code-stubs-x64.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 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 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 2631
2632 // Compare two smis if required. 2632 // Compare two smis if required.
2633 if (include_smi_compare_) { 2633 if (include_smi_compare_) {
2634 Label non_smi, smi_done; 2634 Label non_smi, smi_done;
2635 __ mov(ecx, Operand(edx)); 2635 __ mov(ecx, Operand(edx));
2636 __ or_(ecx, Operand(eax)); 2636 __ or_(ecx, Operand(eax));
2637 __ test(ecx, Immediate(kSmiTagMask)); 2637 __ test(ecx, Immediate(kSmiTagMask));
2638 __ j(not_zero, &non_smi, not_taken); 2638 __ j(not_zero, &non_smi, not_taken);
2639 __ sub(edx, Operand(eax)); // Return on the result of the subtraction. 2639 __ sub(edx, Operand(eax)); // Return on the result of the subtraction.
2640 __ j(no_overflow, &smi_done); 2640 __ j(no_overflow, &smi_done);
2641 __ neg(edx); // Correct sign in case of overflow. 2641 __ not_(edx); // Correct sign in case of overflow. edx is never 0 here.
2642 __ bind(&smi_done); 2642 __ bind(&smi_done);
2643 __ mov(eax, edx); 2643 __ mov(eax, edx);
2644 __ ret(0); 2644 __ ret(0);
2645 __ bind(&non_smi); 2645 __ bind(&non_smi);
2646 } else if (FLAG_debug_code) { 2646 } else if (FLAG_debug_code) {
2647 __ mov(ecx, Operand(edx)); 2647 __ mov(ecx, Operand(edx));
2648 __ or_(ecx, Operand(eax)); 2648 __ or_(ecx, Operand(eax));
2649 __ test(ecx, Immediate(kSmiTagMask)); 2649 __ test(ecx, Immediate(kSmiTagMask));
2650 __ Assert(not_zero, "Unexpected smi operands."); 2650 __ Assert(not_zero, "Unexpected smi operands.");
2651 } 2651 }
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
4650 // tagged as a small integer. 4650 // tagged as a small integer.
4651 __ bind(&runtime); 4651 __ bind(&runtime);
4652 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 4652 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
4653 } 4653 }
4654 4654
4655 #undef __ 4655 #undef __
4656 4656
4657 } } // namespace v8::internal 4657 } } // namespace v8::internal
4658 4658
4659 #endif // V8_TARGET_ARCH_IA32 4659 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698