Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Jason R Thorpe <thorpej@netbsd.org>
List: source-changes
Date: 11/29/1999 16:42:48
Module Name:	syssrc
Committed By:	thorpej
Date:		Tue Nov 30 00:42:48 UTC 1999

Modified Files:
	syssrc/sys/arch/alpha/alpha: pal.s
	syssrc/sys/arch/alpha/include: alpha_cpu.h

Log Message:
Inline several things from pal.s:
- alpha_rpcc(), alpha_mb(), alpha_wmb() -- these are instructions, and
  we win by inlining them: rpcc is generally used for profiling, and
  the memory barriers really should execute as quickly as possible with
  minimal side-effects (like additional loads/stores required to call the
  functions!)
- alpha_pal_imb(), alpha_pal_rdps(), alpha_pal_swpipl(), alpha_pal_tbi(),
  alpha_pal_whami() -- these are PALcode ops.  We must specify some register
  clobbers for these.

We have a very decent size savings as a result.  My test system:
text    data    bss     dec     hex     filename
2671724 235848  377016  3284588 321e6c  /netbsd.bak
2617708 235736  377016  3230460 314afc  /netbsd

Most of this comes from fewer register saves/restores around spl*() calls
(now that alpha_pal_rdps() and alpha_pal_swpipl() are inlined).

Note that alpha_pal_rdps() and alpha_pal_swpipl() remain in pal.s to
maintain binary compatibility with LKMs that may use spl*() functions.


To generate a diff of this commit:
cvs rdiff -r1.12 -r1.13 syssrc/sys/arch/alpha/alpha/pal.s
cvs rdiff -r1.31 -r1.32 syssrc/sys/arch/alpha/include/alpha_cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.