OLD | NEW |
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 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 if (shift_count == 0 && instr->can_deopt()) { | 1750 if (shift_count == 0 && instr->can_deopt()) { |
1751 __ test(ToRegister(left), Immediate(0x80000000)); | 1751 __ test(ToRegister(left), Immediate(0x80000000)); |
1752 DeoptimizeIf(not_zero, instr->environment()); | 1752 DeoptimizeIf(not_zero, instr->environment()); |
1753 } else { | 1753 } else { |
1754 __ ror(ToRegister(left), shift_count); | 1754 __ ror(ToRegister(left), shift_count); |
1755 } | 1755 } |
1756 break; | 1756 break; |
1757 case Token::SAR: | 1757 case Token::SAR: |
1758 if (shift_count != 0) { | 1758 if (shift_count != 0) { |
1759 __ sar(ToRegister(left), shift_count); | 1759 __ sar(ToRegister(left), shift_count); |
1760 if (instr->hydrogen_value()->representation().IsSmi()) { | |
1761 __ and_(ToRegister(left), ~kSmiTagMask); | |
1762 } | |
1763 } | 1760 } |
1764 break; | 1761 break; |
1765 case Token::SHR: | 1762 case Token::SHR: |
1766 if (shift_count == 0 && instr->can_deopt()) { | 1763 if (shift_count == 0 && instr->can_deopt()) { |
1767 __ test(ToRegister(left), Immediate(0x80000000)); | 1764 __ test(ToRegister(left), Immediate(0x80000000)); |
1768 DeoptimizeIf(not_zero, instr->environment()); | 1765 DeoptimizeIf(not_zero, instr->environment()); |
1769 } else { | 1766 } else { |
1770 __ shr(ToRegister(left), shift_count); | 1767 __ shr(ToRegister(left), shift_count); |
1771 } | 1768 } |
1772 break; | 1769 break; |
(...skipping 4753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6526 FixedArray::kHeaderSize - kPointerSize)); | 6523 FixedArray::kHeaderSize - kPointerSize)); |
6527 __ bind(&done); | 6524 __ bind(&done); |
6528 } | 6525 } |
6529 | 6526 |
6530 | 6527 |
6531 #undef __ | 6528 #undef __ |
6532 | 6529 |
6533 } } // namespace v8::internal | 6530 } } // namespace v8::internal |
6534 | 6531 |
6535 #endif // V8_TARGET_ARCH_IA32 | 6532 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |