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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 if (can_overflow) { | 1118 if (can_overflow) { |
1119 DeoptimizeIf(overflow, instr->environment()); | 1119 DeoptimizeIf(overflow, instr->environment()); |
1120 } | 1120 } |
1121 | 1121 |
1122 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 1122 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
1123 // Bail out if the result is supposed to be negative zero. | 1123 // Bail out if the result is supposed to be negative zero. |
1124 Label done; | 1124 Label done; |
1125 __ testl(left, left); | 1125 __ testl(left, left); |
1126 __ j(not_zero, &done, Label::kNear); | 1126 __ j(not_zero, &done, Label::kNear); |
1127 if (right->IsConstantOperand()) { | 1127 if (right->IsConstantOperand()) { |
1128 if (ToInteger32(LConstantOperand::cast(right)) <= 0) { | 1128 if (ToInteger32(LConstantOperand::cast(right)) < 0) { |
1129 DeoptimizeIf(no_condition, instr->environment()); | 1129 DeoptimizeIf(no_condition, instr->environment()); |
1130 } | 1130 } |
1131 } else if (right->IsStackSlot()) { | 1131 } else if (right->IsStackSlot()) { |
1132 __ orl(kScratchRegister, ToOperand(right)); | 1132 __ orl(kScratchRegister, ToOperand(right)); |
1133 DeoptimizeIf(sign, instr->environment()); | 1133 DeoptimizeIf(sign, instr->environment()); |
1134 } else { | 1134 } else { |
1135 // Test the non-zero operand for negative sign. | 1135 // Test the non-zero operand for negative sign. |
1136 __ orl(kScratchRegister, ToRegister(right)); | 1136 __ orl(kScratchRegister, ToRegister(right)); |
1137 DeoptimizeIf(sign, instr->environment()); | 1137 DeoptimizeIf(sign, instr->environment()); |
1138 } | 1138 } |
(...skipping 4180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5319 FixedArray::kHeaderSize - kPointerSize)); | 5319 FixedArray::kHeaderSize - kPointerSize)); |
5320 __ bind(&done); | 5320 __ bind(&done); |
5321 } | 5321 } |
5322 | 5322 |
5323 | 5323 |
5324 #undef __ | 5324 #undef __ |
5325 | 5325 |
5326 } } // namespace v8::internal | 5326 } } // namespace v8::internal |
5327 | 5327 |
5328 #endif // V8_TARGET_ARCH_X64 | 5328 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |