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

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

Issue 21358002: Fix SHL when shift amount is zero for 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/mips/lithium-codegen-mips.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 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (shift_count != 1) { 1747 if (shift_count != 1) {
1748 __ mov(result, Operand(left, LSL, shift_count - 1)); 1748 __ mov(result, Operand(left, LSL, shift_count - 1));
1749 __ SmiTag(result, result, SetCC);
1750 } else {
1751 __ SmiTag(result, left, SetCC);
1749 } 1752 }
1750 __ SmiTag(result, result, SetCC);
1751 DeoptimizeIf(vs, instr->environment()); 1753 DeoptimizeIf(vs, instr->environment());
1752 } else { 1754 } else {
1753 __ mov(result, Operand(left, LSL, shift_count)); 1755 __ mov(result, Operand(left, LSL, shift_count));
1754 } 1756 }
1755 } else { 1757 } else {
1756 __ Move(result, left); 1758 __ Move(result, left);
1757 } 1759 }
1758 break; 1760 break;
1759 default: 1761 default:
1760 UNREACHABLE(); 1762 UNREACHABLE();
(...skipping 4068 matching lines...) Expand 10 before | Expand all | Expand 10 after
5829 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5831 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5830 __ ldr(result, FieldMemOperand(scratch, 5832 __ ldr(result, FieldMemOperand(scratch,
5831 FixedArray::kHeaderSize - kPointerSize)); 5833 FixedArray::kHeaderSize - kPointerSize));
5832 __ bind(&done); 5834 __ bind(&done);
5833 } 5835 }
5834 5836
5835 5837
5836 #undef __ 5838 #undef __
5837 5839
5838 } } // namespace v8::internal 5840 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698