simplified compile time floating point somewhat

This commit is contained in:
ceriel
1991-01-15 18:21:16 +00:00
parent 6ef7433396
commit e2a1aa81f9
7 changed files with 17 additions and 39 deletions

View File

@@ -101,14 +101,12 @@ EVAL(expr, val, code, true_label, false_label)
case Float: /* a floating constant */
if (gencode) {
label datlab = data_label();
char buf[FLT_STRLEN];
fp_used = 1;
if (!expr->FL_VALUE) {
expr->FL_VALUE = Malloc(FLT_STRLEN);
flt_flt2str(&(expr->FL_ARITH), expr->FL_VALUE, FLT_STRLEN);
}
flt_flt2str(&(expr->FL_ARITH), buf, FLT_STRLEN);
C_df_dlb(datlab);
C_rom_fcon(expr->FL_VALUE, expr->ex_type->tp_size);
C_rom_fcon(buf, expr->ex_type->tp_size);
C_lae_dlb(datlab, (arith)0);
C_loi(expr->ex_type->tp_size);
}