aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-05-27 11:57:25 +0000
committerAlan Modra <amodra@gmail.com>2001-05-27 11:57:25 +0000
commitfbe572f93e9b2403e76e0bf809ae1706a56c9758 (patch)
tree0158fd37bf53ac60e2cae13f2430b05b11782c71 /gas
parent0b171357e6b9182ce42102d4c60964f9384afd75 (diff)
downloadfsf-binutils-gdb-fbe572f93e9b2403e76e0bf809ae1706a56c9758.zip
fsf-binutils-gdb-fbe572f93e9b2403e76e0bf809ae1706a56c9758.tar.gz
fsf-binutils-gdb-fbe572f93e9b2403e76e0bf809ae1706a56c9758.tar.bz2
* config/tc-m68k.c (md_assemble): Ensure variable part of frag is
allocated in the same chunk as the fixed part.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-m68k.c15
2 files changed, 20 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ebc5b4a..8564e7f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-27 Alan Modra <amodra@one.net.au>
+
+ * config/tc-m68k.c (md_assemble): Ensure variable part of frag is
+ allocated in the same chunk as the fixed part.
+
2001-05-26 Alan Modra <amodra@one.net.au>
* write.c (relax_segment <rs_space>): Calculate growth using
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 842510f..62382ec 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -3664,6 +3664,21 @@ md_assemble (str)
}
/* There's some frag hacking */
+ {
+ /* Calculate the max frag size. */
+ int wid;
+
+ wid = 2 * the_ins.fragb[0].fragoff;
+ for (n = 1; n < the_ins.nfrag; n++)
+ wid += 2 * (the_ins.numo - the_ins.fragb[n - 1].fragoff);
+ /* frag_var part. */
+ wid += 10;
+ /* Make sure the whole insn fits in one chunk, in particular that
+ the var part is attached, as we access one byte before the
+ variable frag for byte branches. */
+ frag_grow (wid);
+ }
+
for (n = 0, fromP = &the_ins.opcode[0]; n < the_ins.nfrag; n++)
{
int wid;