aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-04-16 11:10:44 +0930
committerAlan Modra <amodra@gmail.com>2019-04-16 17:13:04 +0930
commit90bd3c903fe76a8a3a5ced98c76e4366c5a0948f (patch)
tree883b93e7f2f76a5fdd2e8eabe16e3a5ae831dc4f /gas/config
parent871a6bd2d852b0fb677386e1be78c3f4c6939b48 (diff)
downloadgdb-90bd3c903fe76a8a3a5ced98c76e4366c5a0948f.zip
gdb-90bd3c903fe76a8a3a5ced98c76e4366c5a0948f.tar.gz
gdb-90bd3c903fe76a8a3a5ced98c76e4366c5a0948f.tar.bz2
Make fixup fx_where unsigned
Another field that only stores unsigned values. * write.h (struct fix <fx_where>): Make unsigned. (fix_new, fix_at_start, fix_new_exp): Adjust prototypes. * write.c (fix_new, fix_new_exp, fix_at_start): Make "where" and "size" parameters unsigned long. (fix_new_internal): Likewise. Adjust error format string to suit. * config/tc-mips.c (md_convert_frag): Remove cast of fx_where. * config/tc-sparc.c (md_apply_fix): Likewise. * config/tc-score.c (s3_convert_frag): Adjust for unsigned fx_where. * config/tc-score7.c (s7_convert_frag): Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-mips.c2
-rw-r--r--gas/config/tc-score.c4
-rw-r--r--gas/config/tc-score7.c4
-rw-r--r--gas/config/tc-sparc.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 70c6548..94141e9 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -19099,7 +19099,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
sequence instead. */
while (fixp
&& fixp->fx_frag == fragp
- && (valueT) fixp->fx_where + second < fragp->fr_fix)
+ && fixp->fx_where + second < fragp->fr_fix)
{
if (subtype & RELAX_USE_SECOND)
fixp->fx_done = 1;
diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c
index 3101dc8..4bbeeb0 100644
--- a/gas/config/tc-score.c
+++ b/gas/config/tc-score.c
@@ -7011,8 +7011,8 @@ s3_relax_frag (asection * sec ATTRIBUTE_UNUSED, fragS * fragp, long stretch ATTR
static void
s3_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, fragS * fragp)
{
- int r_old;
- int r_new;
+ unsigned int r_old;
+ unsigned int r_new;
char backup[20];
fixS *fixp;
diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c
index 13dd530..f60ab49 100644
--- a/gas/config/tc-score7.c
+++ b/gas/config/tc-score7.c
@@ -6562,8 +6562,8 @@ s7_convert_frag (bfd * abfd ATTRIBUTE_UNUSED,
segT sec ATTRIBUTE_UNUSED,
fragS * fragp)
{
- int r_old;
- int r_new;
+ unsigned int r_old;
+ unsigned int r_new;
char backup[20];
fixS *fixp;
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 677a13f..347db08 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -3566,7 +3566,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT segment ATTRIBUTE_UNUSED)
can be completely resolved here, i.e. if no undefined
symbol is associated with it. */
if (sparc_relax && fixP->fx_addsy == NULL
- && (valueT) fixP->fx_where + 8 <= fixP->fx_frag->fr_fix)
+ && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix)
{
#define G0 0
#define O7 15