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

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

Issue 1396283004: Revert of [x64] Use vcvtlsi2sd 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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 Label exit; 1352 Label exit;
1353 // arguments in xmm0, xmm1 and xmm2 1353 // arguments in xmm0, xmm1 and xmm2
1354 __ movl(rax, Immediate(0)); 1354 __ movl(rax, Immediate(0));
1355 1355
1356 __ vmaxsd(xmm4, xmm0, xmm1); 1356 __ vmaxsd(xmm4, xmm0, xmm1);
1357 __ subq(rsp, Immediate(kDoubleSize * 2)); // For memory operand 1357 __ subq(rsp, Immediate(kDoubleSize * 2)); // For memory operand
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
1363 __ movl(rdi, Immediate(6));
1364 __ vcvtlsi2sd(xmm6, xmm6, rdi);
1365 __ movl(Operand(rsp, 0), Immediate(5));
1366 __ vcvtlsi2sd(xmm7, xmm7, Operand(rsp, 0));
1367 __ vsubsd(xmm7, xmm6, xmm7); // xmm7 is 1.0
1368 __ vmulsd(xmm1, xmm1, xmm7);
1369 __ addq(rsp, Immediate(kDoubleSize * 2)); 1362 __ addq(rsp, Immediate(kDoubleSize * 2));
1370 1363
1371 __ vucomisd(xmm3, xmm1); 1364 __ vucomisd(xmm3, xmm1);
1372 __ j(parity_even, &exit); 1365 __ j(parity_even, &exit);
1373 __ j(not_equal, &exit); 1366 __ j(not_equal, &exit);
1374 __ movl(rax, Immediate(1)); 1367 __ movl(rax, Immediate(1));
1375 1368
1376 __ vminsd(xmm3, xmm1, xmm2); 1369 __ vminsd(xmm3, xmm1, xmm2);
1377 __ vucomisd(xmm3, xmm1); 1370 __ vucomisd(xmm3, xmm1);
1378 __ j(parity_even, &exit); 1371 __ j(parity_even, &exit);
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 2076
2084 F1 f = FUNCTION_CAST<F1>(code->entry()); 2077 F1 f = FUNCTION_CAST<F1>(code->entry());
2085 for (int i = 0; i < kNumCases; ++i) { 2078 for (int i = 0; i < kNumCases; ++i) {
2086 int res = f(i); 2079 int res = f(i);
2087 PrintF("f(%d) = %d\n", i, res); 2080 PrintF("f(%d) = %d\n", i, res);
2088 CHECK_EQ(values[i], res); 2081 CHECK_EQ(values[i], res);
2089 } 2082 }
2090 } 2083 }
2091 2084
2092 #undef __ 2085 #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