aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-01-10 01:45:53 +0000
committerKen Raeburn <raeburn@cygnus>1995-01-10 01:45:53 +0000
commit483971bdbfba1ce02604cdfaf22648d46f71eef3 (patch)
treecda6ed3d6fddc6cb400906f53109217b87fd6ac6
parentaac4d5a77f074861e6b7bd073f7fc869ef6e1ac3 (diff)
downloadgdb-483971bdbfba1ce02604cdfaf22648d46f71eef3.zip
gdb-483971bdbfba1ce02604cdfaf22648d46f71eef3.tar.gz
gdb-483971bdbfba1ce02604cdfaf22648d46f71eef3.tar.bz2
* config/tc-mips.c (RELAX_RELOC1, RELAX_RELOC2): Cast values to bfd_vma before
subtracting.
-rw-r--r--gas/ChangeLog3
-rw-r--r--gas/config/tc-mips.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5c083d59..8c0cc3a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,8 @@
Mon Jan 9 16:22:28 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+ * config/tc-mips.c (RELAX_RELOC1, RELAX_RELOC2): Cast values to
+ bfd_vma before subtracting.
+
* config/obj-coff.c (size_section): Handle rs_space like rs_fill,
but make sure fr_symbol is null.
(fill_section): Ditto.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 9a5df7b..4710a7c 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -325,8 +325,8 @@ static int prev_prev_insn_unreordered;
| ((warn) ? 1 : 0)))
#define RELAX_OLD(i) (((i) >> 24) & 0xff)
#define RELAX_NEW(i) (((i) >> 16) & 0xff)
-#define RELAX_RELOC1(i) ((((i) >> 9) & 0x7f) - 64)
-#define RELAX_RELOC2(i) ((((i) >> 2) & 0x7f) - 64)
+#define RELAX_RELOC1(i) ((bfd_vma)(((i) >> 9) & 0x7f) - 64)
+#define RELAX_RELOC2(i) ((bfd_vma)(((i) >> 2) & 0x7f) - 64)
#define RELAX_RELOC3(i) (((i) >> 1) & 1)
#define RELAX_WARN(i) ((i) & 1)