ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/liblzf/lzf_d.c
(Generate patch)

Comparing liblzf/lzf_d.c (file contents):
Revision 1.15 by root, Mon Dec 10 20:21:28 2012 UTC vs.
Revision 1.16 by root, Mon Feb 23 23:46:10 2015 UTC

50 : "=D" (dst), "=S" (src), "=c" (len) \ 50 : "=D" (dst), "=S" (src), "=c" (len) \
51 : "0" (dst), "1" (src), "2" (len)); 51 : "0" (dst), "1" (src), "2" (len));
52#endif 52#endif
53#endif 53#endif
54 54
55unsigned int 55unsigned int
56lzf_decompress (const void *const in_data, unsigned int in_len, 56lzf_decompress (const void *const in_data, unsigned int in_len,
57 void *out_data, unsigned int out_len) 57 void *out_data, unsigned int out_len)
58{ 58{
59 u8 const *ip = (const u8 *)in_data; 59 u8 const *ip = (const u8 *)in_data;
60 u8 *op = (u8 *)out_data; 60 u8 *op = (u8 *)out_data;
83 } 83 }
84#endif 84#endif
85 85
86#ifdef lzf_movsb 86#ifdef lzf_movsb
87 lzf_movsb (op, ip, ctrl); 87 lzf_movsb (op, ip, ctrl);
88#elif OPTIMISE_SIZE
89 while (ctrl--)
90 *op++ = *ip++;
88#else 91#else
89 switch (ctrl) 92 switch (ctrl)
90 { 93 {
91 case 32: *op++ = *ip++; case 31: *op++ = *ip++; case 30: *op++ = *ip++; case 29: *op++ = *ip++; 94 case 32: *op++ = *ip++; case 31: *op++ = *ip++; case 30: *op++ = *ip++; case 29: *op++ = *ip++;
92 case 28: *op++ = *ip++; case 27: *op++ = *ip++; case 26: *op++ = *ip++; case 25: *op++ = *ip++; 95 case 28: *op++ = *ip++; case 27: *op++ = *ip++; case 26: *op++ = *ip++; case 25: *op++ = *ip++;
139 } 142 }
140 143
141#ifdef lzf_movsb 144#ifdef lzf_movsb
142 len += 2; 145 len += 2;
143 lzf_movsb (op, ref, len); 146 lzf_movsb (op, ref, len);
147#elif OPTIMISE_SIZE
148 len += 2;
149
150 do
151 *op++ = *ref++;
152 while (--len);
144#else 153#else
145 switch (len) 154 switch (len)
146 { 155 {
147 default: 156 default:
148 len += 2; 157 len += 2;
153 memcpy (op, ref, len); 162 memcpy (op, ref, len);
154 op += len; 163 op += len;
155 } 164 }
156 else 165 else
157 { 166 {
158 /* overlapping, use octte by octte copying */ 167 /* overlapping, use octet by octet copying */
159 do 168 do
160 *op++ = *ref++; 169 *op++ = *ref++;
161 while (--len); 170 while (--len);
162 } 171 }
163 172

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines