aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-26 09:33:48 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-26 09:34:18 -0700
commite3fed0f2fe98c52dc8cb160be2a30e973b1dca3f (patch)
treea72826e2c97f6e83b8f84bbcf01f2aa3f87fa1dc
parentf687f5f563a6407f74a6f3aacb00f07b1889470b (diff)
downloadbinutils-e3fed0f2fe98c52dc8cb160be2a30e973b1dca3f.zip
binutils-e3fed0f2fe98c52dc8cb160be2a30e973b1dca3f.tar.gz
binutils-e3fed0f2fe98c52dc8cb160be2a30e973b1dca3f.tar.bz2
tc-xgate.c: Replace R_XGATE_PCREL_X with BFD_RELOC_XGATE_PCREL_X
Replace R_XGATE_PCREL_X with BFD_RELOC_XGATE_PCREL_X to silence GCC 10 warning: gas/config/tc-xgate.c:1339:5: error: implicit conversion from ‘enum elf_xgate_reloc_type’ to ‘bfd_reloc_code_real_type’ {aka ‘enum bfd_reloc_code_real’} [-Werror=enum-conversion] 1339 | R_XGATE_PCREL_9); | ^~~~~~~~~~~~~~~ PR gas/26044 * config/tc-xgate.c (md_apply_fix): Check BFD_RELOC_XGATE_PCREL_X instead of R_XGATE_PCREL_X. (xgate_parse_operand): Replace R_XGATE_PCREL_X with BFD_RELOC_XGATE_PCREL_X.
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-xgate.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 55e8ac0..c6c8fd1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,6 +1,14 @@
2020-05-26 H.J. Lu <hongjiu.lu@intel.com>
PR gas/26044
+ * config/tc-xgate.c (md_apply_fix): Check BFD_RELOC_XGATE_PCREL_X
+ instead of R_XGATE_PCREL_X.
+ (xgate_parse_operand): Replace R_XGATE_PCREL_X with
+ BFD_RELOC_XGATE_PCREL_X.
+
+2020-05-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/26044
* config/tc-visium.c (md_convert_frag): Replace fragP->fr_literal
with &fragP->fr_literal[0].
diff --git a/gas/config/tc-xgate.c b/gas/config/tc-xgate.c
index afdf0dd..488ee4c 100644
--- a/gas/config/tc-xgate.c
+++ b/gas/config/tc-xgate.c
@@ -668,7 +668,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
switch (fixP->fx_r_type)
{
- case R_XGATE_PCREL_9:
+ case BFD_RELOC_XGATE_PCREL_9:
if (value < -512 || value > 511)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Value %ld too large for 9-bit PC-relative branch."),
@@ -685,7 +685,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
value &= mask;
number_to_chars_bigendian (where, (opcode | value), 2);
break;
- case R_XGATE_PCREL_10:
+ case BFD_RELOC_XGATE_PCREL_10:
if (value < -1024 || value > 1023)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Value %ld too large for 10-bit PC-relative branch."),
@@ -1336,10 +1336,10 @@ xgate_parse_operand (struct xgate_opcode *opcode,
{
if (*op_constraint == '9')
fix_new_exp (frag_now, where, 2, &operand.exp, TRUE,
- R_XGATE_PCREL_9);
+ BFD_RELOC_XGATE_PCREL_9);
else if (*op_constraint == 'a')
fix_new_exp (frag_now, where, 2, &operand.exp, TRUE,
- R_XGATE_PCREL_10);
+ BFD_RELOC_XGATE_PCREL_10);
}
else
as_fatal (_("Operand `%x' not recognized in fixup8."),