This is the mail archive of the binutils@sources.redhat.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]
Other format: [Raw text]

Re: Set USE_BRL in elfxx-ia64.c at run-time?


On Mon, Mar 03, 2003 at 02:54:12PM -0500, Jim Wilson wrote:
> H. J. Lu wrote:
> > Right now, USE_BRL in elfxx-ia64.c is set at the compile time.
> > Shouldn't we change it a run-time option? Is that a good idea?
> 
> We could probably just remove the macro and emit BRL always.  This will 
> hurt Itanium1 performance, but anyone who cares about performance 
> shouldn't be using an Itanium1 processor anyways.  There probably aren't 
> many people left with working Itanium1 machines.
> 

Like this?


H.J.
----
2003-03-03  H.J. Lu <hjl at gnu dot org>

	* elfxx-ia64.c (USE_BRL): Removed.
	(oor_ip): Removed.

--- bfd/elfxx-ia64.c.brl	2003-03-03 09:05:50.000000000 -0800
+++ bfd/elfxx-ia64.c	2003-03-03 12:05:16.000000000 -0800
@@ -656,31 +656,12 @@ static const bfd_byte plt_full_entry[PLT
 #define DYNAMIC_INTERPRETER(abfd) \
   (elfNN_ia64_aix_vec (abfd->xvec) ? AIX_DYNAMIC_INTERPRETER : ELF_DYNAMIC_INTERPRETER)
 
-/* Select out of range branch fixup type.  Note that Itanium does
-   not support brl, and so it gets emulated by the kernel.  */
-#undef USE_BRL
-
-#ifdef USE_BRL
 static const bfd_byte oor_brl[16] =
 {
   0x05, 0x00, 0x00, 0x00, 0x01, 0x00,  /*  [MLX]        nop.m 0            */
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /*               brl.sptk.few tgt;; */
   0x00, 0x00, 0x00, 0xc0
 };
-#else
-static const bfd_byte oor_ip[48] =
-{
-  0x04, 0x00, 0x00, 0x00, 0x01, 0x00,  /*  [MLX]        nop.m 0            */
-  0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,  /*               movl r15=0         */
-  0x01, 0x00, 0x00, 0x60,
-  0x03, 0x00, 0x00, 0x00, 0x01, 0x00,  /*  [MII]        nop.m 0            */
-  0x00, 0x01, 0x00, 0x60, 0x00, 0x00,  /*               mov r16=ip;;       */
-  0xf2, 0x80, 0x00, 0x80,              /*               add r16=r15,r16;;  */
-  0x11, 0x00, 0x00, 0x00, 0x01, 0x00,  /*  [MIB]        nop.m 0            */
-  0x60, 0x80, 0x04, 0x80, 0x03, 0x00,  /*               mov b6=r16         */
-  0x60, 0x00, 0x80, 0x00               /*               br b6;;            */
-};
-#endif
 
 /* These functions do relaxation for IA-64 ELF.  */
 
@@ -897,11 +878,7 @@ elfNN_ia64_relax_section (abfd, sec, lin
 		size = sizeof (plt_full_entry);
 	      else
 		{
-#ifdef USE_BRL
 		  size = sizeof (oor_brl);
-#else
-		  size = sizeof (oor_ip);
-#endif
 		}
 
 	      /* Resize the current section to make room for the new branch. */
@@ -923,18 +900,10 @@ elfNN_ia64_relax_section (abfd, sec, lin
 		}
 	      else
 		{
-#ifdef USE_BRL
 		  memcpy (contents + trampoff, oor_brl, size);
 		  irel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
 					       R_IA64_PCREL60B);
 		  irel->r_offset = trampoff + 2;
-#else
-		  memcpy (contents + trampoff, oor_ip, size);
-		  irel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
-					       R_IA64_PCREL64I);
-		  irel->r_addend -= 16;
-		  irel->r_offset = trampoff + 2;
-#endif
 		}
 
 	      /* Record the fixup so we don't do it again this section.  */


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