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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 21196006: Don't generate a shift left by one if can deoptimize on ia32 and arm and mips. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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/lithium-codegen-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 __ tst(left, Operand(0x80000000)); 1737 __ tst(left, Operand(0x80000000));
1738 DeoptimizeIf(ne, instr->environment()); 1738 DeoptimizeIf(ne, instr->environment());
1739 } 1739 }
1740 __ Move(result, left); 1740 __ Move(result, left);
1741 } 1741 }
1742 break; 1742 break;
1743 case Token::SHL: 1743 case Token::SHL:
1744 if (shift_count != 0) { 1744 if (shift_count != 0) {
1745 if (instr->hydrogen_value()->representation().IsSmi() && 1745 if (instr->hydrogen_value()->representation().IsSmi() &&
1746 instr->can_deopt()) { 1746 instr->can_deopt()) {
1747 __ mov(result, Operand(left, LSL, shift_count - 1)); 1747 if (shift_count != 1) {
1748 __ mov(result, Operand(left, LSL, shift_count - 1));
1749 }
1748 __ SmiTag(result, result, SetCC); 1750 __ SmiTag(result, result, SetCC);
1749 DeoptimizeIf(vs, instr->environment()); 1751 DeoptimizeIf(vs, instr->environment());
1750 } else { 1752 } else {
1751 __ mov(result, Operand(left, LSL, shift_count)); 1753 __ mov(result, Operand(left, LSL, shift_count));
1752 } 1754 }
1753 } else { 1755 } else {
1754 __ Move(result, left); 1756 __ Move(result, left);
1755 } 1757 }
1756 break; 1758 break;
1757 default: 1759 default:
(...skipping 4078 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5838 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5837 __ ldr(result, FieldMemOperand(scratch, 5839 __ ldr(result, FieldMemOperand(scratch,
5838 FixedArray::kHeaderSize - kPointerSize)); 5840 FixedArray::kHeaderSize - kPointerSize));
5839 __ bind(&done); 5841 __ bind(&done);
5840 } 5842 }
5841 5843
5842 5844
5843 #undef __ 5845 #undef __
5844 5846
5845 } } // namespace v8::internal 5847 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698