| 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 5517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5528 __ JumpIfNotBothSmi(rdx, rax, &miss, Label::kNear); | 5528 __ JumpIfNotBothSmi(rdx, rax, &miss, Label::kNear); |
| 5529 | 5529 |
| 5530 if (GetCondition() == equal) { | 5530 if (GetCondition() == equal) { |
| 5531 // For equality we do not care about the sign of the result. | 5531 // For equality we do not care about the sign of the result. |
| 5532 __ subq(rax, rdx); | 5532 __ subq(rax, rdx); |
| 5533 } else { | 5533 } else { |
| 5534 Label done; | 5534 Label done; |
| 5535 __ subq(rdx, rax); | 5535 __ subq(rdx, rax); |
| 5536 __ j(no_overflow, &done, Label::kNear); | 5536 __ j(no_overflow, &done, Label::kNear); |
| 5537 // Correct sign of result in case of overflow. | 5537 // Correct sign of result in case of overflow. |
| 5538 __ SmiNot(rdx, rdx); | 5538 __ not_(rdx); |
| 5539 __ bind(&done); | 5539 __ bind(&done); |
| 5540 __ movq(rax, rdx); | 5540 __ movq(rax, rdx); |
| 5541 } | 5541 } |
| 5542 __ ret(0); | 5542 __ ret(0); |
| 5543 | 5543 |
| 5544 __ bind(&miss); | 5544 __ bind(&miss); |
| 5545 GenerateMiss(masm); | 5545 GenerateMiss(masm); |
| 5546 } | 5546 } |
| 5547 | 5547 |
| 5548 | 5548 |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6474 #endif | 6474 #endif |
| 6475 | 6475 |
| 6476 __ Ret(); | 6476 __ Ret(); |
| 6477 } | 6477 } |
| 6478 | 6478 |
| 6479 #undef __ | 6479 #undef __ |
| 6480 | 6480 |
| 6481 } } // namespace v8::internal | 6481 } } // namespace v8::internal |
| 6482 | 6482 |
| 6483 #endif // V8_TARGET_ARCH_X64 | 6483 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |