diff options
author | DJ Delorie <dj@redhat.com> | 2013-01-29 22:17:53 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2013-01-29 22:17:53 +0000 |
commit | 392ca752084a7ea99a345a7b19b9e7453f2ea6a2 (patch) | |
tree | 7a8114492181247393bd06b3df5e98f9cb4e4598 /gas/config | |
parent | 8d9878a4ca345aef7d7a727a11e7f76de787bac0 (diff) | |
download | gdb-392ca752084a7ea99a345a7b19b9e7453f2ea6a2.zip gdb-392ca752084a7ea99a345a7b19b9e7453f2ea6a2.tar.gz gdb-392ca752084a7ea99a345a7b19b9e7453f2ea6a2.tar.bz2 |
* config/tc-rl78.c (rl78_cons_fix_new): Handle user-specified
relocs in .word/.etc statements.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-rl78.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gas/config/tc-rl78.c b/gas/config/tc-rl78.c index 53d3df2..bd964dc 100644 --- a/gas/config/tc-rl78.c +++ b/gas/config/tc-rl78.c @@ -554,6 +554,23 @@ rl78_cons_fix_new (fragS * frag, return; } + switch (exp->X_md) + { + case BFD_RELOC_RL78_LO16: + case BFD_RELOC_RL78_HI16: + if (size != 2) + as_bad (_("%%hi16/%%lo16 only applies to .short or .hword")); + type = exp->X_md; + break; + case BFD_RELOC_RL78_HI8: + if (size != 1) + as_bad (_("%%hi8 only applies to .byte")); + type = exp->X_md; + break; + default: + break; + } + if (exp->X_op == O_subtract && exp->X_op_symbol) { if (size != 4 && size != 2 && size != 1) |