| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 17 matching lines...) Expand all Loading... |
| 28 #include <stdio.h> | 28 #include <stdio.h> |
| 29 #include <stdlib.h> | 29 #include <stdlib.h> |
| 30 #include <string.h> | 30 #include <string.h> |
| 31 #include <cmath> | 31 #include <cmath> |
| 32 #include <limits> | 32 #include <limits> |
| 33 | 33 |
| 34 #include "v8.h" | 34 #include "v8.h" |
| 35 | 35 |
| 36 #include "macro-assembler.h" | 36 #include "macro-assembler.h" |
| 37 #include "a64/simulator-a64.h" | 37 #include "a64/simulator-a64.h" |
| 38 #include "a64/decoder-a64-inl.h" |
| 38 #include "a64/disasm-a64.h" | 39 #include "a64/disasm-a64.h" |
| 39 #include "a64/utils-a64.h" | 40 #include "a64/utils-a64.h" |
| 40 #include "cctest.h" | 41 #include "cctest.h" |
| 41 #include "test-utils-a64.h" | 42 #include "test-utils-a64.h" |
| 42 | 43 |
| 43 using namespace v8::internal; | 44 using namespace v8::internal; |
| 44 | 45 |
| 45 // Test infrastructure. | 46 // Test infrastructure. |
| 46 // | 47 // |
| 47 // Tests are functions which accept no parameters and have no return values. | 48 // Tests are functions which accept no parameters and have no return values. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 106 |
| 106 #define BUF_SIZE 8192 | 107 #define BUF_SIZE 8192 |
| 107 #define SETUP() SETUP_SIZE(BUF_SIZE) | 108 #define SETUP() SETUP_SIZE(BUF_SIZE) |
| 108 | 109 |
| 109 #define INIT_V8() \ | 110 #define INIT_V8() \ |
| 110 CcTest::InitializeVM(); \ | 111 CcTest::InitializeVM(); \ |
| 111 | 112 |
| 112 #ifdef USE_SIMULATOR | 113 #ifdef USE_SIMULATOR |
| 113 | 114 |
| 114 // Run tests with the simulator. | 115 // Run tests with the simulator. |
| 115 #define SETUP_SIZE(buf_size) \ | 116 #define SETUP_SIZE(buf_size) \ |
| 116 Isolate* isolate = Isolate::Current(); \ | 117 Isolate* isolate = Isolate::Current(); \ |
| 117 HandleScope scope(isolate); \ | 118 HandleScope scope(isolate); \ |
| 118 ASSERT(isolate != NULL); \ | 119 ASSERT(isolate != NULL); \ |
| 119 byte* buf = new byte[buf_size]; \ | 120 byte* buf = new byte[buf_size]; \ |
| 120 MacroAssembler masm(isolate, buf, buf_size); \ | 121 MacroAssembler masm(isolate, buf, buf_size); \ |
| 121 Decoder decoder; \ | 122 Decoder<DispatchingDecoderVisitor> decoder; \ |
| 122 Simulator simulator(&decoder); \ | 123 Simulator simulator(&decoder); \ |
| 123 PrintDisassembler* pdis = NULL; \ | 124 PrintDisassembler* pdis = NULL; \ |
| 124 RegisterDump core; | 125 RegisterDump core; |
| 125 | 126 |
| 126 /* if (Cctest::trace_sim()) { \ | 127 /* if (Cctest::trace_sim()) { \ |
| 127 pdis = new PrintDisassembler(stdout); \ | 128 pdis = new PrintDisassembler(stdout); \ |
| 128 decoder.PrependVisitor(pdis); \ | 129 decoder.PrependVisitor(pdis); \ |
| 129 } \ | 130 } \ |
| 130 */ | 131 */ |
| 131 | 132 |
| 132 // Reset the assembler and simulator, so that instructions can be generated, | 133 // Reset the assembler and simulator, so that instructions can be generated, |
| 133 // but don't actually emit any code. This can be used by tests that need to | 134 // but don't actually emit any code. This can be used by tests that need to |
| (...skipping 9880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10014 AbsHelperX(-42); | 10015 AbsHelperX(-42); |
| 10015 AbsHelperX(kXMinInt); | 10016 AbsHelperX(kXMinInt); |
| 10016 AbsHelperX(kXMaxInt); | 10017 AbsHelperX(kXMaxInt); |
| 10017 | 10018 |
| 10018 AbsHelperW(0); | 10019 AbsHelperW(0); |
| 10019 AbsHelperW(42); | 10020 AbsHelperW(42); |
| 10020 AbsHelperW(-42); | 10021 AbsHelperW(-42); |
| 10021 AbsHelperW(kWMinInt); | 10022 AbsHelperW(kWMinInt); |
| 10022 AbsHelperW(kWMaxInt); | 10023 AbsHelperW(kWMaxInt); |
| 10023 } | 10024 } |
| OLD | NEW |