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 5669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5680 // deoptimize. | 5680 // deoptimize. |
5681 __ and_(result_reg, 1); | 5681 __ and_(result_reg, 1); |
5682 DeoptimizeIf(not_zero, instr->environment()); | 5682 DeoptimizeIf(not_zero, instr->environment()); |
5683 __ bind(&done); | 5683 __ bind(&done); |
5684 } | 5684 } |
5685 __ SmiTag(result_reg); | 5685 __ SmiTag(result_reg); |
5686 DeoptimizeIf(overflow, instr->environment()); | 5686 DeoptimizeIf(overflow, instr->environment()); |
5687 } | 5687 } |
5688 | 5688 |
5689 | 5689 |
5690 void LCodeGen::DoCheckSmiAndReturn(LCheckSmiAndReturn* instr) { | |
5691 LOperand* input = instr->value(); | |
5692 __ test(ToOperand(input), Immediate(kSmiTagMask)); | |
5693 DeoptimizeIf(not_zero, instr->environment()); | |
5694 } | |
5695 | |
5696 | |
5697 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { | 5690 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { |
5698 LOperand* input = instr->value(); | 5691 LOperand* input = instr->value(); |
5699 __ test(ToOperand(input), Immediate(kSmiTagMask)); | 5692 __ test(ToOperand(input), Immediate(kSmiTagMask)); |
5700 DeoptimizeIf(not_zero, instr->environment()); | 5693 DeoptimizeIf(not_zero, instr->environment()); |
5701 } | 5694 } |
5702 | 5695 |
5703 | 5696 |
5704 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { | 5697 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
5705 LOperand* input = instr->value(); | 5698 LOperand* input = instr->value(); |
5706 __ test(ToOperand(input), Immediate(kSmiTagMask)); | 5699 __ test(ToOperand(input), Immediate(kSmiTagMask)); |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6583 FixedArray::kHeaderSize - kPointerSize)); | 6576 FixedArray::kHeaderSize - kPointerSize)); |
6584 __ bind(&done); | 6577 __ bind(&done); |
6585 } | 6578 } |
6586 | 6579 |
6587 | 6580 |
6588 #undef __ | 6581 #undef __ |
6589 | 6582 |
6590 } } // namespace v8::internal | 6583 } } // namespace v8::internal |
6591 | 6584 |
6592 #endif // V8_TARGET_ARCH_IA32 | 6585 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |