* Set USE_BRL in elfxx-ia64.c at run-time?
@ 2003-03-01 5:06 H. J. Lu
2003-03-03 19:53 ` Jim Wilson
0 siblings, 1 reply; 8+ messages in thread
From: H. J. Lu @ 2003-03-01 5:06 UTC (permalink / raw)
To: binutils
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?
H.J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Set USE_BRL in elfxx-ia64.c at run-time?
2003-03-01 5:06 Set USE_BRL in elfxx-ia64.c at run-time? H. J. Lu
@ 2003-03-03 19:53 ` Jim Wilson
2003-03-03 20:15 ` H. J. Lu
2003-03-04 0:17 ` law
0 siblings, 2 replies; 8+ messages in thread
From: Jim Wilson @ 2003-03-03 19:53 UTC (permalink / raw)
To: H. J. Lu; +Cc: binutils
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.
I think some of the recent Red Hat Linux releases do this already.
Jim
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Set USE_BRL in elfxx-ia64.c at run-time?
2003-03-03 19:53 ` Jim Wilson
@ 2003-03-03 20:15 ` H. J. Lu
2003-03-03 21:32 ` Jim Wilson
2003-03-04 0:17 ` law
1 sibling, 1 reply; 8+ messages in thread
From: H. J. Lu @ 2003-03-03 20:15 UTC (permalink / raw)
To: Jim Wilson; +Cc: binutils
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@gnu.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
\f
/* 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. */
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Set USE_BRL in elfxx-ia64.c at run-time?
2003-03-03 20:15 ` H. J. Lu
@ 2003-03-03 21:32 ` Jim Wilson
0 siblings, 0 replies; 8+ messages in thread
From: Jim Wilson @ 2003-03-03 21:32 UTC (permalink / raw)
To: H. J. Lu; +Cc: binutils
On Mon, 2003-03-03 at 15:15, H. J. Lu wrote:
> * elfxx-ia64.c (USE_BRL): Removed.
> (oor_ip): Removed.
I think this is OK. I don't have access to Itanium hardware at present
so I can't test it other than as a cross. We might want to ask on the
linux-ia64@linuxia64.org mailing list to see if anyone cares, but I
don't think this is strictly necessary.
Jim
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Set USE_BRL in elfxx-ia64.c at run-time?
2003-03-03 19:53 ` Jim Wilson
2003-03-03 20:15 ` H. J. Lu
@ 2003-03-04 0:17 ` law
2003-03-04 1:15 ` Richard Henderson
1 sibling, 1 reply; 8+ messages in thread
From: law @ 2003-03-04 0:17 UTC (permalink / raw)
To: Jim Wilson; +Cc: H. J. Lu, binutils
In message <3E63B2E4.2070805@tuliptree.org>, Jim Wilson writes:
>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.
>
>I think some of the recent Red Hat Linux releases do this already.
Cool. This was on my plate of things to look at -- presumably
Itanium 2 hardware implements BRL, rather than punting to an emulator.
Right?
I suspect most folks aren't going to care about Itanium 1 performance :-)
jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Set USE_BRL in elfxx-ia64.c at run-time?
2003-03-04 0:17 ` law
@ 2003-03-04 1:15 ` Richard Henderson
2003-03-07 18:16 ` law
0 siblings, 1 reply; 8+ messages in thread
From: Richard Henderson @ 2003-03-04 1:15 UTC (permalink / raw)
To: law; +Cc: Jim Wilson, H. J. Lu, binutils
On Mon, Mar 03, 2003 at 05:17:03PM -0700, law@redhat.com wrote:
> Cool. This was on my plate of things to look at -- presumably
> Itanium 2 hardware implements BRL, rather than punting to an emulator.
> Right?
Correct. And, just in case anyone's forgotten, the ABI requires
the emulator to exist, so binaries *should* still run.
> I suspect most folks aren't going to care about Itanium 1 performance :-)
Well, no one who's paying anyway. ;-)
r~
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Set USE_BRL in elfxx-ia64.c at run-time?
2003-03-04 1:15 ` Richard Henderson
@ 2003-03-07 18:16 ` law
2003-03-07 22:29 ` Richard Henderson
0 siblings, 1 reply; 8+ messages in thread
From: law @ 2003-03-07 18:16 UTC (permalink / raw)
To: Richard Henderson; +Cc: Jim Wilson, H. J. Lu, binutils
In message <20030304011552.GQ12472@redhat.com>, Richard Henderson writes:
>On Mon, Mar 03, 2003 at 05:17:03PM -0700, law@redhat.com wrote:
>> Cool. This was on my plate of things to look at -- presumably
>> Itanium 2 hardware implements BRL, rather than punting to an emulator.
>> Right?
>
>Correct. And, just in case anyone's forgotten, the ABI requires
>the emulator to exist, so binaries *should* still run.
Cool.
On a marginally related note, what's the status on support for CHK
targets that are more than 16M away? [ The other IA-64 item on my
list of things to investigate :-) ]
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Set USE_BRL in elfxx-ia64.c at run-time?
2003-03-07 18:16 ` law
@ 2003-03-07 22:29 ` Richard Henderson
0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 2003-03-07 22:29 UTC (permalink / raw)
To: law; +Cc: Jim Wilson, H. J. Lu, binutils
On Fri, Mar 07, 2003 at 11:16:44AM -0700, law@redhat.com wrote:
> On a marginally related note, what's the status on support for CHK
> targets that are more than 16M away? [ The other IA-64 item on my
> list of things to investigate :-) ]
Should work.
2002-09-09 Richard Henderson <rth@redhat.com>
* elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
and PCREL21F like PCREL21B.
r~
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-03-07 22:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-01 5:06 Set USE_BRL in elfxx-ia64.c at run-time? H. J. Lu
2003-03-03 19:53 ` Jim Wilson
2003-03-03 20:15 ` H. J. Lu
2003-03-03 21:32 ` Jim Wilson
2003-03-04 0:17 ` law
2003-03-04 1:15 ` Richard Henderson
2003-03-07 18:16 ` law
2003-03-07 22:29 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).