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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { | 1227 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { |
1228 DeoptimizeIf(overflow, instr->environment()); | 1228 DeoptimizeIf(overflow, instr->environment()); |
1229 } | 1229 } |
1230 | 1230 |
1231 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { | 1231 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
1232 // Bail out if the result is supposed to be negative zero. | 1232 // Bail out if the result is supposed to be negative zero. |
1233 Label done; | 1233 Label done; |
1234 __ test(left, Operand(left)); | 1234 __ test(left, Operand(left)); |
1235 __ j(not_zero, &done, Label::kNear); | 1235 __ j(not_zero, &done, Label::kNear); |
1236 if (right->IsConstantOperand()) { | 1236 if (right->IsConstantOperand()) { |
1237 if (ToInteger32(LConstantOperand::cast(right)) <= 0) { | 1237 if (ToInteger32(LConstantOperand::cast(right)) < 0) { |
1238 DeoptimizeIf(no_condition, instr->environment()); | 1238 DeoptimizeIf(no_condition, instr->environment()); |
| 1239 } else if (ToInteger32(LConstantOperand::cast(right)) == 0) { |
| 1240 __ cmp(ToRegister(instr->temp()), Immediate(0)); |
| 1241 DeoptimizeIf(less, instr->environment()); |
1239 } | 1242 } |
1240 } else { | 1243 } else { |
1241 // Test the non-zero operand for negative sign. | 1244 // Test the non-zero operand for negative sign. |
1242 __ or_(ToRegister(instr->temp()), ToOperand(right)); | 1245 __ or_(ToRegister(instr->temp()), ToOperand(right)); |
1243 DeoptimizeIf(sign, instr->environment()); | 1246 DeoptimizeIf(sign, instr->environment()); |
1244 } | 1247 } |
1245 __ bind(&done); | 1248 __ bind(&done); |
1246 } | 1249 } |
1247 } | 1250 } |
1248 | 1251 |
(...skipping 4292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5541 FixedArray::kHeaderSize - kPointerSize)); | 5544 FixedArray::kHeaderSize - kPointerSize)); |
5542 __ bind(&done); | 5545 __ bind(&done); |
5543 } | 5546 } |
5544 | 5547 |
5545 | 5548 |
5546 #undef __ | 5549 #undef __ |
5547 | 5550 |
5548 } } // namespace v8::internal | 5551 } } // namespace v8::internal |
5549 | 5552 |
5550 #endif // V8_TARGET_ARCH_IA32 | 5553 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |