vfp.cc (9515:40a194c31c91) vfp.cc (9550:e0e2c8f83d08)
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 981 unchanged lines hidden (view full) ---

990 VfpSavedState state = prepFpState(rMode);
991 __asm__ __volatile__ ("" : "=m" (op1), "=m" (op2), "=m" (state)
992 : "m" (op1), "m" (op2), "m" (state));
993 fpType dest = func(op1, op2);
994 __asm__ __volatile__ ("" : "=m" (dest) : "m" (dest));
995
996 // Get NAN behavior right. This varies between x86 and ARM.
997 if (std::isnan(dest)) {
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 981 unchanged lines hidden (view full) ---

990 VfpSavedState state = prepFpState(rMode);
991 __asm__ __volatile__ ("" : "=m" (op1), "=m" (op2), "=m" (state)
992 : "m" (op1), "m" (op2), "m" (state));
993 fpType dest = func(op1, op2);
994 __asm__ __volatile__ ("" : "=m" (dest) : "m" (dest));
995
996 // Get NAN behavior right. This varies between x86 and ARM.
997 if (std::isnan(dest)) {
998 const bool single = (sizeof(fpType) == sizeof(float));
999 const uint64_t qnan =
1000 single ? 0x7fc00000 : ULL(0x7ff8000000000000);
1001 const bool nan1 = std::isnan(op1);
1002 const bool nan2 = std::isnan(op2);
1003 const bool signal1 = nan1 && ((fpToBits(op1) & qnan) != qnan);
1004 const bool signal2 = nan2 && ((fpToBits(op2) & qnan) != qnan);
1005 if ((!nan1 && !nan2) || (defaultNan == 1)) {
1006 dest = bitsToFp(qnan, junk);

--- 54 unchanged lines hidden (view full) ---

1061 VfpSavedState state = prepFpState(rMode);
1062 __asm__ __volatile__ ("" : "=m" (op1), "=m" (state)
1063 : "m" (op1), "m" (state));
1064 fpType dest = func(op1);
1065 __asm__ __volatile__ ("" : "=m" (dest) : "m" (dest));
1066
1067 // Get NAN behavior right. This varies between x86 and ARM.
1068 if (std::isnan(dest)) {
998 const uint64_t qnan =
999 single ? 0x7fc00000 : ULL(0x7ff8000000000000);
1000 const bool nan1 = std::isnan(op1);
1001 const bool nan2 = std::isnan(op2);
1002 const bool signal1 = nan1 && ((fpToBits(op1) & qnan) != qnan);
1003 const bool signal2 = nan2 && ((fpToBits(op2) & qnan) != qnan);
1004 if ((!nan1 && !nan2) || (defaultNan == 1)) {
1005 dest = bitsToFp(qnan, junk);

--- 54 unchanged lines hidden (view full) ---

1060 VfpSavedState state = prepFpState(rMode);
1061 __asm__ __volatile__ ("" : "=m" (op1), "=m" (state)
1062 : "m" (op1), "m" (state));
1063 fpType dest = func(op1);
1064 __asm__ __volatile__ ("" : "=m" (dest) : "m" (dest));
1065
1066 // Get NAN behavior right. This varies between x86 and ARM.
1067 if (std::isnan(dest)) {
1069 const bool single = (sizeof(fpType) == sizeof(float));
1070 const uint64_t qnan =
1071 single ? 0x7fc00000 : ULL(0x7ff8000000000000);
1072 const bool nan = std::isnan(op1);
1073 if (!nan || fpscr.dn == 1) {
1074 dest = bitsToFp(qnan, junk);
1075 } else if (nan) {
1076 dest = bitsToFp(fpToBits(op1) | qnan, junk);
1077 }

--- 77 unchanged lines hidden ---
1068 const uint64_t qnan =
1069 single ? 0x7fc00000 : ULL(0x7ff8000000000000);
1070 const bool nan = std::isnan(op1);
1071 if (!nan || fpscr.dn == 1) {
1072 dest = bitsToFp(qnan, junk);
1073 } else if (nan) {
1074 dest = bitsToFp(fpToBits(op1) | qnan, junk);
1075 }

--- 77 unchanged lines hidden ---