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

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

Issue 2771513002: Add pshufw instruction, fix inconsistencies with pextrw instruction. (Closed)
Patch Set: Created 3 years, 9 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
« src/x64/assembler-x64.cc ('K') | « src/x64/disasm-x64.cc ('k') | no next file » | 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 259
260 __ testq(rdx, Immediate(12345)); 260 __ testq(rdx, Immediate(12345));
261 __ testq(Operand(rbx, rcx, times_8, 10000), rdx); 261 __ testq(Operand(rbx, rcx, times_8, 10000), rdx);
262 __ testb(Operand(rcx, rbx, times_2, 1000), rdx); 262 __ testb(Operand(rcx, rbx, times_2, 1000), rdx);
263 __ testb(Operand(rax, -20), Immediate(0x9A)); 263 __ testb(Operand(rax, -20), Immediate(0x9A));
264 __ nop(); 264 __ nop();
265 265
266 __ xorq(rdx, Immediate(12345)); 266 __ xorq(rdx, Immediate(12345));
267 __ xorq(rdx, Operand(rbx, rcx, times_8, 10000)); 267 __ xorq(rdx, Operand(rbx, rcx, times_8, 10000));
268 __ bts(Operand(rbx, rcx, times_8, 10000), rdx); 268 __ bts(Operand(rbx, rcx, times_8, 10000), rdx);
269 __ pshufw(xmm5, xmm1, 3);
269 __ hlt(); 270 __ hlt();
270 __ int3(); 271 __ int3();
271 __ ret(0); 272 __ ret(0);
272 __ ret(8); 273 __ ret(8);
273 274
274 // Calls 275 // Calls
275 276
276 Label L1, L2; 277 Label L1, L2;
277 __ bind(&L1); 278 __ bind(&L1);
278 __ nop(); 279 __ nop();
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 CpuFeatureScope scope(&assm, SSSE3); 513 CpuFeatureScope scope(&assm, SSSE3);
513 SSSE3_INSTRUCTION_LIST(EMIT_SSE34_INSTR) 514 SSSE3_INSTRUCTION_LIST(EMIT_SSE34_INSTR)
514 } 515 }
515 } 516 }
516 517
517 { 518 {
518 if (CpuFeatures::IsSupported(SSE4_1)) { 519 if (CpuFeatures::IsSupported(SSE4_1)) {
519 CpuFeatureScope scope(&assm, SSE4_1); 520 CpuFeatureScope scope(&assm, SSE4_1);
520 __ insertps(xmm5, xmm1, 123); 521 __ insertps(xmm5, xmm1, 123);
521 __ extractps(rax, xmm1, 0); 522 __ extractps(rax, xmm1, 0);
523 __ pextrw(rbx, xmm2, 1);
522 __ pextrd(rbx, xmm15, 0); 524 __ pextrd(rbx, xmm15, 0);
523 __ pextrd(r12, xmm0, 1); 525 __ pextrd(r12, xmm0, 1);
524 __ pinsrd(xmm9, r9, 0); 526 __ pinsrd(xmm9, r9, 0);
525 __ pinsrd(xmm5, Operand(rax, 4), 1); 527 __ pinsrd(xmm5, Operand(rax, 4), 1);
526 528
527 __ cmpps(xmm5, xmm1, 1); 529 __ cmpps(xmm5, xmm1, 1);
528 __ cmpps(xmm5, Operand(rbx, rcx, times_4, 10000), 1); 530 __ cmpps(xmm5, Operand(rbx, rcx, times_4, 10000), 1);
529 __ cmpeqps(xmm5, xmm1); 531 __ cmpeqps(xmm5, xmm1);
530 __ cmpeqps(xmm5, Operand(rbx, rcx, times_4, 10000)); 532 __ cmpeqps(xmm5, Operand(rbx, rcx, times_4, 10000));
531 __ cmpltps(xmm5, xmm1); 533 __ cmpltps(xmm5, xmm1);
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 #ifdef OBJECT_PRINT 947 #ifdef OBJECT_PRINT
946 OFStream os(stdout); 948 OFStream os(stdout);
947 code->Print(os); 949 code->Print(os);
948 byte* begin = code->instruction_start(); 950 byte* begin = code->instruction_start();
949 byte* end = begin + code->instruction_size(); 951 byte* end = begin + code->instruction_size();
950 disasm::Disassembler::Disassemble(stdout, begin, end); 952 disasm::Disassembler::Disassemble(stdout, begin, end);
951 #endif 953 #endif
952 } 954 }
953 955
954 #undef __ 956 #undef __
OLDNEW
« src/x64/assembler-x64.cc ('K') | « src/x64/disasm-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698