* config/tc-m68k.h (md_prepare_relax_scan): Rewrite.
authorAlan Modra <amodra@gmail.com>
Sun, 6 Jan 2002 12:15:45 +0000 (12:15 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 6 Jan 2002 12:15:45 +0000 (12:15 +0000)
* config/tc-m68k.c (md_relax_table): Add md_prepare_relax_scan comment.

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

index b90a726fcb9ff7f7835f9f3b30300a1c3f8d8a47..8c29411fe04e4f0f58c5f7e25ebebf328724ed6b 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-06  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/tc-m68k.h (md_prepare_relax_scan): Rewrite.
+       * config/tc-m68k.c (md_relax_table): Add md_prepare_relax_scan comment.
+
 2002-01-05  Daniel Jacobowitz  <drow@mvista.com>
 
        * tc-mips.c (mips_cprestore_valid): New flag.
index ff209a942e3e9b5545364e2f84070d491959c2a9..ef5f8450cdaadc167ffb7453982869b1dcff0081 100644 (file)
@@ -471,7 +471,8 @@ static const int n_archs = sizeof (archs) / sizeof (archs[0]);
    How far Backward this mode will reach:
    How many bytes this mode will add to the size of the frag
    Which mode to go to if the offset won't fit in this one
-   */
+
+   Please check tc-m68k.h:md_prepare_relax_scan if changing this table.  */
 relax_typeS md_relax_table[] =
 {
   {   127,   -128,  0, TAB (BRANCHBWL, SHORT) },
index 56879d2b6a8b49ca7a179e69900a1c809517a712..fb33db4ed5271d840b83bd63aa7d5d074d147082 100644 (file)
@@ -227,11 +227,14 @@ extern int m68k_parse_long_option PARAMS ((char *));
 extern struct relax_type md_relax_table[];
 #define TC_GENERIC_RELAX_TABLE md_relax_table
 
-/* Copied from write.c */
-/* This was formerly called M68K_AIM_KLUDGE.  */
+/* We can't do a byte jump to the next instruction, so in that case
+   force word mode by faking AIM.  */
 #define md_prepare_relax_scan(fragP, address, aim, this_state, this_type) \
-  if (aim==0 && this_state== 4) { /* hard encoded from tc-m68k.c */ \
-    aim=this_type->rlx_forward+1; /* Force relaxation into word mode */ \
-  }
+  do                                                                     \
+    {                                                                    \
+      if (aim == 0 && this_type->rlx_forward == 127)                     \
+        aim = 128;                                                       \
+    }                                                                    \
+  while (0)
 
 #define DWARF2_LINE_MIN_INSN_LENGTH 2
This page took 0.033527 seconds and 4 git commands to generate.