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) { |
Vyacheslav Egorov (Google)
2012/09/21 16:51:20
If right is 0 then we need to check sign of left,
| |
1238 DeoptimizeIf(no_condition, instr->environment()); | 1238 DeoptimizeIf(no_condition, instr->environment()); |
1239 } | 1239 } |
1240 } else { | 1240 } else { |
1241 // Test the non-zero operand for negative sign. | 1241 // Test the non-zero operand for negative sign. |
1242 __ or_(ToRegister(instr->temp()), ToOperand(right)); | 1242 __ or_(ToRegister(instr->temp()), ToOperand(right)); |
1243 DeoptimizeIf(sign, instr->environment()); | 1243 DeoptimizeIf(sign, instr->environment()); |
1244 } | 1244 } |
1245 __ bind(&done); | 1245 __ bind(&done); |
1246 } | 1246 } |
1247 } | 1247 } |
(...skipping 4293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5541 FixedArray::kHeaderSize - kPointerSize)); | 5541 FixedArray::kHeaderSize - kPointerSize)); |
5542 __ bind(&done); | 5542 __ bind(&done); |
5543 } | 5543 } |
5544 | 5544 |
5545 | 5545 |
5546 #undef __ | 5546 #undef __ |
5547 | 5547 |
5548 } } // namespace v8::internal | 5548 } } // namespace v8::internal |
5549 | 5549 |
5550 #endif // V8_TARGET_ARCH_IA32 | 5550 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |