Build the kernel with -mconstant-gp. This means that function calls,
with the exception of indirect function calls, are assumed to be intra load module and thus that GP will be the same. This avoids saving, setting and restoring GP for each function call and reduces the kernel with ~320KB. There's obviously a performance benefit as well. Note that since we generally don't know if calls will be intra or inter load module when we're compiling kernel modules, -mconstant-gp cannot be used for modules.
This commit is contained in:
parent
7d2eb23f79
commit
52f5014e73
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105022
@ -32,6 +32,8 @@ S= ../../..
|
||||
.endif
|
||||
.include "$S/conf/kern.pre.mk"
|
||||
|
||||
CFLAGS+= -mconstant-gp
|
||||
|
||||
ASM_CFLAGS= -x assembler-with-cpp -Wa,-x -DLOCORE ${CFLAGS}
|
||||
|
||||
%BEFORE_DEPEND
|
||||
|
Loading…
Reference in New Issue
Block a user