SPRUI03E June 2015 – January 2023
Initialize Single-Precision Floating-Point Value
.floatvalue[, ... ,valuen]
The .float directive places the IEEE single-precision floating-point representation of a single floating-point constant into a word in the current section. The value must be an absolute constant expression with an arithmetic type or a symbol equated to an absolute constant expression with an arithmetic type. Each constant is converted to a floating-point value in IEEE single-precision 32-bit format.
With big-endian ordering, the 32-bit value is stored exponent byte first, most significant byte of fraction second, and least significant byte of fraction third, in the format shown in Figure 6-7.
When you use .float in a .struct/.endstruct sequence, .float defines a member's size; it does not initialize memory. For more information, see the .struct/.endstruct/.tag topic.
Following are examples of the .float directive:
1 00000000 E9045951 .float -1.0e25
2 00000004 40400000 .float 3
3 00000008 42F60000 .float 123