* config/tc-m68k.c (md_assemble): Ensure variable part of frag is
authorAlan Modra <amodra@gmail.com>
Sun, 27 May 2001 11:57:25 +0000 (11:57 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 27 May 2001 11:57:25 +0000 (11:57 +0000)
allocated in the same chunk as the fixed part.

gas/ChangeLog
gas/config/tc-m68k.c

index ebc5b4a0700cb7fbe8ec65485a83f35f4c0b7d0a..8564e7fdaec3ea2aa90e6bb0d2719f6eff424b45 100644 (file)
@@ -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
index 842510f957735747b7e70c0b488edbfd27296d47..62382ecbb7debbf25e326b71ac7df37b9f03b27a 100644 (file)
@@ -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;
This page took 0.044253 seconds and 4 git commands to generate.