diff options
author | Alan Modra <amodra@gmail.com> | 2019-04-15 21:51:44 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-04-16 17:12:09 +0930 |
commit | 871a6bd2d852b0fb677386e1be78c3f4c6939b48 (patch) | |
tree | f1a378f0c442384f758827ba5c8f5a85ca83d3bd /gas/listing.c | |
parent | 02e902e1a1ec7b74125f329b3faef1992efb6d51 (diff) | |
download | gdb-871a6bd2d852b0fb677386e1be78c3f4c6939b48.zip gdb-871a6bd2d852b0fb677386e1be78c3f4c6939b48.tar.gz gdb-871a6bd2d852b0fb677386e1be78c3f4c6939b48.tar.bz2 |
Make frag fr_fix unsigned
The field only stores unsigned values, so let's make it unsigned to
stop people worrying about the possibility of negative values.
* frags.h (struct frag <fr_fix>): Use unsigned type.
* frags.c (frag_new): Assert that current size exceeds
old_frags_var_max_size.
* ehopt.c (get_cie_info): Adjust for unsigned fr_fix.
* listing.c (calc_hex): Likewise.
* write.c (cvt_frag_to_fill, write_relocs): Likewise.
* config/tc-arc.c (md_convert_frag): Likewise.
* config/tc-avr.c (avr_patch_gccisr_frag): Likewise.
* config/tc-mips.c (md_convert_frag): Likewise.
* config/tc-rl78.c (md_convert_frag): Likewise.
* config/tc-rx.c (md_convert_frag): Likewise.
* config/tc-sparc.c (md_apply_fix): Likewise.
* config/tc-xtensa.c (next_instrs_are_b_retw): Likewise.
(unrelaxed_frag_min_insn_count, unrelaxed_frag_has_b_j): Likewise.
Diffstat (limited to 'gas/listing.c')
-rw-r--r-- | gas/listing.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gas/listing.c b/gas/listing.c index a443458..a016b7c 100644 --- a/gas/listing.c +++ b/gas/listing.c @@ -783,7 +783,7 @@ calc_hex (list_info_type *list) { /* Print as many bytes from the fixed part as is sensible. */ octet_in_frag = 0; - while ((offsetT) octet_in_frag < frag_ptr->fr_fix + while (octet_in_frag < frag_ptr->fr_fix && data_buffer_size < MAX_BYTES - 3) { if (address == ~(unsigned int) 0) @@ -801,8 +801,8 @@ calc_hex (list_info_type *list) unsigned int var_rep_idx = octet_in_frag; /* Print as many bytes from the variable part as is sensible. */ - while (((offsetT) octet_in_frag - < (frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)) + while ((octet_in_frag + < frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset) && data_buffer_size < MAX_BYTES - 3) { if (address == ~(unsigned int) 0) @@ -816,7 +816,7 @@ calc_hex (list_info_type *list) var_rep_idx++; octet_in_frag++; - if ((offsetT) var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var) + if (var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var) var_rep_idx = var_rep_max; } } |