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 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1509 | 1509 |
1510 // Test vcvtqsi2sd | 1510 // Test vcvtqsi2sd |
1511 __ movl(rax, Immediate(18)); | 1511 __ movl(rax, Immediate(18)); |
1512 __ movq(rdx, V8_UINT64_C(0x2000000000000000)); // 2 << 0x3c | 1512 __ movq(rdx, V8_UINT64_C(0x2000000000000000)); // 2 << 0x3c |
1513 __ movq(rcx, V8_UINT64_C(0x43c0000000000000)); | 1513 __ movq(rcx, V8_UINT64_C(0x43c0000000000000)); |
1514 __ vmovq(xmm5, rcx); | 1514 __ vmovq(xmm5, rcx); |
1515 __ vcvtqsi2sd(xmm6, xmm6, rdx); | 1515 __ vcvtqsi2sd(xmm6, xmm6, rdx); |
1516 __ vucomisd(xmm5, xmm6); | 1516 __ vucomisd(xmm5, xmm6); |
1517 __ j(not_equal, &exit); | 1517 __ j(not_equal, &exit); |
1518 | 1518 |
| 1519 // Test vcvtsd2si |
| 1520 __ movl(rax, Immediate(19)); |
| 1521 __ movq(rdx, V8_UINT64_C(0x4018000000000000)); // 6.0 |
| 1522 __ vmovq(xmm5, rdx); |
| 1523 __ vcvtsd2si(rcx, xmm5); |
| 1524 __ cmpl(rcx, Immediate(6)); |
| 1525 __ j(not_equal, &exit); |
| 1526 |
1519 __ movq(rdx, V8_INT64_C(0x3ff0000000000000)); // 1.0 | 1527 __ movq(rdx, V8_INT64_C(0x3ff0000000000000)); // 1.0 |
1520 __ vmovq(xmm7, rdx); | 1528 __ vmovq(xmm7, rdx); |
1521 __ vmulsd(xmm1, xmm1, xmm7); | 1529 __ vmulsd(xmm1, xmm1, xmm7); |
1522 __ movq(Operand(rsp, 0), rdx); | 1530 __ movq(Operand(rsp, 0), rdx); |
1523 __ vmovq(xmm6, Operand(rsp, 0)); | 1531 __ vmovq(xmm6, Operand(rsp, 0)); |
1524 __ vmulsd(xmm1, xmm1, xmm6); | 1532 __ vmulsd(xmm1, xmm1, xmm6); |
1525 | 1533 |
1526 __ vucomisd(xmm3, xmm1); | 1534 __ vucomisd(xmm3, xmm1); |
1527 __ j(parity_even, &exit); | 1535 __ j(parity_even, &exit); |
1528 __ j(not_equal, &exit); | 1536 __ j(not_equal, &exit); |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2239 | 2247 |
2240 F1 f = FUNCTION_CAST<F1>(code->entry()); | 2248 F1 f = FUNCTION_CAST<F1>(code->entry()); |
2241 for (int i = 0; i < kNumCases; ++i) { | 2249 for (int i = 0; i < kNumCases; ++i) { |
2242 int res = f(i); | 2250 int res = f(i); |
2243 PrintF("f(%d) = %d\n", i, res); | 2251 PrintF("f(%d) = %d\n", i, res); |
2244 CHECK_EQ(values[i], res); | 2252 CHECK_EQ(values[i], res); |
2245 } | 2253 } |
2246 } | 2254 } |
2247 | 2255 |
2248 #undef __ | 2256 #undef __ |
OLD | NEW |