| 979 | } |
| 980 | |
| 981 | static int checkvaltype2(TCHAR **c, uae_u32 *val, debugfloatx80 *valx80, TCHAR def) |
| 982 | { |
| 983 | TCHAR nc; |
| 984 | |
| 985 | ignore_ws(c); |
| 986 | |
| 987 | #ifdef WITH_SOFTFLOAT |
| 988 | // check for floating point formats |
| 989 | TCHAR *cp = *c; |
| 990 | for (;;) { |
| 991 | nc = *cp++; |
| 992 | TCHAR nc2 = _totupper (*cp); |
| 993 | if (!nc || _istspace(nc)) { |
| 994 | break; |
| 995 | } |
| 996 | if (nc == '.' && (nc2 == 'S' || nc2 == 'D' || nc2 == 'X')) { |
| 997 | float_status st = { 0 }; |
| 998 | nc = _totupper(**c); |
| 999 | if (nc == '$') { |
| 1000 | (*c)++; |
| 1001 | } |
| 1002 | if (nc == '0' && _totupper((*c)[1]) == 'X') { |
| 1003 | (*c) += 2; |
| 1004 | } |
| 1005 | if (nc2 == 'S') { |
| 1006 | if (readhexx(c, val)) { |
| 1007 | *valx80 = float32_to_floatx80(*val, &st); |
| 1008 | return NUMTYTPE_S; |
| 1009 | } |
| 1010 | } |
| 1011 | if (nc2 == 'D') { |
| 1012 | uae_u32 val2; |
| 1013 | if (readhexx(c, val)) { |
| 1014 | if (readhexx(c, &val2)) { |
| 1015 | *valx80 = float64_to_floatx80((((uae_u64)(*val)) << 32) | val2, &st); |
| 1016 | return NUMTYTPE_D; |
| 1017 | } |
| 1018 | } |
| 1019 | } |
| 1020 | if (nc2 == 'X') { |
| 1021 | uae_u32 val1; |
| 1022 | uae_u32 val2, val3; |
| 1023 | if (readhexx(c, &val1)) { |
| 1024 | if (peekchar(c) == '.') { |
| 1025 | (*c)++; |
| 1026 | } |
| 1027 | if (readhexx(c, &val2)) { |
| 1028 | if (readhexx(c, &val3)) { |
| 1029 | valx80->high = val1; |
| 1030 | valx80->low = ((uae_u64)val2 << 32) | val3; |
| 1031 | return NUMTYTPE_X; |
| 1032 | } |
| 1033 | } |
| 1034 | } |
| 1035 | } |
| 1036 | return 0; |
| 1037 | } |
| 1038 | } |
no test coverage detected