aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-d30v.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-03-20 09:20:55 +1030
committerAlan Modra <amodra@gmail.com>2019-03-21 08:46:42 +1030
commit7553c869a9a9af813abd8cb4d445765d1a8a1cac (patch)
tree302625829d122ca82dd3df74efb3ebf8b7f1cd48 /gas/config/tc-d30v.c
parent3b6c19668236e6fd60c6299e7d016396d645fa61 (diff)
downloadgdb-7553c869a9a9af813abd8cb4d445765d1a8a1cac.zip
gdb-7553c869a9a9af813abd8cb4d445765d1a8a1cac.tar.gz
gdb-7553c869a9a9af813abd8cb4d445765d1a8a1cac.tar.bz2
Teach a few targets to resolve BFD_RELOC_8
and tidy "forward" test. I've removed some checks in d30v md_apply_fix that have no business being there. Any symbol problems will be caught later in tc_gen_reloc, and overflow checking is done in gas/write.c. * config/tc-d10v.c (md_apply_fix): Apply BFD_RELOC_8. * config/tc-pdp11.c (md_apply_fix): Likewise. * config/tc-d30v.c (md_apply_fix): Don't emit errors for BFD_RELOC_8, BFD_RELOC_16, and BFD_RELOC_64. * testsuite/gas/all/gas.exp: Move target exclusions for forward test, but not cr16, to.. * testsuite/gas/all/forward.d: ..here, with explanation. Remove d10v, d30v, and pdp11 xfails.
Diffstat (limited to 'gas/config/tc-d30v.c')
-rw-r--r--gas/config/tc-d30v.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c
index f11cc95..086215e 100644
--- a/gas/config/tc-d30v.c
+++ b/gas/config/tc-d30v.c
@@ -1918,37 +1918,17 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
switch (fixP->fx_r_type)
{
- case BFD_RELOC_8: /* Check for a bad .byte directive. */
- if (fixP->fx_addsy != NULL)
- as_bad (_("line %d: unable to place address of symbol '%s' into a byte"),
- fixP->fx_line, S_GET_NAME (fixP->fx_addsy));
- else if (((unsigned)value) > 0xff)
- as_bad (_("line %d: unable to place value %lx into a byte"),
- fixP->fx_line, value);
- else
- *(unsigned char *) where = value;
+ case BFD_RELOC_8:
+ *(unsigned char *) where = value;
break;
- case BFD_RELOC_16: /* Check for a bad .short directive. */
- if (fixP->fx_addsy != NULL)
- as_bad (_("line %d: unable to place address of symbol '%s' into a short"),
- fixP->fx_line, S_GET_NAME (fixP->fx_addsy));
- else if (((unsigned)value) > 0xffff)
- as_bad (_("line %d: unable to place value %lx into a short"),
- fixP->fx_line, value);
- else
- bfd_putb16 ((bfd_vma) value, (unsigned char *) where);
+ case BFD_RELOC_16:
+ bfd_putb16 ((bfd_vma) value, (unsigned char *) where);
break;
- case BFD_RELOC_64: /* Check for a bad .quad directive. */
- if (fixP->fx_addsy != NULL)
- as_bad (_("line %d: unable to place address of symbol '%s' into a quad"),
- fixP->fx_line, S_GET_NAME (fixP->fx_addsy));
- else
- {
- bfd_putb32 ((bfd_vma) value, (unsigned char *) where);
- bfd_putb32 (0, ((unsigned char *) where) + 4);
- }
+ case BFD_RELOC_64:
+ bfd_putb32 ((bfd_vma) value, (unsigned char *) where);
+ bfd_putb32 (0, ((unsigned char *) where) + 4);
break;
case BFD_RELOC_D30V_6: