aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-rx.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-01-31 16:43:15 +0000
committerNick Clifton <nickc@redhat.com>2011-01-31 16:43:15 +0000
commita22429b98e4c117b40f9693585c546067d9a4c0e (patch)
tree5f1e04a6a9fa728098780203e09c477a9c269f5f /gas/config/tc-rx.c
parent45a4356715b9d5c35c581c14e17978a1cd2aed18 (diff)
downloadgdb-a22429b98e4c117b40f9693585c546067d9a4c0e.zip
gdb-a22429b98e4c117b40f9693585c546067d9a4c0e.tar.gz
gdb-a22429b98e4c117b40f9693585c546067d9a4c0e.tar.bz2
* write.c (write_contents): Include output file name and bfd error
value when reporting the inability to write to the output file. * config/tc-rx.c (rx_handle_align): Do not insert NOPs into align frag that has a non-zero fill value. * gas/all/align.d: Skip for the RX. * gas/elf/group1a.d: Likewise. * gas/elf/groupautoa.d: Likewise. * gas/elf/elf.exp: Do not run section5 test for the RX port. * gas/elf/section4.d: Likewise. * gas/elf/section7.d: Likewise. * gas/macros/semi.s: Fill with a non-zero pattern. * gas/macros/semi.d: Expect non-zero fill value. * gas/rx/bcnd.d: Update expected disassembly. * gas/rx/bra.d: Likewise. * gas/rx/macros.inc: Add reg1 macro. * gas/rx/max.sm: Use reg1 macro to avoid generating illegal NOP instruction. * gas/rx/mov.sm: Likewise. * gas/rx/max.d: Update expected disassembly. * gas/rx/mov.d: Likewise. * gas/rx/rx-asm-good.s: Use Renesas section names. * gas/rx/rx-asm-good.d: Update expected disassembly.
Diffstat (limited to 'gas/config/tc-rx.c')
-rw-r--r--gas/config/tc-rx.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index a003c36..3daa7df 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -548,7 +548,7 @@ const pseudo_typeS md_pseudo_table[] =
/* The manual documents ".stk" but the compiler emits ".stack". */
{ "stack", rx_nop, 0 },
- /* Theae are Renesas as100 assembler pseudo-ops that we do support. */
+ /* These are Renesas as100 assembler pseudo-ops that we do support. */
{ "addr", rx_cons, 3 },
{ "align", s_align_bytes, 2 },
{ "byte", rx_cons, 1 },
@@ -1142,6 +1142,9 @@ static unsigned char *nops[] = { NULL, nop_1, nop_2, nop_3, nop_4, nop_5, nop_6,
void
rx_handle_align (fragS * frag)
{
+ /* If handling an alignment frag, use an optimal NOP pattern.
+ Only do this if a fill value has not already been provided.
+ FIXME: This test fails if the provided fill value is zero. */
if ((frag->fr_type == rs_align
|| frag->fr_type == rs_align_code)
&& subseg_text_p (now_seg))
@@ -1151,16 +1154,19 @@ rx_handle_align (fragS * frag)
- frag->fr_fix);
unsigned char *base = (unsigned char *)frag->fr_literal + frag->fr_fix;
- if (count > BIGGEST_NOP)
+ if (* base == 0)
{
- base[0] = 0x2e;
- base[1] = count;
- frag->fr_var = 2;
- }
- else if (count > 0)
- {
- memcpy (base, nops[count], count);
- frag->fr_var = count;
+ if (count > BIGGEST_NOP)
+ {
+ base[0] = 0x2e;
+ base[1] = count;
+ frag->fr_var = 2;
+ }
+ else if (count > 0)
+ {
+ memcpy (base, nops[count], count);
+ frag->fr_var = count;
+ }
}
}