diff options
author | Nick Clifton <nickc@redhat.com> | 2015-06-30 11:25:18 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-06-30 11:25:18 +0100 |
commit | 54f66250d79ec304ea427915bfd8b535ec249c3b (patch) | |
tree | d9911abb7db95ebca361a100e30bf5af9389bcd5 /gas/config/tc-rl78.c | |
parent | 7b9be803fed8f500b512d5685773c84fffcdf63f (diff) | |
download | fsf-binutils-gdb-54f66250d79ec304ea427915bfd8b535ec249c3b.zip fsf-binutils-gdb-54f66250d79ec304ea427915bfd8b535ec249c3b.tar.gz fsf-binutils-gdb-54f66250d79ec304ea427915bfd8b535ec249c3b.tar.bz2 |
Add support for SADDR addressing to the RL78 port.
gas * config/rl78-parse.y: Tag all saddr expressions throughout.
(SET_SA): New.
(expr_is_saddr): Allow symbolic expressions.
* config/tc-rl78.c (md_apply_fix): Handle SADDR.
bfd * elf32-rl78.c (rl78_elf_howto_table): Add RH_SADDR.
(rl78_reloc_map): Add R_RL78_RH_SADDR.
* reloc.c: Add BFD_RELOC_RL78_SADDR.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
Diffstat (limited to 'gas/config/tc-rl78.c')
-rw-r--r-- | gas/config/tc-rl78.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gas/config/tc-rl78.c b/gas/config/tc-rl78.c index 3c3f78c..3a14fc0 100644 --- a/gas/config/tc-rl78.c +++ b/gas/config/tc-rl78.c @@ -1024,12 +1024,12 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, /* We used a new frag for this opcode, so the opcode address should be the frag address. */ mypc = fragP->fr_address + (fragP->fr_opcode - fragP->fr_literal); - tprintf("\033[32mmypc: 0x%x\033[0m\n", (int)mypc); + tprintf ("\033[32mmypc: 0x%x\033[0m\n", (int)mypc); /* Try to get the target address. If we fail here, we just use the largest format. */ if (rl78_frag_fix_value (fragP, segment, 0, & addr0, - fragP->tc_frag_data->relax[ri].type != RL78_RELAX_BRANCH, 0)) + fragP->tc_frag_data->relax[ri].type != RL78_RELAX_BRANCH, 0)) { /* We don't know the target address. */ keep_reloc = 1; @@ -1387,6 +1387,7 @@ md_apply_fix (struct fix * f ATTRIBUTE_UNUSED, val); /* Fall through. */ case BFD_RELOC_8: + case BFD_RELOC_RL78_SADDR: /* We need to store the 8 LSB, but this works. */ op[0] = val; break; |