diff options
author | David Ung <davidu@mips.com> | 2005-09-07 11:39:17 +0000 |
---|---|---|
committer | David Ung <davidu@mips.com> | 2005-09-07 11:39:17 +0000 |
commit | b8ee1a6e86e6d9a74a59ef3c251183a10e87311e (patch) | |
tree | 457e58cd8158da016258d8ec125e6a73ac64874b /gas/config | |
parent | 5397b1fec1826b95710fb0fb9bb4b0386a18c4a7 (diff) | |
download | gdb-b8ee1a6e86e6d9a74a59ef3c251183a10e87311e.zip gdb-b8ee1a6e86e6d9a74a59ef3c251183a10e87311e.tar.gz gdb-b8ee1a6e86e6d9a74a59ef3c251183a10e87311e.tar.bz2 |
* config/tc-mips.c (append_insn): Undo last change. Instead add
guard to suppress calling frag_grow if the current instruction is
one that allows a delay slot.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-mips.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index db1fec5..b4b76f0 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -2312,10 +2312,11 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr, else if (mips_opts.mips16 && ! ip->use_extend && *reloc_type != BFD_RELOC_MIPS16_JMP) - { - /* Make sure there is enough room to swap this instruction with - a following jump instruction. */ - frag_grow (6); + { + if ((pinfo & INSN_UNCOND_BRANCH_DELAY) == 0) + /* Make sure there is enough room to swap this instruction with + a following jump instruction. */ + frag_grow (6); add_fixed_insn (ip); } else @@ -2707,22 +2708,9 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr, struct mips_cl_insn delay = history[0]; if (mips_opts.mips16) { - if (delay.frag == ip->frag) - { - move_insn (ip, delay.frag, delay.where); - move_insn (&delay, ip->frag, delay.where - + insn_length (ip)); - } - else if (insn_length (ip) == insn_length (&delay)) - { - move_insn (&delay, ip->frag, ip->where); - move_insn (ip, history[0].frag, history[0].where); - } - else - { - add_fixed_insn (NOP_INSN); - delay = *NOP_INSN; - } + know (delay.frag == ip->frag); + move_insn (ip, delay.frag, delay.where); + move_insn (&delay, ip->frag, ip->where + insn_length (ip)); } else if (relaxed_branch) { |