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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/ia32/code-stubs-ia32.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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 (lhs_.is(r1) && rhs_.is(r0))); 928 (lhs_.is(r1) && rhs_.is(r0)));
929 929
930 Label slow; // Call builtin. 930 Label slow; // Call builtin.
931 Label not_smis, both_loaded_as_doubles, lhs_not_nan; 931 Label not_smis, both_loaded_as_doubles, lhs_not_nan;
932 932
933 if (include_smi_compare_) { 933 if (include_smi_compare_) {
934 Label not_two_smis, smi_done; 934 Label not_two_smis, smi_done;
935 __ orr(r2, r1, r0); 935 __ orr(r2, r1, r0);
936 __ tst(r2, Operand(kSmiTagMask)); 936 __ tst(r2, Operand(kSmiTagMask));
937 __ b(ne, &not_two_smis); 937 __ b(ne, &not_two_smis);
938 __ sub(r0, r1, r0, SetCC); 938 __ mov(r1, Operand(r1, ASR, 1));
939 __ b(vc, &smi_done); 939 __ sub(r0, r1, Operand(r0, ASR, 1));
940 // Correct the sign in case of overflow.
941 __ rsb(r0, r0, Operand(0, RelocInfo::NONE));
942 __ bind(&smi_done);
943 __ Ret(); 940 __ Ret();
944 __ bind(&not_two_smis); 941 __ bind(&not_two_smis);
945 } else if (FLAG_debug_code) { 942 } else if (FLAG_debug_code) {
946 __ orr(r2, r1, r0); 943 __ orr(r2, r1, r0);
947 __ tst(r2, Operand(kSmiTagMask)); 944 __ tst(r2, Operand(kSmiTagMask));
948 __ Assert(nz, "CompareStub: unexpected smi operands."); 945 __ Assert(nz, "CompareStub: unexpected smi operands.");
949 } 946 }
950 947
951 // NOTICE! This code is only reached after a smi-fast-case check, so 948 // NOTICE! This code is only reached after a smi-fast-case check, so
952 // it is certain that at least one operand isn't a smi. 949 // it is certain that at least one operand isn't a smi.
(...skipping 3774 matching lines...) Expand 10 before | Expand all | Expand 10 after
4727 __ bind(&string_add_runtime); 4724 __ bind(&string_add_runtime);
4728 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); 4725 __ TailCallRuntime(Runtime::kStringAdd, 2, 1);
4729 } 4726 }
4730 4727
4731 4728
4732 #undef __ 4729 #undef __
4733 4730
4734 } } // namespace v8::internal 4731 } } // namespace v8::internal
4735 4732
4736 #endif // V8_TARGET_ARCH_ARM 4733 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698