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 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 __ movl(rax, Immediate(12)); | 1416 __ movl(rax, Immediate(12)); |
1417 __ movq(rdx, V8_INT64_C(0x426D1A94A2000000)); // 1.0e12 | 1417 __ movq(rdx, V8_INT64_C(0x426D1A94A2000000)); // 1.0e12 |
1418 __ vmovq(xmm6, rdx); | 1418 __ vmovq(xmm6, rdx); |
1419 __ movq(rdx, V8_INT64_C(0xC26D1A94A2000000)); // -1.0e12 | 1419 __ movq(rdx, V8_INT64_C(0xC26D1A94A2000000)); // -1.0e12 |
1420 __ vmovq(xmm7, rdx); | 1420 __ vmovq(xmm7, rdx); |
1421 __ shufps(xmm6, xmm7, 0x44); | 1421 __ shufps(xmm6, xmm7, 0x44); |
1422 __ vmovmskpd(rdx, xmm6); | 1422 __ vmovmskpd(rdx, xmm6); |
1423 __ cmpl(rdx, Immediate(2)); | 1423 __ cmpl(rdx, Immediate(2)); |
1424 __ j(not_equal, &exit); | 1424 __ j(not_equal, &exit); |
1425 | 1425 |
| 1426 // Test vpcmpeqd |
| 1427 __ movq(rdx, V8_UINT64_C(0x0123456789abcdef)); |
| 1428 __ movq(rcx, V8_UINT64_C(0x0123456788888888)); |
| 1429 __ vmovq(xmm6, rdx); |
| 1430 __ vmovq(xmm7, rcx); |
| 1431 __ vpcmpeqd(xmm8, xmm6, xmm7); |
| 1432 __ vmovq(rdx, xmm8); |
| 1433 __ movq(rcx, V8_UINT64_C(0xffffffff00000000)); |
| 1434 __ cmpq(rcx, rdx); |
| 1435 __ movl(rax, Immediate(13)); |
| 1436 __ j(not_equal, &exit); |
| 1437 |
| 1438 // Test vpsllq, vpsrlq |
| 1439 __ movl(rax, Immediate(13)); |
| 1440 __ movq(rdx, V8_UINT64_C(0x0123456789abcdef)); |
| 1441 __ vmovq(xmm6, rdx); |
| 1442 __ vpsrlq(xmm7, xmm6, 4); |
| 1443 __ vmovq(rdx, xmm7); |
| 1444 __ movq(rcx, V8_UINT64_C(0x00123456789abcde)); |
| 1445 __ cmpq(rdx, rcx); |
| 1446 __ j(not_equal, &exit); |
| 1447 __ vpsllq(xmm7, xmm6, 12); |
| 1448 __ vmovq(rdx, xmm7); |
| 1449 __ movq(rcx, V8_UINT64_C(0x3456789abcdef000)); |
| 1450 __ cmpq(rdx, rcx); |
| 1451 __ j(not_equal, &exit); |
| 1452 |
1426 __ movl(rdx, Immediate(6)); | 1453 __ movl(rdx, Immediate(6)); |
1427 __ vcvtlsi2sd(xmm6, xmm6, rdx); | 1454 __ vcvtlsi2sd(xmm6, xmm6, rdx); |
1428 __ movl(Operand(rsp, 0), Immediate(5)); | 1455 __ movl(Operand(rsp, 0), Immediate(5)); |
1429 __ vcvtlsi2sd(xmm7, xmm7, Operand(rsp, 0)); | 1456 __ vcvtlsi2sd(xmm7, xmm7, Operand(rsp, 0)); |
1430 __ vsubsd(xmm7, xmm6, xmm7); // xmm7 is 1.0 | 1457 __ vsubsd(xmm7, xmm6, xmm7); // xmm7 is 1.0 |
1431 __ vmulsd(xmm1, xmm1, xmm7); | 1458 __ vmulsd(xmm1, xmm1, xmm7); |
1432 | 1459 |
1433 __ movq(rdx, V8_INT64_C(0x3ff0000000000000)); // 1.0 | 1460 __ movq(rdx, V8_INT64_C(0x3ff0000000000000)); // 1.0 |
1434 __ vmovq(xmm7, rdx); | 1461 __ vmovq(xmm7, rdx); |
1435 __ vmulsd(xmm1, xmm1, xmm7); | 1462 __ vmulsd(xmm1, xmm1, xmm7); |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2153 | 2180 |
2154 F1 f = FUNCTION_CAST<F1>(code->entry()); | 2181 F1 f = FUNCTION_CAST<F1>(code->entry()); |
2155 for (int i = 0; i < kNumCases; ++i) { | 2182 for (int i = 0; i < kNumCases; ++i) { |
2156 int res = f(i); | 2183 int res = f(i); |
2157 PrintF("f(%d) = %d\n", i, res); | 2184 PrintF("f(%d) = %d\n", i, res); |
2158 CHECK_EQ(values[i], res); | 2185 CHECK_EQ(values[i], res); |
2159 } | 2186 } |
2160 } | 2187 } |
2161 | 2188 |
2162 #undef __ | 2189 #undef __ |
OLD | NEW |