| 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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 { CpuFeatureScope fscope2(&assm, SSE4_1); | 682 { CpuFeatureScope fscope2(&assm, SSE4_1); |
| 683 __ extractps(rax, xmm0, 0x1); | 683 __ extractps(rax, xmm0, 0x1); |
| 684 __ ret(0); | 684 __ ret(0); |
| 685 } | 685 } |
| 686 | 686 |
| 687 CodeDesc desc; | 687 CodeDesc desc; |
| 688 assm.GetCode(&desc); | 688 assm.GetCode(&desc); |
| 689 Handle<Code> code = isolate->factory()->NewCode( | 689 Handle<Code> code = isolate->factory()->NewCode( |
| 690 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 690 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
| 691 #ifdef OBJECT_PRINT | 691 #ifdef OBJECT_PRINT |
| 692 code->Print(); | 692 OFStream os(stdout); |
| 693 code->Print(os); |
| 693 #endif | 694 #endif |
| 694 | 695 |
| 695 F3 f = FUNCTION_CAST<F3>(code->entry()); | 696 F3 f = FUNCTION_CAST<F3>(code->entry()); |
| 696 uint64_t value1 = V8_2PART_UINT64_C(0x12345678, 87654321); | 697 uint64_t value1 = V8_2PART_UINT64_C(0x12345678, 87654321); |
| 697 CHECK_EQ(0x12345678, f(uint64_to_double(value1))); | 698 CHECK_EQ(0x12345678, f(uint64_to_double(value1))); |
| 698 uint64_t value2 = V8_2PART_UINT64_C(0x87654321, 12345678); | 699 uint64_t value2 = V8_2PART_UINT64_C(0x87654321, 12345678); |
| 699 CHECK_EQ(0x87654321, f(uint64_to_double(value2))); | 700 CHECK_EQ(0x87654321, f(uint64_to_double(value2))); |
| 700 } | 701 } |
| 701 | 702 |
| 702 | 703 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 720 __ ret(0); | 721 __ ret(0); |
| 721 } | 722 } |
| 722 | 723 |
| 723 CodeDesc desc; | 724 CodeDesc desc; |
| 724 assm.GetCode(&desc); | 725 assm.GetCode(&desc); |
| 725 Handle<Code> code = isolate->factory()->NewCode( | 726 Handle<Code> code = isolate->factory()->NewCode( |
| 726 desc, | 727 desc, |
| 727 Code::ComputeFlags(Code::STUB), | 728 Code::ComputeFlags(Code::STUB), |
| 728 Handle<Code>()); | 729 Handle<Code>()); |
| 729 #ifdef OBJECT_PRINT | 730 #ifdef OBJECT_PRINT |
| 730 code->Print(); | 731 OFStream os(stdout); |
| 732 code->Print(os); |
| 731 #endif | 733 #endif |
| 732 | 734 |
| 733 F6 f = FUNCTION_CAST<F6>(code->entry()); | 735 F6 f = FUNCTION_CAST<F6>(code->entry()); |
| 734 CHECK_EQ(2, f(1.0, 2.0)); | 736 CHECK_EQ(2, f(1.0, 2.0)); |
| 735 } | 737 } |
| 736 #undef __ | 738 #undef __ |
| OLD | NEW |