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

Side by Side Diff: test/cctest/test-disasm-ia32.cc

Issue 39973003: Merge bleeding_edge. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: again Created 7 years, 1 month 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 | « test/cctest/test-debug.cc ('k') | test/cctest/test-disasm-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 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 __ nop(); 351 __ nop();
352 { 352 {
353 if (CpuFeatures::IsSupported(SSE2)) { 353 if (CpuFeatures::IsSupported(SSE2)) {
354 CpuFeatureScope fscope(&assm, SSE2); 354 CpuFeatureScope fscope(&assm, SSE2);
355 __ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000)); 355 __ cvttss2si(edx, Operand(ebx, ecx, times_4, 10000));
356 __ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000)); 356 __ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000));
357 __ addsd(xmm1, xmm0); 357 __ addsd(xmm1, xmm0);
358 __ mulsd(xmm1, xmm0); 358 __ mulsd(xmm1, xmm0);
359 __ subsd(xmm1, xmm0); 359 __ subsd(xmm1, xmm0);
360 __ divsd(xmm1, xmm0); 360 __ divsd(xmm1, xmm0);
361 __ movdbl(xmm1, Operand(ebx, ecx, times_4, 10000)); 361 __ movsd(xmm1, Operand(ebx, ecx, times_4, 10000));
362 __ movdbl(Operand(ebx, ecx, times_4, 10000), xmm1); 362 __ movsd(Operand(ebx, ecx, times_4, 10000), xmm1);
363 __ ucomisd(xmm0, xmm1); 363 __ ucomisd(xmm0, xmm1);
364 364
365 // 128 bit move instructions. 365 // 128 bit move instructions.
366 __ movdqa(xmm0, Operand(ebx, ecx, times_4, 10000)); 366 __ movdqa(xmm0, Operand(ebx, ecx, times_4, 10000));
367 __ movdqa(Operand(ebx, ecx, times_4, 10000), xmm0); 367 __ movdqa(Operand(ebx, ecx, times_4, 10000), xmm0);
368 __ movdqu(xmm0, Operand(ebx, ecx, times_4, 10000)); 368 __ movdqu(xmm0, Operand(ebx, ecx, times_4, 10000));
369 __ movdqu(Operand(ebx, ecx, times_4, 10000), xmm0); 369 __ movdqu(Operand(ebx, ecx, times_4, 10000), xmm0);
370 } 370 }
371 } 371 }
372 372
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 __ por(xmm1, xmm2); 422 __ por(xmm1, xmm2);
423 } 423 }
424 } 424 }
425 425
426 { 426 {
427 if (CpuFeatures::IsSupported(SSE2) && 427 if (CpuFeatures::IsSupported(SSE2) &&
428 CpuFeatures::IsSupported(SSE4_1)) { 428 CpuFeatures::IsSupported(SSE4_1)) {
429 CpuFeatureScope scope(&assm, SSE4_1); 429 CpuFeatureScope scope(&assm, SSE4_1);
430 __ pextrd(eax, xmm0, 1); 430 __ pextrd(eax, xmm0, 1);
431 __ pinsrd(xmm1, eax, 0); 431 __ pinsrd(xmm1, eax, 0);
432 __ extractps(eax, xmm1, 0);
432 } 433 }
433 } 434 }
434 435
435 // Nop instructions 436 // Nop instructions
436 for (int i = 0; i < 16; i++) { 437 for (int i = 0; i < 16; i++) {
437 __ Nop(i); 438 __ Nop(i);
438 } 439 }
439 440
440 __ ret(0); 441 __ ret(0);
441 442
442 CodeDesc desc; 443 CodeDesc desc;
443 assm.GetCode(&desc); 444 assm.GetCode(&desc);
444 Object* code = isolate->heap()->CreateCode( 445 Object* code = isolate->heap()->CreateCode(
445 desc, 446 desc,
446 Code::ComputeFlags(Code::STUB), 447 Code::ComputeFlags(Code::STUB),
447 Handle<Code>())->ToObjectChecked(); 448 Handle<Code>())->ToObjectChecked();
448 CHECK(code->IsCode()); 449 CHECK(code->IsCode());
449 #ifdef OBJECT_PRINT 450 #ifdef OBJECT_PRINT
450 Code::cast(code)->Print(); 451 Code::cast(code)->Print();
451 byte* begin = Code::cast(code)->instruction_start(); 452 byte* begin = Code::cast(code)->instruction_start();
452 byte* end = begin + Code::cast(code)->instruction_size(); 453 byte* end = begin + Code::cast(code)->instruction_size();
453 disasm::Disassembler::Disassemble(stdout, begin, end); 454 disasm::Disassembler::Disassemble(stdout, begin, end);
454 #endif 455 #endif
455 } 456 }
456 457
457 #undef __ 458 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698