gas: sframe: use standard min/max integer constants
Replace the use of custom VALUE_{8|16|32|64}BIT constant definitions
with the standard INT{8|16|32|64}_{MIN|MAX} ones from stdint.h.
Besides improving readability this also fixes the issue that the
smallest representable signed 8/16/32-bit integer value was
erroneously sized as the next larger integer type. For example
get_offset_size_in_bytes (INT8_MIN) returned 2 instead of 1, due
to INT8_MIN (= -128) != -VALUE_8BIT (= -127):
(gdb) call get_offset_size_in_bytes (-127)
$1 = 1
(gdb) call get_offset_size_in_bytes (-128)
$2 = 2
gas/
* gen-sframe.c (VALUE_8BIT, VALUE_16BIT, VALUE_32BIT,
VALUE_64BIT): Remove.
(get_offset_size_in_bytes): Use standard min/max integer
constants.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
1 file changed