This is the mail archive of the binutils@sourceware.cygnus.com 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]

What is this bogus change?


Hi, Timothy,

Could you please tell me why you put in this change:

2000-02-03  Timothy Wall  <twall@cygnus.com>

	* listing.c (print_lines): Also, if LISTING_WORD_SIZE is not 1, and
	target is little-endian, print the octets in a word in big-endian
	order so that the display looks like a proper hexadecimal number,
	instead of having the octets reversed.

This change breaks "make check" in gas on i386 which is a little-endian
machine. The old listing order of opcodes looks fine to me. It matches
the opcodes from the Intel IA-32 reference manual. Could you please
tell me what is wrong with the previous listing order on i386? I am
enclosing a patch which reverts your change.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
---
Fri Feb  4 10:13:53 2000  H.J. Lu  (hjl@gnu.org)

	* listing.c (print_lines): Don't treat little-endian
	differently than big-endian.

Index: listing.c
===================================================================
RCS file: /work/cvs/gnu/binutils/gas/listing.c,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 listing.c
--- listing.c	2000/02/03 23:24:47	1.1.1.3
+++ listing.c	2000/02/04 18:13:10
@@ -713,15 +713,8 @@ print_lines (list, lineno, string, addre
   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 +757,8 @@ print_lines (list, lineno, string, addre
       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++;

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