If SRCS contains any .S files then remove the corresponding .c file fromSRCS and add to LSRCS (for lint).Change the 'string' Makefiles so that the arch/*/string/Makefile.incneed only specify the .
If SRCS contains any .S files then remove the corresponding .c file fromSRCS and add to LSRCS (for lint).Change the 'string' Makefiles so that the arch/*/string/Makefile.incneed only specify the .S files for that architecture and not the .cfiles for all the files they don't override.
show more ...
Remove references to index.c and rindex.c (strchr.c and strrchr.cnow provide the definitions).
Now that bcopy.S doesn't contain the actual implemenation, move itback to libc.
move to the common tree.
Use reach-over sources from common/lib/libc
Assembly version of string functions.Originally from SHIMIZU Ryo.
Save 1-4 instructions on all cases except for the ret=0 case.This is probably the last version from me. :)You are welcome to speed it up, of course. :)Here's a benchmark on SH-4 200MHz.9.2% fas
Save 1-4 instructions on all cases except for the ret=0 case.This is probably the last version from me. :)You are welcome to speed it up, of course. :)Here's a benchmark on SH-4 200MHz.9.2% faster if all the cases occur evenly.return value C version previous vers this version speed ratioof ffs() (ns/call) *1 (ns/call) (ns/call) *2 (*1/*2)------------ ------------ ------------- ------------ ----------- 0 86 81 81 1.06 1 110 106 91 1.21 2 132 106 92 1.43 3 165 117 96 1.72 4 201 116 95 2.12 5 237 107 99 2.39 6 271 106 101 2.68 7 307 116 107 2.87 8 342 116 105 3.26 9 376 126 111 3.3910 410 127 110 3.7311 446 136 115 3.8812 483 134 116 4.1613 518 125 119 4.3514 551 126 120 4.5915 587 135 127 4.6216 624 136 126 4.9517 658 139 126 5.2218 694 140 126 5.5119 727 148 131 5.5520 764 150 131 5.8321 799 141 135 5.9222 834 142 135 6.1823 868 152 140 6.2024 903 153 142 6.3625 939 140 127 7.3926 974 141 126 7.7327 1009 152 131 7.7028 1044 148 130 8.0329 1080 141 136 7.9430 1115 141 136 8.2031 1151 151 141 8.1632 1185 151 140 8.46
Slightly improved version of ffs(3).Partially from SHIMIZU Ryo <ryo@iij.ad.jp>. Thanks.Some cases are slower, but other most cases are faster.Here's a benchmark on SH-4 200MHz.return value C v
Slightly improved version of ffs(3).Partially from SHIMIZU Ryo <ryo@iij.ad.jp>. Thanks.Some cases are slower, but other most cases are faster.Here's a benchmark on SH-4 200MHz.return value C version previous vers this version speed ratioof ffs() (ns/call) *1 (ns/call) (ns/call) *2 (*1/*2)------------ ------------ ------------- ------------ ----------- 0 86 86 81 1.06 1 110 86 106 *(slower) 1.04 2 132 86 106 * 1.25 3 165 105 117 * 1.41 4 201 104 116 * 1.73 5 237 111 107 2.21 6 271 111 106 2.56 7 307 126 116 2.65 8 342 125 116 2.95 9 376 122 126 * 2.9810 410 121 127 * 3.2311 446 139 136 3.2812 483 140 134 3.6013 518 146 125 4.1414 551 146 126 4.3715 587 161 135 4.3516 624 162 136 4.5917 658 141 139 4.7318 694 142 140 4.9619 727 160 148 4.9120 764 161 150 5.0921 799 167 141 5.6722 834 167 142 5.8723 868 181 152 5.7124 903 181 153 5.9025 939 146 140 6.7126 974 146 141 6.9127 1009 166 152 6.6428 1044 165 148 7.0529 1080 171 141 7.6630 1115 171 141 7.9131 1151 185 151 7.6232 1185 186 151 7.85
Use assembly version of ffs(3).
Oops, SYSLIBC_SCCS -> LIBC_SCCS
Assembly version of ffs(3).Confirmed to return the same value as that of the C version.The results of a simple benchmark on SH-4 200MHz, is shown below.I think this shows acceptable performance.
Assembly version of ffs(3).Confirmed to return the same value as that of the C version.The results of a simple benchmark on SH-4 200MHz, is shown below.I think this shows acceptable performance.return value C version this version speedof ffs() (ns/call) (ns/call) ratio------------ --------- ------------ ----- 0 86 86 1.00 1 110 86 1.27 2 132 86 1.53 3 165 105 1.57 4 201 104 1.93 5 237 111 2.13 6 271 111 2.44 7 307 126 2.43 8 342 125 2.73 9 376 122 3.0810 410 121 3.3811 446 139 3.2012 483 140 3.4513 518 146 3.5414 551 146 3.7715 587 161 3.6416 624 162 3.8517 658 141 4.6618 694 142 4.8819 727 160 4.5420 764 161 4.7421 799 167 4.7822 834 167 4.9923 868 181 4.7924 903 181 4.9825 939 146 6.4326 974 146 6.6727 1009 166 6.0728 1044 165 6.3229 1080 171 6.3130 1115 171 6.5231 1151 185 6.2232 1185 186 6.37
libc for SH3.TODO: fplib