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

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

Issue 20323002: Add Smi support to Shl (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM / x64 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
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 } else { 1737 } else {
1738 if (instr->can_deopt()) { 1738 if (instr->can_deopt()) {
1739 __ tst(left, Operand(0x80000000)); 1739 __ tst(left, Operand(0x80000000));
1740 DeoptimizeIf(ne, instr->environment()); 1740 DeoptimizeIf(ne, instr->environment());
1741 } 1741 }
1742 __ Move(result, left); 1742 __ Move(result, left);
1743 } 1743 }
1744 break; 1744 break;
1745 case Token::SHL: 1745 case Token::SHL:
1746 if (shift_count != 0) { 1746 if (shift_count != 0) {
1747 __ mov(result, Operand(left, LSL, shift_count)); 1747 if (instr->hydrogen_value()->representation().IsSmi() &&
1748 instr->can_deopt()) {
1749 __ mov(result, Operand(left, LSL, shift_count - 1));
1750 __ SmiTag(result, result, SetCC);
1751 DeoptimizeIf(vs, instr->environment());
1752 } else {
1753 __ mov(result, Operand(left, LSL, shift_count));
1754 }
1748 } else { 1755 } else {
1749 __ Move(result, left); 1756 __ Move(result, left);
1750 } 1757 }
1751 break; 1758 break;
1752 default: 1759 default:
1753 UNREACHABLE(); 1760 UNREACHABLE();
1754 break; 1761 break;
1755 } 1762 }
1756 } 1763 }
1757 } 1764 }
(...skipping 4086 matching lines...) Expand 10 before | Expand all | Expand 10 after
5844 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5851 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5845 __ ldr(result, FieldMemOperand(scratch, 5852 __ ldr(result, FieldMemOperand(scratch,
5846 FixedArray::kHeaderSize - kPointerSize)); 5853 FixedArray::kHeaderSize - kPointerSize));
5847 __ bind(&done); 5854 __ bind(&done);
5848 } 5855 }
5849 5856
5850 5857
5851 #undef __ 5858 #undef __
5852 5859
5853 } } // namespace v8::internal 5860 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | src/ia32/lithium-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698