diff options
author | Anton Blanchard <anton@samba.org> | 2013-12-03 18:19:06 +1100 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2013-12-03 10:53:31 -0800 |
commit | cb90a942dcb20ca34ea6d7b2f3df80d28378d871 (patch) | |
tree | 58b497f3e0bbcb44c750b75bcfb3290ab612da3e | |
parent | 87ad992e1ae0036436646610a23feb4c2895593f (diff) | |
download | klibc-cb90a942dcb20ca34ea6d7b2f3df80d28378d871.tar.gz |
[klibc] ppc64: build with -mcmodel=small
If available, use -mcmodel=small. klibc is small enough that we
should never hit the limits of the small memory model.
This produces better code, for example:
000000000f003890 <.strcasecmp>:
f003890: 3c a2 ff fe addis r5,r2,-2
...
f003898: 38 c5 23 58 addi r6,r5,9048
...
f0038ac: 7d 46 50 ae lbzx r10,r6,r10
vs:
000000000f0037c4 <.strcasecmp>:
f0037c4: e8 c2 81 48 ld r6,-32440(r2)
f0037dc: 7d 46 50 ae lbzx r10,r6,r10
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | usr/klibc/arch/ppc64/MCONFIG | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/klibc/arch/ppc64/MCONFIG b/usr/klibc/arch/ppc64/MCONFIG index 0294c440a0dd23..1331e05322c070 100644 --- a/usr/klibc/arch/ppc64/MCONFIG +++ b/usr/klibc/arch/ppc64/MCONFIG @@ -9,6 +9,7 @@ KLIBCARCHREQFLAGS = -m64 KLIBCARCHREQFLAGS += $(call cc-option, -mcall-aixdesc, ) +KLIBCARCHREQFLAGS += $(call cc-option, -mcmodel=small, ) KLIBCOPTFLAGS += -Os KLIBCBITSIZE = 64 |