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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 #define BUF_SIZE 8192 | 107 #define BUF_SIZE 8192 |
108 #define SETUP() SETUP_SIZE(BUF_SIZE) | 108 #define SETUP() SETUP_SIZE(BUF_SIZE) |
109 | 109 |
110 #define INIT_V8() \ | 110 #define INIT_V8() \ |
111 CcTest::InitializeVM(); \ | 111 CcTest::InitializeVM(); \ |
112 | 112 |
113 #ifdef USE_SIMULATOR | 113 #ifdef USE_SIMULATOR |
114 | 114 |
115 // Run tests with the simulator. | 115 // Run tests with the simulator. |
116 #define SETUP_SIZE(buf_size) \ | 116 #define SETUP_SIZE(buf_size) \ |
117 Isolate* isolate = Isolate::Current(); \ | 117 Isolate* isolate = Isolate::Current(); \ |
118 HandleScope scope(isolate); \ | 118 HandleScope scope(isolate); \ |
119 ASSERT(isolate != NULL); \ | 119 ASSERT(isolate != NULL); \ |
120 byte* buf = new byte[buf_size]; \ | 120 byte* buf = new byte[buf_size]; \ |
121 MacroAssembler masm(isolate, buf, buf_size); \ | 121 MacroAssembler masm(isolate, buf, buf_size); \ |
122 Decoder<DispatchingDecoderVisitor> decoder; \ | 122 Decoder<DispatchingDecoderVisitor>* decoder = \ |
123 Simulator simulator(&decoder); \ | 123 new Decoder<DispatchingDecoderVisitor>(); \ |
124 PrintDisassembler* pdis = NULL; \ | 124 Simulator simulator(decoder); \ |
| 125 PrintDisassembler* pdis = NULL; \ |
125 RegisterDump core; | 126 RegisterDump core; |
126 | 127 |
127 /* if (Cctest::trace_sim()) { \ | 128 /* if (Cctest::trace_sim()) { \ |
128 pdis = new PrintDisassembler(stdout); \ | 129 pdis = new PrintDisassembler(stdout); \ |
129 decoder.PrependVisitor(pdis); \ | 130 decoder.PrependVisitor(pdis); \ |
130 } \ | 131 } \ |
131 */ | 132 */ |
132 | 133 |
133 // Reset the assembler and simulator, so that instructions can be generated, | 134 // Reset the assembler and simulator, so that instructions can be generated, |
134 // but don't actually emit any code. This can be used by tests that need to | 135 // 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... |
10015 AbsHelperX(-42); | 10016 AbsHelperX(-42); |
10016 AbsHelperX(kXMinInt); | 10017 AbsHelperX(kXMinInt); |
10017 AbsHelperX(kXMaxInt); | 10018 AbsHelperX(kXMaxInt); |
10018 | 10019 |
10019 AbsHelperW(0); | 10020 AbsHelperW(0); |
10020 AbsHelperW(42); | 10021 AbsHelperW(42); |
10021 AbsHelperW(-42); | 10022 AbsHelperW(-42); |
10022 AbsHelperW(kWMinInt); | 10023 AbsHelperW(kWMinInt); |
10023 AbsHelperW(kWMaxInt); | 10024 AbsHelperW(kWMaxInt); |
10024 } | 10025 } |
OLD | NEW |