OLD | NEW |
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 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 __ vcvttsd2siq(rcx, xmm6); | 1380 __ vcvttsd2siq(rcx, xmm6); |
1381 __ movq(rdx, V8_INT64_C(1000000000000)); | 1381 __ movq(rdx, V8_INT64_C(1000000000000)); |
1382 __ cmpq(rcx, rdx); | 1382 __ cmpq(rcx, rdx); |
1383 __ j(not_equal, &exit); | 1383 __ j(not_equal, &exit); |
1384 __ xorq(rcx, rcx); | 1384 __ xorq(rcx, rcx); |
1385 __ vmovsd(Operand(rsp, 0), xmm6); | 1385 __ vmovsd(Operand(rsp, 0), xmm6); |
1386 __ vcvttsd2siq(rcx, Operand(rsp, 0)); | 1386 __ vcvttsd2siq(rcx, Operand(rsp, 0)); |
1387 __ cmpq(rcx, rdx); | 1387 __ cmpq(rcx, rdx); |
1388 __ j(not_equal, &exit); | 1388 __ j(not_equal, &exit); |
1389 | 1389 |
| 1390 // Test vmovmskpd |
| 1391 __ movl(rax, Immediate(12)); |
| 1392 __ movq(rdx, V8_INT64_C(0x426D1A94A2000000)); // 1.0e12 |
| 1393 __ vmovq(xmm6, rdx); |
| 1394 __ movq(rdx, V8_INT64_C(0xC26D1A94A2000000)); // -1.0e12 |
| 1395 __ vmovq(xmm7, rdx); |
| 1396 __ shufps(xmm6, xmm7, 0x44); |
| 1397 __ vmovmskpd(rdx, xmm6); |
| 1398 __ cmpl(rdx, Immediate(2)); |
| 1399 __ j(not_equal, &exit); |
| 1400 |
1390 __ movl(rdx, Immediate(6)); | 1401 __ movl(rdx, Immediate(6)); |
1391 __ vcvtlsi2sd(xmm6, xmm6, rdx); | 1402 __ vcvtlsi2sd(xmm6, xmm6, rdx); |
1392 __ movl(Operand(rsp, 0), Immediate(5)); | 1403 __ movl(Operand(rsp, 0), Immediate(5)); |
1393 __ vcvtlsi2sd(xmm7, xmm7, Operand(rsp, 0)); | 1404 __ vcvtlsi2sd(xmm7, xmm7, Operand(rsp, 0)); |
1394 __ vsubsd(xmm7, xmm6, xmm7); // xmm7 is 1.0 | 1405 __ vsubsd(xmm7, xmm6, xmm7); // xmm7 is 1.0 |
1395 __ vmulsd(xmm1, xmm1, xmm7); | 1406 __ vmulsd(xmm1, xmm1, xmm7); |
1396 | 1407 |
1397 __ movq(rdx, V8_INT64_C(0x3ff0000000000000)); // 1.0 | 1408 __ movq(rdx, V8_INT64_C(0x3ff0000000000000)); // 1.0 |
1398 __ vmovq(xmm7, rdx); | 1409 __ vmovq(xmm7, rdx); |
1399 __ vmulsd(xmm1, xmm1, xmm7); | 1410 __ vmulsd(xmm1, xmm1, xmm7); |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 | 2128 |
2118 F1 f = FUNCTION_CAST<F1>(code->entry()); | 2129 F1 f = FUNCTION_CAST<F1>(code->entry()); |
2119 for (int i = 0; i < kNumCases; ++i) { | 2130 for (int i = 0; i < kNumCases; ++i) { |
2120 int res = f(i); | 2131 int res = f(i); |
2121 PrintF("f(%d) = %d\n", i, res); | 2132 PrintF("f(%d) = %d\n", i, res); |
2122 CHECK_EQ(values[i], res); | 2133 CHECK_EQ(values[i], res); |
2123 } | 2134 } |
2124 } | 2135 } |
2125 | 2136 |
2126 #undef __ | 2137 #undef __ |
OLD | NEW |