OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 6302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6313 Label try_float; | 6313 Label try_float; |
6314 Label special; | 6314 Label special; |
6315 // Check whether the value is a smi. | 6315 // Check whether the value is a smi. |
6316 __ JumpIfNotSmi(rax, &try_float); | 6316 __ JumpIfNotSmi(rax, &try_float); |
6317 | 6317 |
6318 // Enter runtime system if the value of the smi is zero | 6318 // Enter runtime system if the value of the smi is zero |
6319 // to make sure that we switch between 0 and -0. | 6319 // to make sure that we switch between 0 and -0. |
6320 // Also enter it if the value of the smi is Smi::kMinValue | 6320 // Also enter it if the value of the smi is Smi::kMinValue |
6321 __ testl(rax, Immediate(0x7FFFFFFE)); | 6321 __ testl(rax, Immediate(0x7FFFFFFE)); |
6322 __ j(zero, &special); | 6322 __ j(zero, &special); |
6323 __ neg(rax); | 6323 __ negl(rax); |
6324 __ jmp(&done); | 6324 __ jmp(&done); |
6325 | 6325 |
6326 __ bind(&special); | 6326 __ bind(&special); |
6327 // Either zero or -0x4000000, neither of which become a smi when negated. | 6327 // Either zero or -0x4000000, neither of which become a smi when negated. |
6328 __ testl(rax, rax); | 6328 __ testl(rax, rax); |
6329 __ j(not_zero, &slow); | 6329 __ j(not_zero, &slow); |
6330 __ Move(rax, Factory::minus_zero_value()); | 6330 __ Move(rax, Factory::minus_zero_value()); |
6331 __ jmp(&done); | 6331 __ jmp(&done); |
6332 | 6332 |
6333 // Enter runtime system. | 6333 // Enter runtime system. |
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7683 int CompareStub::MinorKey() { | 7683 int CompareStub::MinorKey() { |
7684 // Encode the two parameters in a unique 16 bit value. | 7684 // Encode the two parameters in a unique 16 bit value. |
7685 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); | 7685 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); |
7686 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); | 7686 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); |
7687 } | 7687 } |
7688 | 7688 |
7689 | 7689 |
7690 #undef __ | 7690 #undef __ |
7691 | 7691 |
7692 } } // namespace v8::internal | 7692 } } // namespace v8::internal |
OLD | NEW |