return retval;
}
-/* IEEE-754 (Intel) "single precision" format:
+/* IEEE-754r "half precision" format:
+ * 16 bits:
+ * 15 9 Bit 0
+ * | | |
+ * seee eemm mmmm mmmm
+ *
+ * e = bias 15 exponent
+ * s = sign bit
+ * m = mantissa bits, bit 10 is an implied one bit.
+ *
+ * IEEE-754 (Intel) "single precision" format:
* 32 bits:
* Bit 31 Bit 22 Bit 0
* | | |
yasm_internal_error(N_("unsupported floatnum functionality"));
}
switch (destsize) {
+ case 2:
+ retval = floatnum_get_common(flt, ptr, 2, 10, 1, 5);
+ break;
case 4:
retval = floatnum_get_common(flt, ptr, 4, 23, 1, 8);
break;
yasm_floatnum_check_size(/*@unused@*/ const yasm_floatnum *flt, size_t size)
{
switch (size) {
+ case 16:
case 32:
case 64:
case 80:
-:2: invalid floating point constant size
--:3: invalid floating point constant size
+-:3: warning: overflow in floating point expression
-:4: warning: overflow in floating point expression
-:5: warning: underflow in floating point expression
-:8: invalid floating point constant size
--:9: invalid floating point constant size
+-:9: warning: overflow in floating point expression
-:11: warning: overflow in floating point expression
-:12: warning: underflow in floating point expression