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

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

Issue 170553002: A64: Replace a Subs by a Sub where flags don't need to be updated. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: reupload patch set Created 6 years, 10 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 | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3622 matching lines...) Expand 10 before | Expand all | Expand 10 after
3633 3633
3634 3634
3635 void ICCompareStub::GenerateSmis(MacroAssembler* masm) { 3635 void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
3636 // Inputs are in x0 (lhs) and x1 (rhs). 3636 // Inputs are in x0 (lhs) and x1 (rhs).
3637 ASSERT(state_ == CompareIC::SMI); 3637 ASSERT(state_ == CompareIC::SMI);
3638 ASM_LOCATION("ICCompareStub[Smis]"); 3638 ASM_LOCATION("ICCompareStub[Smis]");
3639 Label miss; 3639 Label miss;
3640 // Bail out (to 'miss') unless both x0 and x1 are smis. 3640 // Bail out (to 'miss') unless both x0 and x1 are smis.
3641 __ JumpIfEitherNotSmi(x0, x1, &miss); 3641 __ JumpIfEitherNotSmi(x0, x1, &miss);
3642 3642
3643 // TODO(jbramley): Why do we only set the flags for EQ?
3644 if (GetCondition() == eq) { 3643 if (GetCondition() == eq) {
3645 // For equality we do not care about the sign of the result. 3644 // For equality we do not care about the sign of the result.
3646 __ Subs(x0, x0, x1); 3645 __ Sub(x0, x0, x1);
3647 } else { 3646 } else {
3648 // Untag before subtracting to avoid handling overflow. 3647 // Untag before subtracting to avoid handling overflow.
3649 __ SmiUntag(x1); 3648 __ SmiUntag(x1);
3650 __ Sub(x0, x1, Operand::UntagSmi(x0)); 3649 __ Sub(x0, x1, Operand::UntagSmi(x0));
3651 } 3650 }
3652 __ Ret(); 3651 __ Ret();
3653 3652
3654 __ Bind(&miss); 3653 __ Bind(&miss);
3655 GenerateMiss(masm); 3654 GenerateMiss(masm);
3656 } 3655 }
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
5799 MemOperand(fp, 6 * kPointerSize), 5798 MemOperand(fp, 6 * kPointerSize),
5800 NULL); 5799 NULL);
5801 } 5800 }
5802 5801
5803 5802
5804 #undef __ 5803 #undef __
5805 5804
5806 } } // namespace v8::internal 5805 } } // namespace v8::internal
5807 5806
5808 #endif // V8_TARGET_ARCH_A64 5807 #endif // V8_TARGET_ARCH_A64
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