diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2001-11-01 09:57:24 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2001-11-01 09:57:24 +0000 |
commit | c3f118876af79d1ce51765860684bf17effeaef3 (patch) | |
tree | f3e769a7094a24dbb6df18acf1412121387decd1 /gas | |
parent | 41e27f512a5123bc28e982264b9ceb3b78e6da85 (diff) | |
download | gdb-c3f118876af79d1ce51765860684bf17effeaef3.zip gdb-c3f118876af79d1ce51765860684bf17effeaef3.tar.gz gdb-c3f118876af79d1ce51765860684bf17effeaef3.tar.bz2 |
* config/tc-m68hc11.c (build_jump_insn): Allocate worst case storage
for bra/bsr and use frag_variant(), this ensure that the possible
16-bit BFD_RELOC_16 will be in the same frag.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-m68hc11.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 03a8210..e0d697f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2001-11-01 Stephane Carrez <Stephane.Carrez@worldnet.fr> + + * config/tc-m68hc11.c (build_jump_insn): Allocate worst case storage + for bra/bsr and use frag_variant(), this ensure that the possible + 16-bit BFD_RELOC_16 will be in the same frag. + 2001-10-16 Alan Modra <amodra@bigpond.net.au> From Andrew Pines <apines@cosmodog.com> diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c index 16c3fd6..a5ae3ab 100644 --- a/gas/config/tc-m68hc11.c +++ b/gas/config/tc-m68hc11.c @@ -1519,12 +1519,14 @@ build_jump_insn (opcode, operands, nb_operands, jmp_mode) /* bra/bsr made be changed into jmp/jsr. */ else if (code == M6811_BSR || code == M6811_BRA || code == M6812_BSR) { - opcode = m68hc11_new_insn (2); + /* Allocate worst case storage. */ + opcode = m68hc11_new_insn (3); number_to_chars_bigendian (opcode, code, 1); number_to_chars_bigendian (opcode + 1, 0, 1); - frag_var (rs_machine_dependent, 2, 1, - ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF), - operands[0].exp.X_add_symbol, (offsetT) n, opcode); + frag_variant (rs_machine_dependent, 1, 1, + ENCODE_RELAX (STATE_PC_RELATIVE, STATE_UNDF), + operands[0].exp.X_add_symbol, (offsetT) n, + opcode); } else if (current_architecture & cpu6812) { |