Correctly check gcc version.
[deliverable/binutils-gdb.git] / gas / listing.c
index 441cac2b3ea5c412c0740d04455515beba18d8fe..cecf2450bac19c77291bc9132c6bc46080033fb2 100644 (file)
@@ -109,10 +109,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define LISTING_WORD_SIZE 4
 #endif
 #ifndef LISTING_LHS_WIDTH
-#define LISTING_LHS_WIDTH 1
+#define LISTING_LHS_WIDTH ((LISTING_WORD_SIZE) > 4 ? 1 : 4 / (LISTING_WORD_SIZE))
 #endif
 #ifndef LISTING_LHS_WIDTH_SECOND
-#define LISTING_LHS_WIDTH_SECOND 1
+#define LISTING_LHS_WIDTH_SECOND LISTING_LHS_WIDTH
 #endif
 #ifndef LISTING_RHS_WIDTH
 #define LISTING_RHS_WIDTH 100
@@ -679,7 +679,6 @@ print_lines (list, lineno, string, address)
   unsigned int lines;
   unsigned int octet_in_word = 0;
   char *src = data_buffer;
-  int end = strlen(src);
   int cur;
 
   /* Print the stuff on the first line */
@@ -713,15 +712,8 @@ print_lines (list, lineno, string, address)
   while (src[cur] && idx < nchars)
     {
       int offset;
-#if TARGET_BYTES_BIG_ENDIAN != 0
       offset = cur;
       fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#else
-      offset = (cur & ~(LISTING_WORD_SIZE * 2 - 1)) 
-        + (LISTING_WORD_SIZE - octet_in_word - 1) * 2;
-      if (offset < end)
-        fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#endif
       cur += 2;
       octet_in_word++;
       
@@ -764,15 +756,8 @@ print_lines (list, lineno, string, address)
       while (src[cur] && idx < nchars)
        {
           int offset;
-#if TARGET_BYTES_BIG_ENDIAN != 0
           offset = cur;
           fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#else
-          offset = (cur & ~(LISTING_WORD_SIZE * 2 - 1))
-            + (LISTING_WORD_SIZE - octet_in_word - 1) * 2;
-          if (offset < end)
-            fprintf (list_file, "%c%c", src[offset], src[offset+1]);
-#endif
          cur += 2;
          idx += 2;
          octet_in_word++;
This page took 0.022953 seconds and 4 git commands to generate.