Subject: Re: New Boot Load Doesn't Work on IPX
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Todd Whitesel <toddpw@best.com>
List: port-sparc
Date: 01/29/2000 22:12:15
> >> A classic PIC application that has little/nothing to do with shared
> >> libs.
> 
> > Unfortunately, PIC code is often a bit slower, due to extra loads
> > required, and cache thrashing (referencing the GOT/PLT).

The main causes of extra loads on most chips are:
	- lots of global variables
	- lots of explicit address generation via the & operator
	- lack of good instruction set support for PIC (oh well)

Explicit address generation is relatively rare in most programs,
and globals can be dealt with by aggressively using the small-data-area
features of compilers -- S.D.A. is inherently position independent as
it uses a reserved register to locate the block of globals. The relocator
has to be SDA-aware, but in practice that's not difficult.

IIRC the Alpha GOT is basically a special-purpose SDA, so that all 32/64
bit literal values can be loaded from the GOT in a single instruction,
and not built up from 16-bit immediate fields as on many other RISCs.
The code to set the GOT register is designed to be position-independent
already, so switching to PIC code doesn't make it any worse.

> Fortunately, the bootloader is not speed-critical.

It's also modestly sized, and is therefore a _great_ candidate for SDA.
Especially on SPARC where the SDA can only have 8K of stuff in it.

Todd Whitesel
toddpw @ best.com