More NaN constant fixes.
This patch cleans up %loadi/wr regarding NaN values. It also fixes the code generator to correctly output a NaN value as a Cr<> constant.
This commit is contained in:
parent
2d3cd7cb9a
commit
2e97b28185
|
|
@ -330,6 +330,10 @@ char* draw_Cr_to_string(double value)
|
|||
snprintf(tmp, sizeof(tmp), "Cr<m0g7fff>");
|
||||
return strdup(tmp);
|
||||
}
|
||||
if (value != value) {
|
||||
snprintf(tmp, sizeof(tmp), "Cr<m1g3fff>");
|
||||
return strdup(tmp);
|
||||
}
|
||||
|
||||
int sign = 0;
|
||||
if (value < 0) {
|
||||
|
|
|
|||
|
|
@ -2663,7 +2663,7 @@ bool of_LOADI_WR(vthread_t thr, vvp_code_t cp)
|
|||
return true;
|
||||
}
|
||||
// Detect NaN
|
||||
if (exp==0x3fff && cp->number!=0) {
|
||||
if (exp==0x3fff) {
|
||||
thr->words[idx].w_real = nan("");
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue