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 14 matching lines...) Expand all Loading... |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include <stdlib.h> | 28 #include <stdlib.h> |
29 | 29 |
30 #include "src/v8.h" | 30 #include "src/v8.h" |
31 | 31 |
32 #include "src/base/platform/platform.h" | 32 #include "src/base/platform/platform.h" |
33 #include "src/factory.h" | 33 #include "src/factory.h" |
34 #include "src/macro-assembler.h" | 34 #include "src/macro-assembler.h" |
| 35 #include "src/ostreams.h" |
35 #include "src/serialize.h" | 36 #include "src/serialize.h" |
36 #include "test/cctest/cctest.h" | 37 #include "test/cctest/cctest.h" |
37 | 38 |
38 using namespace v8::internal; | 39 using namespace v8::internal; |
39 | 40 |
40 // Test the x64 assembler by compiling some simple functions into | 41 // Test the x64 assembler by compiling some simple functions into |
41 // a buffer and executing them. These tests do not initialize the | 42 // a buffer and executing them. These tests do not initialize the |
42 // V8 library, create a context, or use any V8 objects. | 43 // V8 library, create a context, or use any V8 objects. |
43 // The AMD64 calling convention is used, with the first six arguments | 44 // The AMD64 calling convention is used, with the first six arguments |
44 // in RDI, RSI, RDX, RCX, R8, and R9, and floating point arguments in | 45 // in RDI, RSI, RDX, RCX, R8, and R9, and floating point arguments in |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 Handle<Code>()); | 730 Handle<Code>()); |
730 #ifdef OBJECT_PRINT | 731 #ifdef OBJECT_PRINT |
731 OFStream os(stdout); | 732 OFStream os(stdout); |
732 code->Print(os); | 733 code->Print(os); |
733 #endif | 734 #endif |
734 | 735 |
735 F6 f = FUNCTION_CAST<F6>(code->entry()); | 736 F6 f = FUNCTION_CAST<F6>(code->entry()); |
736 CHECK_EQ(2, f(1.0, 2.0)); | 737 CHECK_EQ(2, f(1.0, 2.0)); |
737 } | 738 } |
738 #undef __ | 739 #undef __ |
OLD | NEW |