This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Two x86_64 codegen fixes


Hi,
the attached patch I installed to mainline fixes two small x86_64 codegen bugs.
The first comes from tablejumps that are 32bit and signed in PIC 64bit
compilation.  The values are negative and used to be sign extended.  Richard
changed it to zero extension in the 32bit tablejump changes that broke shared
libraries.

The changes has no effect to 32bit compilation (as the extension does not happen)

Honza

Mon Aug 12 12:44:42 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* i386.md (tablejump): Sign extend the operand.
	* i386.c (classify_argument): Fix missed case from previous patch.

Index: i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.379
diff -c -3 -p -r1.379 i386.md
*** i386.md	31 Jul 2002 23:18:43 -0000	1.379
--- i386.md	12 Aug 2002 10:40:26 -0000
***************
*** 13154,13160 ****
  	  op1 = operands[0];
  	}
  
!       operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 1,
  					 OPTAB_DIRECT);
      }
  })
--- 13154,13160 ----
  	  op1 = operands[0];
  	}
  
!       operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 0,
  					 OPTAB_DIRECT);
      }
  })
Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.445
diff -c -3 -p -r1.445 i386.c
*** i386.c	11 Aug 2002 12:44:21 -0000	1.445
--- i386.c	12 Aug 2002 10:40:37 -0000
*************** classify_argument (mode, type, classes, 
*** 1727,1733 ****
  		     return 0;
  		   for (i = 0; i < num; i++)
  		     {
! 		       int pos = (offset + bit_offset) / 8 / 8;
  		       classes[i + pos] =
  			 merge_classes (subclasses[i], classes[i + pos]);
  		     }
--- 1727,1733 ----
  		     return 0;
  		   for (i = 0; i < num; i++)
  		     {
! 		       int pos = (offset + (bit_offset % 64)) / 8 / 8;
  		       classes[i + pos] =
  			 merge_classes (subclasses[i], classes[i + pos]);
  		     }


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