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 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 if (shift_count == 0 && instr->can_deopt()) { | 1743 if (shift_count == 0 && instr->can_deopt()) { |
1744 __ test(ToRegister(left), Immediate(0x80000000)); | 1744 __ test(ToRegister(left), Immediate(0x80000000)); |
1745 DeoptimizeIf(not_zero, instr->environment()); | 1745 DeoptimizeIf(not_zero, instr->environment()); |
1746 } else { | 1746 } else { |
1747 __ ror(ToRegister(left), shift_count); | 1747 __ ror(ToRegister(left), shift_count); |
1748 } | 1748 } |
1749 break; | 1749 break; |
1750 case Token::SAR: | 1750 case Token::SAR: |
1751 if (shift_count != 0) { | 1751 if (shift_count != 0) { |
1752 __ sar(ToRegister(left), shift_count); | 1752 __ sar(ToRegister(left), shift_count); |
| 1753 if (instr->hydrogen_value()->representation().IsSmi()) { |
| 1754 __ and_(ToRegister(left), ~kSmiTagMask); |
| 1755 } |
1753 } | 1756 } |
1754 break; | 1757 break; |
1755 case Token::SHR: | 1758 case Token::SHR: |
1756 if (shift_count == 0 && instr->can_deopt()) { | 1759 if (shift_count == 0 && instr->can_deopt()) { |
1757 __ test(ToRegister(left), Immediate(0x80000000)); | 1760 __ test(ToRegister(left), Immediate(0x80000000)); |
1758 DeoptimizeIf(not_zero, instr->environment()); | 1761 DeoptimizeIf(not_zero, instr->environment()); |
1759 } else { | 1762 } else { |
1760 __ shr(ToRegister(left), shift_count); | 1763 __ shr(ToRegister(left), shift_count); |
1761 } | 1764 } |
1762 break; | 1765 break; |
(...skipping 4721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6484 FixedArray::kHeaderSize - kPointerSize)); | 6487 FixedArray::kHeaderSize - kPointerSize)); |
6485 __ bind(&done); | 6488 __ bind(&done); |
6486 } | 6489 } |
6487 | 6490 |
6488 | 6491 |
6489 #undef __ | 6492 #undef __ |
6490 | 6493 |
6491 } } // namespace v8::internal | 6494 } } // namespace v8::internal |
6492 | 6495 |
6493 #endif // V8_TARGET_ARCH_IA32 | 6496 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |