This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MIPS16 text labels


Hi All,

  The MIPS16 text labels are stored as odd addresses in "tc-mips.c".
Does anyone know the reason of storing odd addresses?
I tried to comment out code that makes odd addresses,
and all tests still pass on mipsisa32r2-sde-elfoabi and mips-linux
targets.  Thanks a lot!

Regards,
Chao-ying

Index: config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.388
diff -u -p -r1.388 tc-mips.c
--- config/tc-mips.c    12 Jun 2008 21:44:53 -0000      1.388
+++ config/tc-mips.c    27 Jun 2008 20:34:22 -0000
@@ -2249,8 +2249,8 @@ mips_move_labels (void)
       symbol_set_frag (l->label, frag_now);
       val = (valueT) frag_now_fix ();
       /* mips16 text labels are stored as odd.  */
-      if (mips_opts.mips16)
-       ++val;
+      //if (mips_opts.mips16)
+       //++val;
       S_SET_VALUE (l->label, val);
     }
 }
@@ -2310,7 +2310,7 @@ mips16_mark_labels (void)
          && ! S_IS_WEAK (label)
          && ! S_IS_EXTERNAL (label)
          && ! s_is_linkonce (label, now_seg))
-       S_SET_VALUE (label, S_GET_VALUE (label) | 1);
+       S_SET_VALUE (label, S_GET_VALUE (label) /*| 1*/);
     }
 }

@@ -10956,7 +10956,7 @@ my_getExpression (expressionS *ep, char
       && symbol_get_frag (ep->X_add_symbol) == frag_now
       && symbol_constant_p (ep->X_add_symbol)
       && (val = S_GET_VALUE (ep->X_add_symbol)) == frag_now_fix ())
-    S_SET_VALUE (ep->X_add_symbol, val + 1);
+    S_SET_VALUE (ep->X_add_symbol, val /*+ 1*/);
 }

 char *


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]