Changeset 7ddcfb8c in rtems
- Timestamp:
- 09/21/98 00:42:07 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 718dc95
- Parents:
- 97d7b068
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libnetworking/netinet/in_cksum_m68k.c
r97d7b068 r7ddcfb8c 114 114 */ 115 115 { 116 unsigned long tcnt = mlen, t1 , t2;116 unsigned long tcnt = mlen, t1; 117 117 __asm__ volatile ( 118 118 "movel %2,%3\n\t" … … 121 121 "negl %3\n\t | Each long uses 4 instruction bytes\n\t" 122 122 #if IS_COLDFIRE 123 "move %%cc,%4 | Move the CC into a temp reg\n\t" 124 "andil #0xf,%4 | Clear X (extended carry flag)\n\t" 125 "move %4,%%cc | Move the modified value back to the cc\n\t" 123 "addql #1,%2 | Clear X (extended carry flag)\n\t" 124 "subql #1,%2 | \n\t" 126 125 #else 127 126 "andi #0xf,%%cc | Clear X (extended carry flag)\n\t" … … 170 169 "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t" 171 170 "swap %3 |\n\t" 172 "andl %2,%0 | \n\t"173 "andl %2,%3 | \n\t"171 "andl %2,%0 | Mask to 16-bit sum\n\t" 172 "andl %2,%3 | Mask to 16-bit sum\n\t" 174 173 "addl %3,%0 |\n\t" 175 174 "movel %0,%3 | Add in last carry\n\t" 176 175 "swap %3 |\n\t" 177 176 "addl %3,%0 |\n\t" 177 "andl %2,%0 | Mask to 16-bit sum\n\t" 178 178 #else 179 179 "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t" … … 183 183 "moveq #0,%3 | Add in last carry\n\t" 184 184 "addxw %3,%0 |\n\t" 185 "andl #0xffff,%0 | Mask to 16-bit sum\n" 185 186 #endif 186 "andl #0xffff,%0 | Mask to 16-bit sum\n":187 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) , "=d" (t2):187 : 188 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) : 188 189 "0" (sum), "1" (w), "2" (tcnt) : 189 190 "cc", "memory"); -
c/src/lib/libnetworking/netinet/in_cksum_m68k.c
r97d7b068 r7ddcfb8c 114 114 */ 115 115 { 116 unsigned long tcnt = mlen, t1 , t2;116 unsigned long tcnt = mlen, t1; 117 117 __asm__ volatile ( 118 118 "movel %2,%3\n\t" … … 121 121 "negl %3\n\t | Each long uses 4 instruction bytes\n\t" 122 122 #if IS_COLDFIRE 123 "move %%cc,%4 | Move the CC into a temp reg\n\t" 124 "andil #0xf,%4 | Clear X (extended carry flag)\n\t" 125 "move %4,%%cc | Move the modified value back to the cc\n\t" 123 "addql #1,%2 | Clear X (extended carry flag)\n\t" 124 "subql #1,%2 | \n\t" 126 125 #else 127 126 "andi #0xf,%%cc | Clear X (extended carry flag)\n\t" … … 170 169 "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t" 171 170 "swap %3 |\n\t" 172 "andl %2,%0 | \n\t"173 "andl %2,%3 | \n\t"171 "andl %2,%0 | Mask to 16-bit sum\n\t" 172 "andl %2,%3 | Mask to 16-bit sum\n\t" 174 173 "addl %3,%0 |\n\t" 175 174 "movel %0,%3 | Add in last carry\n\t" 176 175 "swap %3 |\n\t" 177 176 "addl %3,%0 |\n\t" 177 "andl %2,%0 | Mask to 16-bit sum\n\t" 178 178 #else 179 179 "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t" … … 183 183 "moveq #0,%3 | Add in last carry\n\t" 184 184 "addxw %3,%0 |\n\t" 185 "andl #0xffff,%0 | Mask to 16-bit sum\n" 185 186 #endif 186 "andl #0xffff,%0 | Mask to 16-bit sum\n":187 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) , "=d" (t2):187 : 188 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) : 188 189 "0" (sum), "1" (w), "2" (tcnt) : 189 190 "cc", "memory"); -
c/src/libnetworking/netinet/in_cksum_m68k.c
r97d7b068 r7ddcfb8c 114 114 */ 115 115 { 116 unsigned long tcnt = mlen, t1 , t2;116 unsigned long tcnt = mlen, t1; 117 117 __asm__ volatile ( 118 118 "movel %2,%3\n\t" … … 121 121 "negl %3\n\t | Each long uses 4 instruction bytes\n\t" 122 122 #if IS_COLDFIRE 123 "move %%cc,%4 | Move the CC into a temp reg\n\t" 124 "andil #0xf,%4 | Clear X (extended carry flag)\n\t" 125 "move %4,%%cc | Move the modified value back to the cc\n\t" 123 "addql #1,%2 | Clear X (extended carry flag)\n\t" 124 "subql #1,%2 | \n\t" 126 125 #else 127 126 "andi #0xf,%%cc | Clear X (extended carry flag)\n\t" … … 170 169 "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t" 171 170 "swap %3 |\n\t" 172 "andl %2,%0 | \n\t"173 "andl %2,%3 | \n\t"171 "andl %2,%0 | Mask to 16-bit sum\n\t" 172 "andl %2,%3 | Mask to 16-bit sum\n\t" 174 173 "addl %3,%0 |\n\t" 175 174 "movel %0,%3 | Add in last carry\n\t" 176 175 "swap %3 |\n\t" 177 176 "addl %3,%0 |\n\t" 177 "andl %2,%0 | Mask to 16-bit sum\n\t" 178 178 #else 179 179 "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t" … … 183 183 "moveq #0,%3 | Add in last carry\n\t" 184 184 "addxw %3,%0 |\n\t" 185 "andl #0xffff,%0 | Mask to 16-bit sum\n" 185 186 #endif 186 "andl #0xffff,%0 | Mask to 16-bit sum\n":187 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) , "=d" (t2):187 : 188 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) : 188 189 "0" (sum), "1" (w), "2" (tcnt) : 189 190 "cc", "memory"); -
cpukit/libnetworking/netinet/in_cksum_m68k.c
r97d7b068 r7ddcfb8c 114 114 */ 115 115 { 116 unsigned long tcnt = mlen, t1 , t2;116 unsigned long tcnt = mlen, t1; 117 117 __asm__ volatile ( 118 118 "movel %2,%3\n\t" … … 121 121 "negl %3\n\t | Each long uses 4 instruction bytes\n\t" 122 122 #if IS_COLDFIRE 123 "move %%cc,%4 | Move the CC into a temp reg\n\t" 124 "andil #0xf,%4 | Clear X (extended carry flag)\n\t" 125 "move %4,%%cc | Move the modified value back to the cc\n\t" 123 "addql #1,%2 | Clear X (extended carry flag)\n\t" 124 "subql #1,%2 | \n\t" 126 125 #else 127 126 "andi #0xf,%%cc | Clear X (extended carry flag)\n\t" … … 170 169 "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t" 171 170 "swap %3 |\n\t" 172 "andl %2,%0 | \n\t"173 "andl %2,%3 | \n\t"171 "andl %2,%0 | Mask to 16-bit sum\n\t" 172 "andl %2,%3 | Mask to 16-bit sum\n\t" 174 173 "addl %3,%0 |\n\t" 175 174 "movel %0,%3 | Add in last carry\n\t" 176 175 "swap %3 |\n\t" 177 176 "addl %3,%0 |\n\t" 177 "andl %2,%0 | Mask to 16-bit sum\n\t" 178 178 #else 179 179 "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t" … … 183 183 "moveq #0,%3 | Add in last carry\n\t" 184 184 "addxw %3,%0 |\n\t" 185 "andl #0xffff,%0 | Mask to 16-bit sum\n" 185 186 #endif 186 "andl #0xffff,%0 | Mask to 16-bit sum\n":187 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) , "=d" (t2):187 : 188 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) : 188 189 "0" (sum), "1" (w), "2" (tcnt) : 189 190 "cc", "memory"); -
cpukit/libnetworking/netinet/in_cksum_m68k.h
r97d7b068 r7ddcfb8c 114 114 */ 115 115 { 116 unsigned long tcnt = mlen, t1 , t2;116 unsigned long tcnt = mlen, t1; 117 117 __asm__ volatile ( 118 118 "movel %2,%3\n\t" … … 121 121 "negl %3\n\t | Each long uses 4 instruction bytes\n\t" 122 122 #if IS_COLDFIRE 123 "move %%cc,%4 | Move the CC into a temp reg\n\t" 124 "andil #0xf,%4 | Clear X (extended carry flag)\n\t" 125 "move %4,%%cc | Move the modified value back to the cc\n\t" 123 "addql #1,%2 | Clear X (extended carry flag)\n\t" 124 "subql #1,%2 | \n\t" 126 125 #else 127 126 "andi #0xf,%%cc | Clear X (extended carry flag)\n\t" … … 170 169 "movel %0,%3 | Fold 32 bit sum to 16 bits\n\t" 171 170 "swap %3 |\n\t" 172 "andl %2,%0 | \n\t"173 "andl %2,%3 | \n\t"171 "andl %2,%0 | Mask to 16-bit sum\n\t" 172 "andl %2,%3 | Mask to 16-bit sum\n\t" 174 173 "addl %3,%0 |\n\t" 175 174 "movel %0,%3 | Add in last carry\n\t" 176 175 "swap %3 |\n\t" 177 176 "addl %3,%0 |\n\t" 177 "andl %2,%0 | Mask to 16-bit sum\n\t" 178 178 #else 179 179 "dbf %2,lcsum1_lbl | (NB- dbf doesn't affect X)\n\t" … … 183 183 "moveq #0,%3 | Add in last carry\n\t" 184 184 "addxw %3,%0 |\n\t" 185 "andl #0xffff,%0 | Mask to 16-bit sum\n" 185 186 #endif 186 "andl #0xffff,%0 | Mask to 16-bit sum\n":187 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) , "=d" (t2):187 : 188 "=d" (sum), "=a" (w), "=d" (tcnt) , "=d" (t1) : 188 189 "0" (sum), "1" (w), "2" (tcnt) : 189 190 "cc", "memory");
Note: See TracChangeset
for help on using the changeset viewer.