Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: test/cctest/test-code-stubs-ia32.cc

Issue 22865006: Fix bug in test-code-stubs-x64 which meant not all registers were being checked. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/test-code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 Isolate* isolate = GetIsolateFrom(&context); 129 Isolate* isolate = GetIsolateFrom(&context);
130 HandleScope scope(isolate); 130 HandleScope scope(isolate);
131 131
132 #if DEBUG 132 #if DEBUG
133 // Verify that the tests actually work with the C version. In the release 133 // Verify that the tests actually work with the C version. In the release
134 // code, the compiler optimizes it away because it's all constant, but does it 134 // code, the compiler optimizes it away because it's all constant, but does it
135 // wrong, triggering an assert on gcc. 135 // wrong, triggering an assert on gcc.
136 RunAllTruncationTests(&ConvertDToICVersion); 136 RunAllTruncationTests(&ConvertDToICVersion);
137 #endif 137 #endif
138 138
139 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, eax)); 139 Register source_registers[] = {esp, eax, ebx, ecx, edx, edi, esi};
140 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, ebx)); 140 Register dest_registers[] = {eax, ebx, ecx, edx, edi, esi};
141 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, ecx)); 141
142 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, edx)); 142 for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
143 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, edi)); 143 for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
144 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esp, esi)); 144 RunAllTruncationTests(
145 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, eax)); 145 MakeConvertDToIFuncTrampoline(isolate,
146 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, ebx)); 146 source_registers[s],
147 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, ecx)); 147 dest_registers[d]));
148 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, edx)); 148 }
149 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, edi)); 149 }
150 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, eax, esi));
151 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, eax));
152 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, ebx));
153 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, ecx));
154 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, edx));
155 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, edi));
156 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ebx, esi));
157 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, eax));
158 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, ebx));
159 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, ecx));
160 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, edx));
161 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, edi));
162 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, ecx, esi));
163 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, eax));
164 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, ebx));
165 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, ecx));
166 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, edx));
167 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, edi));
168 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edx, esi));
169 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, eax));
170 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, ebx));
171 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, ecx));
172 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, edx));
173 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, edi));
174 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, esi, esi));
175 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, eax));
176 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, ebx));
177 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, ecx));
178 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, edx));
179 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, edi));
180 RunAllTruncationTests(MakeConvertDToIFuncTrampoline(isolate, edi, esi));
181 } 150 }
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698