| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 10136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10147 ASSERT_EQUAL_FP32(qn_proc, s14); | 10147 ASSERT_EQUAL_FP32(qn_proc, s14); |
| 10148 ASSERT_EQUAL_FP32(qn_proc, s15); | 10148 ASSERT_EQUAL_FP32(qn_proc, s15); |
| 10149 ASSERT_EQUAL_FP32(qn_proc, s16); | 10149 ASSERT_EQUAL_FP32(qn_proc, s16); |
| 10150 ASSERT_EQUAL_FP32(qn_proc, s17); | 10150 ASSERT_EQUAL_FP32(qn_proc, s17); |
| 10151 | 10151 |
| 10152 TEARDOWN(); | 10152 TEARDOWN(); |
| 10153 } | 10153 } |
| 10154 | 10154 |
| 10155 | 10155 |
| 10156 static void ProcessNaNsHelper(double n, double m, double expected) { | 10156 static void ProcessNaNsHelper(double n, double m, double expected) { |
| 10157 ASSERT(isnan(n) || isnan(m)); | 10157 ASSERT(std::isnan(n) || std::isnan(m)); |
| 10158 ASSERT(isnan(expected)); | 10158 ASSERT(isnan(expected)); |
| 10159 | 10159 |
| 10160 SETUP(); | 10160 SETUP(); |
| 10161 START(); | 10161 START(); |
| 10162 | 10162 |
| 10163 // Execute a number of instructions which all use ProcessNaNs, and check that | 10163 // Execute a number of instructions which all use ProcessNaNs, and check that |
| 10164 // they all propagate NaNs correctly. | 10164 // they all propagate NaNs correctly. |
| 10165 __ Fmov(d0, n); | 10165 __ Fmov(d0, n); |
| 10166 __ Fmov(d1, m); | 10166 __ Fmov(d1, m); |
| 10167 | 10167 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10219 ProcessNaNsHelper(sn, sm, sn_proc); | 10219 ProcessNaNsHelper(sn, sm, sn_proc); |
| 10220 | 10220 |
| 10221 // Signalling NaNs take precedence over quiet NaNs. | 10221 // Signalling NaNs take precedence over quiet NaNs. |
| 10222 ProcessNaNsHelper(sn, qm, sn_proc); | 10222 ProcessNaNsHelper(sn, qm, sn_proc); |
| 10223 ProcessNaNsHelper(qn, sm, sm_proc); | 10223 ProcessNaNsHelper(qn, sm, sm_proc); |
| 10224 ProcessNaNsHelper(sn, sm, sn_proc); | 10224 ProcessNaNsHelper(sn, sm, sn_proc); |
| 10225 } | 10225 } |
| 10226 | 10226 |
| 10227 | 10227 |
| 10228 static void ProcessNaNsHelper(float n, float m, float expected) { | 10228 static void ProcessNaNsHelper(float n, float m, float expected) { |
| 10229 ASSERT(isnan(n) || isnan(m)); | 10229 ASSERT(std::isnan(n) || std::isnan(m)); |
| 10230 ASSERT(isnan(expected)); | 10230 ASSERT(isnan(expected)); |
| 10231 | 10231 |
| 10232 SETUP(); | 10232 SETUP(); |
| 10233 START(); | 10233 START(); |
| 10234 | 10234 |
| 10235 // Execute a number of instructions which all use ProcessNaNs, and check that | 10235 // Execute a number of instructions which all use ProcessNaNs, and check that |
| 10236 // they all propagate NaNs correctly. | 10236 // they all propagate NaNs correctly. |
| 10237 __ Fmov(s0, n); | 10237 __ Fmov(s0, n); |
| 10238 __ Fmov(s1, m); | 10238 __ Fmov(s1, m); |
| 10239 | 10239 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10291 ProcessNaNsHelper(sn, sm, sn_proc); | 10291 ProcessNaNsHelper(sn, sm, sn_proc); |
| 10292 | 10292 |
| 10293 // Signalling NaNs take precedence over quiet NaNs. | 10293 // Signalling NaNs take precedence over quiet NaNs. |
| 10294 ProcessNaNsHelper(sn, qm, sn_proc); | 10294 ProcessNaNsHelper(sn, qm, sn_proc); |
| 10295 ProcessNaNsHelper(qn, sm, sm_proc); | 10295 ProcessNaNsHelper(qn, sm, sm_proc); |
| 10296 ProcessNaNsHelper(sn, sm, sn_proc); | 10296 ProcessNaNsHelper(sn, sm, sn_proc); |
| 10297 } | 10297 } |
| 10298 | 10298 |
| 10299 | 10299 |
| 10300 static void DefaultNaNHelper(float n, float m, float a) { | 10300 static void DefaultNaNHelper(float n, float m, float a) { |
| 10301 ASSERT(isnan(n) || isnan(m) || isnan(a)); | 10301 ASSERT(std::isnan(n) || std::isnan(m) || isnan(a)); |
| 10302 | 10302 |
| 10303 bool test_1op = isnan(n); | 10303 bool test_1op = std::isnan(n); |
| 10304 bool test_2op = isnan(n) || isnan(m); | 10304 bool test_2op = std::isnan(n) || std::isnan(m); |
| 10305 | 10305 |
| 10306 SETUP(); | 10306 SETUP(); |
| 10307 START(); | 10307 START(); |
| 10308 | 10308 |
| 10309 // Enable Default-NaN mode in the FPCR. | 10309 // Enable Default-NaN mode in the FPCR. |
| 10310 __ Mrs(x0, FPCR); | 10310 __ Mrs(x0, FPCR); |
| 10311 __ Orr(x1, x0, DN_mask); | 10311 __ Orr(x1, x0, DN_mask); |
| 10312 __ Msr(FPCR, x1); | 10312 __ Msr(FPCR, x1); |
| 10313 | 10313 |
| 10314 // Execute a number of instructions which all use ProcessNaNs, and check that | 10314 // Execute a number of instructions which all use ProcessNaNs, and check that |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10419 DefaultNaNHelper(sn, qm, sa); | 10419 DefaultNaNHelper(sn, qm, sa); |
| 10420 DefaultNaNHelper(sn, sm, qa); | 10420 DefaultNaNHelper(sn, sm, qa); |
| 10421 DefaultNaNHelper(qn, qm, sa); | 10421 DefaultNaNHelper(qn, qm, sa); |
| 10422 DefaultNaNHelper(sn, qm, qa); | 10422 DefaultNaNHelper(sn, qm, qa); |
| 10423 DefaultNaNHelper(qn, sm, qa); | 10423 DefaultNaNHelper(qn, sm, qa); |
| 10424 DefaultNaNHelper(qn, qm, qa); | 10424 DefaultNaNHelper(qn, qm, qa); |
| 10425 } | 10425 } |
| 10426 | 10426 |
| 10427 | 10427 |
| 10428 static void DefaultNaNHelper(double n, double m, double a) { | 10428 static void DefaultNaNHelper(double n, double m, double a) { |
| 10429 ASSERT(isnan(n) || isnan(m) || isnan(a)); | 10429 ASSERT(std::isnan(n) || std::isnan(m) || isnan(a)); |
| 10430 | 10430 |
| 10431 bool test_1op = isnan(n); | 10431 bool test_1op = std::isnan(n); |
| 10432 bool test_2op = isnan(n) || isnan(m); | 10432 bool test_2op = std::isnan(n) || std::isnan(m); |
| 10433 | 10433 |
| 10434 SETUP(); | 10434 SETUP(); |
| 10435 START(); | 10435 START(); |
| 10436 | 10436 |
| 10437 // Enable Default-NaN mode in the FPCR. | 10437 // Enable Default-NaN mode in the FPCR. |
| 10438 __ Mrs(x0, FPCR); | 10438 __ Mrs(x0, FPCR); |
| 10439 __ Orr(x1, x0, DN_mask); | 10439 __ Orr(x1, x0, DN_mask); |
| 10440 __ Msr(FPCR, x1); | 10440 __ Msr(FPCR, x1); |
| 10441 | 10441 |
| 10442 // Execute a number of instructions which all use ProcessNaNs, and check that | 10442 // Execute a number of instructions which all use ProcessNaNs, and check that |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10772 if (RelocInfo::IsVeneerPool(info->rmode())) { | 10772 if (RelocInfo::IsVeneerPool(info->rmode())) { |
| 10773 ASSERT(info->data() == veneer_pool_size); | 10773 ASSERT(info->data() == veneer_pool_size); |
| 10774 ++pool_count; | 10774 ++pool_count; |
| 10775 } | 10775 } |
| 10776 } | 10776 } |
| 10777 | 10777 |
| 10778 ASSERT(pool_count == 2); | 10778 ASSERT(pool_count == 2); |
| 10779 | 10779 |
| 10780 TEARDOWN(); | 10780 TEARDOWN(); |
| 10781 } | 10781 } |
| OLD | NEW |