0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-09-22 10:43:39 -04:00
Commit Graph

4 Commits

Author SHA1 Message Date
H. Peter Anvin
f6166e571a preproc: implement %hs2b() and %b2hs() functions for compact binary data
Convenience preprocessor functions that allows for efficient packing
of binary data in source code.

Move some functions that has previously been local but are more
generally useful into more accessible places.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-15 23:01:59 -07:00
H. Peter Anvin
78abbf26df asm/floats.c: micro-optimize set_bit()
Micro-optimize the set_bit() function. Using size_t (in particular,
using an unsigned type) produces better code.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-03 01:27:30 -07:00
H. Peter Anvin
d081f0db5d fp: support bfloat16 constants
Support generating bfloat16 constants. This is a bit awkward, as "DW"
already generates IEEE half precision constants; therefore there is no
longer a single floating-point format for each size. This requires
some replumbing.

Fortunately bfloat16 fits in 64 bits, so support generating them with
a macro that uses __?bfloat16?__() to convert to integers first before
passing them to DW.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2020-07-16 23:11:03 -07:00
H. Peter Anvin (Intel)
6e9554f067 BR 3392648: rename float.[ch] to floats.[ch]
Haiku apparently wants to include <float.h> rather than
"float.h". Rename float.[ch] to floats.[ch] to avoid unnecessary
namespace confusion.

Reported-by: <alaviss0+nasm@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-06-14 23:24:43 -07:00