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

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

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp 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-disasm-ia32.cc ('k') | test/cctest/test-heap.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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 __ fmul(3); 328 __ fmul(3);
329 __ fdiv(3); 329 __ fdiv(3);
330 330
331 __ faddp(3); 331 __ faddp(3);
332 __ fsubp(3); 332 __ fsubp(3);
333 __ fmulp(3); 333 __ fmulp(3);
334 __ fdivp(3); 334 __ fdivp(3);
335 __ fcompp(); 335 __ fcompp();
336 __ fwait(); 336 __ fwait();
337 __ nop(); 337 __ nop();
338
339 // SSE instruction
338 { 340 {
339 if (CpuFeatures::IsSupported(SSE2)) { 341 __ cvttss2si(rdx, Operand(rbx, rcx, times_4, 10000));
340 CpuFeatures::Scope fscope(SSE2); 342 __ cvttss2si(rdx, xmm1);
341 __ cvttss2si(rdx, Operand(rbx, rcx, times_4, 10000)); 343 __ movaps(xmm0, xmm1);
342 __ cvttss2si(rdx, xmm1);
343 __ cvttsd2si(rdx, Operand(rbx, rcx, times_4, 10000));
344 __ cvttsd2si(rdx, xmm1);
345 __ cvttsd2siq(rdx, xmm1);
346 __ addsd(xmm1, xmm0);
347 __ mulsd(xmm1, xmm0);
348 __ subsd(xmm1, xmm0);
349 __ divsd(xmm1, xmm0);
350 __ movsd(xmm1, Operand(rbx, rcx, times_4, 10000));
351 __ movsd(Operand(rbx, rcx, times_4, 10000), xmm1);
352 __ ucomisd(xmm0, xmm1);
353 344
354 // 128 bit move instructions. 345 __ andps(xmm0, xmm1);
355 __ movdqa(xmm0, Operand(rbx, rcx, times_4, 10000)); 346 __ orps(xmm0, xmm1);
356 __ movdqa(Operand(rbx, rcx, times_4, 10000), xmm0); 347 __ xorps(xmm0, xmm1);
357 } 348 }
349 // SSE 2 instructions
350 {
351 __ cvttsd2si(rdx, Operand(rbx, rcx, times_4, 10000));
352 __ cvttsd2si(rdx, xmm1);
353 __ cvttsd2siq(rdx, xmm1);
354 __ movsd(xmm1, Operand(rbx, rcx, times_4, 10000));
355 __ movsd(Operand(rbx, rcx, times_4, 10000), xmm1);
356 // 128 bit move instructions.
357 __ movdqa(xmm0, Operand(rbx, rcx, times_4, 10000));
358 __ movdqa(Operand(rbx, rcx, times_4, 10000), xmm0);
359
360 __ addsd(xmm1, xmm0);
361 __ mulsd(xmm1, xmm0);
362 __ subsd(xmm1, xmm0);
363 __ divsd(xmm1, xmm0);
364 __ ucomisd(xmm0, xmm1);
365
366 __ andpd(xmm0, xmm1);
358 } 367 }
359 368
360 // cmov. 369 // cmov.
361 { 370 {
362 if (CpuFeatures::IsSupported(CMOV)) { 371 __ cmovq(overflow, rax, Operand(rax, 0));
363 CpuFeatures::Scope use_cmov(CMOV); 372 __ cmovq(no_overflow, rax, Operand(rax, 1));
364 __ cmovq(overflow, rax, Operand(rax, 0)); 373 __ cmovq(below, rax, Operand(rax, 2));
365 __ cmovq(no_overflow, rax, Operand(rax, 1)); 374 __ cmovq(above_equal, rax, Operand(rax, 3));
366 __ cmovq(below, rax, Operand(rax, 2)); 375 __ cmovq(equal, rax, Operand(rbx, 0));
367 __ cmovq(above_equal, rax, Operand(rax, 3)); 376 __ cmovq(not_equal, rax, Operand(rbx, 1));
368 __ cmovq(equal, rax, Operand(rbx, 0)); 377 __ cmovq(below_equal, rax, Operand(rbx, 2));
369 __ cmovq(not_equal, rax, Operand(rbx, 1)); 378 __ cmovq(above, rax, Operand(rbx, 3));
370 __ cmovq(below_equal, rax, Operand(rbx, 2)); 379 __ cmovq(sign, rax, Operand(rcx, 0));
371 __ cmovq(above, rax, Operand(rbx, 3)); 380 __ cmovq(not_sign, rax, Operand(rcx, 1));
372 __ cmovq(sign, rax, Operand(rcx, 0)); 381 __ cmovq(parity_even, rax, Operand(rcx, 2));
373 __ cmovq(not_sign, rax, Operand(rcx, 1)); 382 __ cmovq(parity_odd, rax, Operand(rcx, 3));
374 __ cmovq(parity_even, rax, Operand(rcx, 2)); 383 __ cmovq(less, rax, Operand(rdx, 0));
375 __ cmovq(parity_odd, rax, Operand(rcx, 3)); 384 __ cmovq(greater_equal, rax, Operand(rdx, 1));
376 __ cmovq(less, rax, Operand(rdx, 0)); 385 __ cmovq(less_equal, rax, Operand(rdx, 2));
377 __ cmovq(greater_equal, rax, Operand(rdx, 1)); 386 __ cmovq(greater, rax, Operand(rdx, 3));
378 __ cmovq(less_equal, rax, Operand(rdx, 2));
379 __ cmovq(greater, rax, Operand(rdx, 3));
380 }
381 }
382
383 // andpd, etc.
384 {
385 if (CpuFeatures::IsSupported(SSE2)) {
386 CpuFeatures::Scope fscope(SSE2);
387 __ andpd(xmm0, xmm1);
388 __ andpd(xmm1, xmm2);
389
390 __ movaps(xmm0, xmm1);
391 __ movaps(xmm1, xmm2);
392 }
393 } 387 }
394 388
395 { 389 {
396 if (CpuFeatures::IsSupported(SSE4_1)) { 390 if (CpuFeatures::IsSupported(SSE4_1)) {
397 CpuFeatureScope scope(&assm, SSE4_1); 391 CpuFeatureScope scope(&assm, SSE4_1);
398 __ extractps(rax, xmm1, 0); 392 __ extractps(rax, xmm1, 0);
399 } 393 }
400 } 394 }
401 395
402 // Nop instructions 396 // Nop instructions
(...skipping 12 matching lines...) Expand all
415 CHECK(code->IsCode()); 409 CHECK(code->IsCode());
416 #ifdef OBJECT_PRINT 410 #ifdef OBJECT_PRINT
417 Code::cast(code)->Print(); 411 Code::cast(code)->Print();
418 byte* begin = Code::cast(code)->instruction_start(); 412 byte* begin = Code::cast(code)->instruction_start();
419 byte* end = begin + Code::cast(code)->instruction_size(); 413 byte* end = begin + Code::cast(code)->instruction_size();
420 disasm::Disassembler::Disassemble(stdout, begin, end); 414 disasm::Disassembler::Disassemble(stdout, begin, end);
421 #endif 415 #endif
422 } 416 }
423 417
424 #undef __ 418 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-ia32.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698