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

Side by Side Diff: src/x64/lithium-codegen-x64.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 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 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 case Token::SHR: 1446 case Token::SHR:
1447 if (shift_count == 0 && instr->can_deopt()) { 1447 if (shift_count == 0 && instr->can_deopt()) {
1448 __ testl(ToRegister(left), ToRegister(left)); 1448 __ testl(ToRegister(left), ToRegister(left));
1449 DeoptimizeIf(negative, instr->environment()); 1449 DeoptimizeIf(negative, instr->environment());
1450 } else { 1450 } else {
1451 __ shrl(ToRegister(left), Immediate(shift_count)); 1451 __ shrl(ToRegister(left), Immediate(shift_count));
1452 } 1452 }
1453 break; 1453 break;
1454 case Token::SHL: 1454 case Token::SHL:
1455 if (shift_count != 0) { 1455 if (shift_count != 0) {
1456 __ shll(ToRegister(left), Immediate(shift_count)); 1456 if (instr->hydrogen_value()->representation().IsSmi()) {
1457 __ shl(ToRegister(left), Immediate(shift_count));
1458 } else {
1459 __ shll(ToRegister(left), Immediate(shift_count));
1460 }
1457 } 1461 }
1458 break; 1462 break;
1459 default: 1463 default:
1460 UNREACHABLE(); 1464 UNREACHABLE();
1461 break; 1465 break;
1462 } 1466 }
1463 } 1467 }
1464 } 1468 }
1465 1469
1466 1470
(...skipping 4079 matching lines...) Expand 10 before | Expand all | Expand 10 after
5546 FixedArray::kHeaderSize - kPointerSize)); 5550 FixedArray::kHeaderSize - kPointerSize));
5547 __ bind(&done); 5551 __ bind(&done);
5548 } 5552 }
5549 5553
5550 5554
5551 #undef __ 5555 #undef __
5552 5556
5553 } } // namespace v8::internal 5557 } } // namespace v8::internal
5554 5558
5555 #endif // V8_TARGET_ARCH_X64 5559 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698