OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 __ mov(Operand(ebx, ecx, times_4, 10000), edx); | 161 __ mov(Operand(ebx, ecx, times_4, 10000), edx); |
162 __ nop(); | 162 __ nop(); |
163 __ dec_b(edx); | 163 __ dec_b(edx); |
164 __ dec_b(Operand(eax, 10)); | 164 __ dec_b(Operand(eax, 10)); |
165 __ dec_b(Operand(ebx, ecx, times_4, 10000)); | 165 __ dec_b(Operand(ebx, ecx, times_4, 10000)); |
166 __ dec(edx); | 166 __ dec(edx); |
167 __ cdq(); | 167 __ cdq(); |
168 | 168 |
169 __ nop(); | 169 __ nop(); |
170 __ idiv(edx); | 170 __ idiv(edx); |
| 171 __ idiv(Operand(edx, ecx, times_1, 1)); |
| 172 __ idiv(Operand(esp, 12)); |
| 173 __ div(edx); |
| 174 __ div(Operand(edx, ecx, times_1, 1)); |
| 175 __ div(Operand(esp, 12)); |
171 __ mul(edx); | 176 __ mul(edx); |
172 __ neg(edx); | 177 __ neg(edx); |
173 __ not_(edx); | 178 __ not_(edx); |
174 __ test(Operand(ebx, ecx, times_4, 10000), Immediate(123456)); | 179 __ test(Operand(ebx, ecx, times_4, 10000), Immediate(123456)); |
175 | 180 |
176 __ imul(edx, Operand(ebx, ecx, times_4, 10000)); | 181 __ imul(edx, Operand(ebx, ecx, times_4, 10000)); |
177 __ imul(edx, ecx, 12); | 182 __ imul(edx, ecx, 12); |
| 183 __ imul(edx, Operand(edx, eax, times_2, 42), 8); |
178 __ imul(edx, ecx, 1000); | 184 __ imul(edx, ecx, 1000); |
| 185 __ imul(edx, Operand(ebx, ecx, times_4, 1), 9000); |
179 | 186 |
180 __ inc(edx); | 187 __ inc(edx); |
181 __ inc(Operand(ebx, ecx, times_4, 10000)); | 188 __ inc(Operand(ebx, ecx, times_4, 10000)); |
182 __ push(Operand(ebx, ecx, times_4, 10000)); | 189 __ push(Operand(ebx, ecx, times_4, 10000)); |
183 __ pop(Operand(ebx, ecx, times_4, 10000)); | 190 __ pop(Operand(ebx, ecx, times_4, 10000)); |
184 __ call(Operand(ebx, ecx, times_4, 10000)); | 191 __ call(Operand(ebx, ecx, times_4, 10000)); |
185 __ jmp(Operand(ebx, ecx, times_4, 10000)); | 192 __ jmp(Operand(ebx, ecx, times_4, 10000)); |
186 | 193 |
187 __ lea(edx, Operand(ebx, ecx, times_4, 10000)); | 194 __ lea(edx, Operand(ebx, ecx, times_4, 10000)); |
188 __ or_(edx, 12345); | 195 __ or_(edx, 12345); |
189 __ or_(edx, Operand(ebx, ecx, times_4, 10000)); | 196 __ or_(edx, Operand(ebx, ecx, times_4, 10000)); |
190 | 197 |
191 __ nop(); | 198 __ nop(); |
192 | 199 |
193 __ rcl(edx, 1); | 200 __ rcl(edx, 1); |
194 __ rcl(edx, 7); | 201 __ rcl(edx, 7); |
195 __ rcr(edx, 1); | 202 __ rcr(edx, 1); |
196 __ rcr(edx, 7); | 203 __ rcr(edx, 7); |
197 __ sar(edx, 1); | 204 __ sar(edx, 1); |
198 __ sar(edx, 6); | 205 __ sar(edx, 6); |
199 __ sar_cl(edx); | 206 __ sar_cl(edx); |
| 207 __ sar(Operand(ebx, ecx, times_4, 10000), 1); |
| 208 __ sar(Operand(ebx, ecx, times_4, 10000), 6); |
| 209 __ sar_cl(Operand(ebx, ecx, times_4, 10000)); |
200 __ sbb(edx, Operand(ebx, ecx, times_4, 10000)); | 210 __ sbb(edx, Operand(ebx, ecx, times_4, 10000)); |
201 __ shld(edx, Operand(ebx, ecx, times_4, 10000)); | 211 __ shld(edx, Operand(ebx, ecx, times_4, 10000)); |
202 __ shl(edx, 1); | 212 __ shl(edx, 1); |
203 __ shl(edx, 6); | 213 __ shl(edx, 6); |
204 __ shl_cl(edx); | 214 __ shl_cl(edx); |
| 215 __ shl(Operand(ebx, ecx, times_4, 10000), 1); |
| 216 __ shl(Operand(ebx, ecx, times_4, 10000), 6); |
| 217 __ shl_cl(Operand(ebx, ecx, times_4, 10000)); |
205 __ shrd(edx, Operand(ebx, ecx, times_4, 10000)); | 218 __ shrd(edx, Operand(ebx, ecx, times_4, 10000)); |
206 __ shr(edx, 1); | 219 __ shr(edx, 1); |
207 __ shr(edx, 7); | 220 __ shr(edx, 7); |
208 __ shr_cl(edx); | 221 __ shr_cl(edx); |
| 222 __ shr(Operand(ebx, ecx, times_4, 10000), 1); |
| 223 __ shr(Operand(ebx, ecx, times_4, 10000), 6); |
| 224 __ shr_cl(Operand(ebx, ecx, times_4, 10000)); |
209 | 225 |
210 | 226 |
211 // Immediates | 227 // Immediates |
212 | 228 |
213 __ adc(edx, 12345); | 229 __ adc(edx, 12345); |
214 | 230 |
215 __ add(ebx, Immediate(12)); | 231 __ add(ebx, Immediate(12)); |
216 __ add(Operand(edx, ecx, times_4, 10000), Immediate(12)); | 232 __ add(Operand(edx, ecx, times_4, 10000), Immediate(12)); |
217 | 233 |
218 __ and_(ebx, 12345); | 234 __ and_(ebx, 12345); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 450 |
435 { | 451 { |
436 if (CpuFeatures::IsSupported(SSE4_1)) { | 452 if (CpuFeatures::IsSupported(SSE4_1)) { |
437 CpuFeatureScope scope(&assm, SSE4_1); | 453 CpuFeatureScope scope(&assm, SSE4_1); |
438 __ pextrd(eax, xmm0, 1); | 454 __ pextrd(eax, xmm0, 1); |
439 __ pinsrd(xmm1, eax, 0); | 455 __ pinsrd(xmm1, eax, 0); |
440 __ extractps(eax, xmm1, 0); | 456 __ extractps(eax, xmm1, 0); |
441 } | 457 } |
442 } | 458 } |
443 | 459 |
| 460 // xchg. |
| 461 { |
| 462 __ xchg(eax, eax); |
| 463 __ xchg(eax, ebx); |
| 464 __ xchg(ebx, ebx); |
| 465 __ xchg(ebx, Operand(esp, 12)); |
| 466 } |
| 467 |
444 // Nop instructions | 468 // Nop instructions |
445 for (int i = 0; i < 16; i++) { | 469 for (int i = 0; i < 16; i++) { |
446 __ Nop(i); | 470 __ Nop(i); |
447 } | 471 } |
448 | 472 |
449 __ ret(0); | 473 __ ret(0); |
450 | 474 |
451 CodeDesc desc; | 475 CodeDesc desc; |
452 assm.GetCode(&desc); | 476 assm.GetCode(&desc); |
453 Handle<Code> code = isolate->factory()->NewCode( | 477 Handle<Code> code = isolate->factory()->NewCode( |
454 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 478 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
455 USE(code); | 479 USE(code); |
456 #ifdef OBJECT_PRINT | 480 #ifdef OBJECT_PRINT |
457 OFStream os(stdout); | 481 OFStream os(stdout); |
458 code->Print(os); | 482 code->Print(os); |
459 byte* begin = code->instruction_start(); | 483 byte* begin = code->instruction_start(); |
460 byte* end = begin + code->instruction_size(); | 484 byte* end = begin + code->instruction_size(); |
461 disasm::Disassembler::Disassemble(stdout, begin, end); | 485 disasm::Disassembler::Disassemble(stdout, begin, end); |
462 #endif | 486 #endif |
463 } | 487 } |
464 | 488 |
465 #undef __ | 489 #undef __ |
OLD | NEW |