I propose a new way to computing the float flags,
We preserve a float computing cash
typedef struct FpRecord {
uint8_t op;
float32 A;
float32 B;
}
FpRecord;
FpRecord fp_cache[1024];
int fp_cache_length;
uint32_t fp_exceptions;
1. For each new fp operation we push it to the
fp_cache,
2. Once we read the
fp_exceptions
, then we re-compute
the fp_exceptions by re-running the fp
FpRecord
sequence.
and clear
fp_cache_length.
3. If we clear the
fp_exceptions , then we set fp_cache_length to 0 and
clear
fp_exceptions.
4. If the
fp_cache are full, then we re-compute
the fp_exceptions by re-running the fp
FpRecord
sequence.
Would this be a general method to use hard-float?
The consued time should be 2*hard_float.
Considerating read fp_exceptions are rare, then the amortized time complexity
would be 1 * hard_float.