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

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

Issue 1411743003: [x64] Emit vcvtss2sd & vcvtsd2ss when AVX is enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « src/x64/macro-assembler-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 // arguments in xmm0, xmm1 and xmm2 1353 // arguments in xmm0, xmm1 and xmm2
1354 __ subq(rsp, Immediate(kDoubleSize * 2)); // For memory operand 1354 __ subq(rsp, Immediate(kDoubleSize * 2)); // For memory operand
1355 __ movl(rax, Immediate(0)); 1355 __ movl(rax, Immediate(0));
1356 1356
1357 __ vmaxsd(xmm4, xmm0, xmm1); 1357 __ vmaxsd(xmm4, xmm0, xmm1);
1358 __ vmovsd(Operand(rsp, kDoubleSize), xmm4); 1358 __ vmovsd(Operand(rsp, kDoubleSize), xmm4);
1359 __ vmovsd(xmm5, Operand(rsp, kDoubleSize)); 1359 __ vmovsd(xmm5, Operand(rsp, kDoubleSize));
1360 __ vmovsd(xmm6, xmm5); 1360 __ vmovsd(xmm6, xmm5);
1361 __ vmovapd(xmm3, xmm6); 1361 __ vmovapd(xmm3, xmm6);
1362 1362
1363 // Test vcvtss2sd & vcvtsd2ss
1364 __ movl(rax, Immediate(9));
1365 __ movq(rdx, V8_INT64_C(0x426D1A0000000000));
1366 __ movq(Operand(rsp, 0), rdx);
1367 __ vcvtsd2ss(xmm6, xmm6, Operand(rsp, 0));
1368 __ vcvtss2sd(xmm7, xmm6, xmm6);
1369 __ vcvtsd2ss(xmm8, xmm7, xmm7);
1370 __ movss(Operand(rsp, 0), xmm8);
1371 __ vcvtss2sd(xmm9, xmm8, Operand(rsp, 0));
1372 __ vmovq(rcx, xmm9);
1373 __ cmpq(rcx, rdx);
1374 __ j(not_equal, &exit);
1375
1363 // Test vcvttsd2si 1376 // Test vcvttsd2si
1364 __ movl(rax, Immediate(10)); 1377 __ movl(rax, Immediate(10));
1365 __ movl(rdx, Immediate(123)); 1378 __ movl(rdx, Immediate(123));
1366 __ vcvtlsi2sd(xmm6, xmm6, rdx); 1379 __ vcvtlsi2sd(xmm6, xmm6, rdx);
1367 __ vcvttsd2si(rcx, xmm6); 1380 __ vcvttsd2si(rcx, xmm6);
1368 __ cmpl(rcx, rdx); 1381 __ cmpl(rcx, rdx);
1369 __ j(not_equal, &exit); 1382 __ j(not_equal, &exit);
1370 __ xorl(rcx, rcx); 1383 __ xorl(rcx, rcx);
1371 __ vmovsd(Operand(rsp, 0), xmm6); 1384 __ vmovsd(Operand(rsp, 0), xmm6);
1372 __ vcvttsd2si(rcx, Operand(rsp, 0)); 1385 __ vcvttsd2si(rcx, Operand(rsp, 0));
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 2130
2118 F1 f = FUNCTION_CAST<F1>(code->entry()); 2131 F1 f = FUNCTION_CAST<F1>(code->entry());
2119 for (int i = 0; i < kNumCases; ++i) { 2132 for (int i = 0; i < kNumCases; ++i) {
2120 int res = f(i); 2133 int res = f(i);
2121 PrintF("f(%d) = %d\n", i, res); 2134 PrintF("f(%d) = %d\n", i, res);
2122 CHECK_EQ(values[i], res); 2135 CHECK_EQ(values[i], res);
2123 } 2136 }
2124 } 2137 }
2125 2138
2126 #undef __ 2139 #undef __
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698