Changeset 1564ca8 in rtems
- Timestamp:
- 02/04/99 14:56:09 (23 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- d3c1060
- Parents:
- 8cce445
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libnetworking/netinet/in_cksum_powerpc.c
r8cce445 r1564ca8 43 43 register int len; 44 44 { 45 u_char junk; 45 46 register u_short *w; 46 47 register unsigned sum = 0; … … 92 93 } 93 94 } 94 /* 95 * Advance to a cache line boundary. 96 */ 97 if (4 & (int) w && mlen >= 4) { 98 ADD(0); 99 MOP; 100 w += 2; 101 mlen -= 4; 102 } 103 if (8 & (int) w && mlen >= 8) { 104 ADD(0); 105 ADDC(4); 106 MOP; 107 w += 4; 108 mlen -= 8; 109 } 95 110 96 /* 111 97 * Do as much of the checksum as possible 32 bits at at time. 112 * In fact, this loop is unrolled to makeoverhead from113 * branches &csmall.98 * In fact, this loop is unrolled to keep overhead from 99 * branches small. 114 100 */ 115 mlen -= 1; 116 while ((mlen -= 32) >= 0) { 117 u_char junk; 101 while (mlen >= 32) { 118 102 /* 119 103 * Add with carry 16 words and fold in the last … … 129 113 ADDC(12); 130 114 LOAD(32); 131 ADDC(20);132 ADDC(24);133 ADDC(28);134 MOP;135 w += 16;136 }137 mlen += 32 + 1;138 if (mlen >= 32) {139 ADD(16);140 ADDC(0);141 ADDC(4);142 ADDC(8);143 ADDC(12);144 115 ADDC(20); 145 116 ADDC(24); -
c/src/lib/libnetworking/netinet/in_cksum_powerpc.c
r8cce445 r1564ca8 43 43 register int len; 44 44 { 45 u_char junk; 45 46 register u_short *w; 46 47 register unsigned sum = 0; … … 92 93 } 93 94 } 94 /* 95 * Advance to a cache line boundary. 96 */ 97 if (4 & (int) w && mlen >= 4) { 98 ADD(0); 99 MOP; 100 w += 2; 101 mlen -= 4; 102 } 103 if (8 & (int) w && mlen >= 8) { 104 ADD(0); 105 ADDC(4); 106 MOP; 107 w += 4; 108 mlen -= 8; 109 } 95 110 96 /* 111 97 * Do as much of the checksum as possible 32 bits at at time. 112 * In fact, this loop is unrolled to makeoverhead from113 * branches &csmall.98 * In fact, this loop is unrolled to keep overhead from 99 * branches small. 114 100 */ 115 mlen -= 1; 116 while ((mlen -= 32) >= 0) { 117 u_char junk; 101 while (mlen >= 32) { 118 102 /* 119 103 * Add with carry 16 words and fold in the last … … 129 113 ADDC(12); 130 114 LOAD(32); 131 ADDC(20);132 ADDC(24);133 ADDC(28);134 MOP;135 w += 16;136 }137 mlen += 32 + 1;138 if (mlen >= 32) {139 ADD(16);140 ADDC(0);141 ADDC(4);142 ADDC(8);143 ADDC(12);144 115 ADDC(20); 145 116 ADDC(24); -
c/src/libnetworking/netinet/in_cksum_powerpc.c
r8cce445 r1564ca8 43 43 register int len; 44 44 { 45 u_char junk; 45 46 register u_short *w; 46 47 register unsigned sum = 0; … … 92 93 } 93 94 } 94 /* 95 * Advance to a cache line boundary. 96 */ 97 if (4 & (int) w && mlen >= 4) { 98 ADD(0); 99 MOP; 100 w += 2; 101 mlen -= 4; 102 } 103 if (8 & (int) w && mlen >= 8) { 104 ADD(0); 105 ADDC(4); 106 MOP; 107 w += 4; 108 mlen -= 8; 109 } 95 110 96 /* 111 97 * Do as much of the checksum as possible 32 bits at at time. 112 * In fact, this loop is unrolled to makeoverhead from113 * branches &csmall.98 * In fact, this loop is unrolled to keep overhead from 99 * branches small. 114 100 */ 115 mlen -= 1; 116 while ((mlen -= 32) >= 0) { 117 u_char junk; 101 while (mlen >= 32) { 118 102 /* 119 103 * Add with carry 16 words and fold in the last … … 129 113 ADDC(12); 130 114 LOAD(32); 131 ADDC(20);132 ADDC(24);133 ADDC(28);134 MOP;135 w += 16;136 }137 mlen += 32 + 1;138 if (mlen >= 32) {139 ADD(16);140 ADDC(0);141 ADDC(4);142 ADDC(8);143 ADDC(12);144 115 ADDC(20); 145 116 ADDC(24); -
cpukit/libnetworking/netinet/in_cksum_powerpc.c
r8cce445 r1564ca8 43 43 register int len; 44 44 { 45 u_char junk; 45 46 register u_short *w; 46 47 register unsigned sum = 0; … … 92 93 } 93 94 } 94 /* 95 * Advance to a cache line boundary. 96 */ 97 if (4 & (int) w && mlen >= 4) { 98 ADD(0); 99 MOP; 100 w += 2; 101 mlen -= 4; 102 } 103 if (8 & (int) w && mlen >= 8) { 104 ADD(0); 105 ADDC(4); 106 MOP; 107 w += 4; 108 mlen -= 8; 109 } 95 110 96 /* 111 97 * Do as much of the checksum as possible 32 bits at at time. 112 * In fact, this loop is unrolled to makeoverhead from113 * branches &csmall.98 * In fact, this loop is unrolled to keep overhead from 99 * branches small. 114 100 */ 115 mlen -= 1; 116 while ((mlen -= 32) >= 0) { 117 u_char junk; 101 while (mlen >= 32) { 118 102 /* 119 103 * Add with carry 16 words and fold in the last … … 129 113 ADDC(12); 130 114 LOAD(32); 131 ADDC(20);132 ADDC(24);133 ADDC(28);134 MOP;135 w += 16;136 }137 mlen += 32 + 1;138 if (mlen >= 32) {139 ADD(16);140 ADDC(0);141 ADDC(4);142 ADDC(8);143 ADDC(12);144 115 ADDC(20); 145 116 ADDC(24); -
cpukit/libnetworking/netinet/in_cksum_powerpc.h
r8cce445 r1564ca8 43 43 register int len; 44 44 { 45 u_char junk; 45 46 register u_short *w; 46 47 register unsigned sum = 0; … … 92 93 } 93 94 } 94 /* 95 * Advance to a cache line boundary. 96 */ 97 if (4 & (int) w && mlen >= 4) { 98 ADD(0); 99 MOP; 100 w += 2; 101 mlen -= 4; 102 } 103 if (8 & (int) w && mlen >= 8) { 104 ADD(0); 105 ADDC(4); 106 MOP; 107 w += 4; 108 mlen -= 8; 109 } 95 110 96 /* 111 97 * Do as much of the checksum as possible 32 bits at at time. 112 * In fact, this loop is unrolled to makeoverhead from113 * branches &csmall.98 * In fact, this loop is unrolled to keep overhead from 99 * branches small. 114 100 */ 115 mlen -= 1; 116 while ((mlen -= 32) >= 0) { 117 u_char junk; 101 while (mlen >= 32) { 118 102 /* 119 103 * Add with carry 16 words and fold in the last … … 129 113 ADDC(12); 130 114 LOAD(32); 131 ADDC(20);132 ADDC(24);133 ADDC(28);134 MOP;135 w += 16;136 }137 mlen += 32 + 1;138 if (mlen >= 32) {139 ADD(16);140 ADDC(0);141 ADDC(4);142 ADDC(8);143 ADDC(12);144 115 ADDC(20); 145 116 ADDC(24);
Note: See TracChangeset
for help on using the changeset viewer.