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 6499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6510 __ bind(&done); | 6510 __ bind(&done); |
6511 } | 6511 } |
6512 | 6512 |
6513 void FloatingPointHelper::CheckFloatOperands(MacroAssembler* masm, | 6513 void FloatingPointHelper::CheckFloatOperands(MacroAssembler* masm, |
6514 Label* non_float) { | 6514 Label* non_float) { |
6515 Label test_other, done; | 6515 Label test_other, done; |
6516 // Test if both operands are numbers (heap_numbers or smis). | 6516 // Test if both operands are numbers (heap_numbers or smis). |
6517 // If not, jump to label non_float. | 6517 // If not, jump to label non_float. |
6518 __ testl(rdx, Immediate(kSmiTagMask)); | 6518 __ testl(rdx, Immediate(kSmiTagMask)); |
6519 __ j(zero, &test_other); // argument in rdx is OK | 6519 __ j(zero, &test_other); // argument in rdx is OK |
6520 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset),Factory::heap_number_map()); | 6520 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset), Factory::heap_number_map()); |
6521 __ j(not_equal, non_float); // The argument in rdx is not a number. | 6521 __ j(not_equal, non_float); // The argument in rdx is not a number. |
6522 | 6522 |
6523 __ bind(&test_other); | 6523 __ bind(&test_other); |
6524 __ testl(rax, Immediate(kSmiTagMask)); | 6524 __ testl(rax, Immediate(kSmiTagMask)); |
6525 __ j(zero, &done); // argument in rax is OK | 6525 __ j(zero, &done); // argument in rax is OK |
6526 __ Cmp(FieldOperand(rax, HeapObject::kMapOffset),Factory::heap_number_map()); | 6526 __ Cmp(FieldOperand(rax, HeapObject::kMapOffset), Factory::heap_number_map()); |
6527 __ j(not_equal, non_float); // The argument in rax is not a number. | 6527 __ j(not_equal, non_float); // The argument in rax is not a number. |
6528 | 6528 |
6529 // Fall-through: Both operands are numbers. | 6529 // Fall-through: Both operands are numbers. |
6530 __ bind(&done); | 6530 __ bind(&done); |
6531 } | 6531 } |
6532 | 6532 |
6533 | 6533 |
6534 const char* GenericBinaryOpStub::GetName() { | 6534 const char* GenericBinaryOpStub::GetName() { |
6535 switch (op_) { | 6535 switch (op_) { |
6536 case Token::ADD: return "GenericBinaryOpStub_ADD"; | 6536 case Token::ADD: return "GenericBinaryOpStub_ADD"; |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6935 int CompareStub::MinorKey() { | 6935 int CompareStub::MinorKey() { |
6936 // Encode the two parameters in a unique 16 bit value. | 6936 // Encode the two parameters in a unique 16 bit value. |
6937 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); | 6937 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); |
6938 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); | 6938 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); |
6939 } | 6939 } |
6940 | 6940 |
6941 | 6941 |
6942 #undef __ | 6942 #undef __ |
6943 | 6943 |
6944 } } // namespace v8::internal | 6944 } } // namespace v8::internal |
OLD | NEW |