16 #include <linux/prefetch.h>
19 xor_8regs_2(
unsigned long bytes,
unsigned long *
p1,
unsigned long *p2)
21 long lines = bytes / (
sizeof (
long)) / 8;
34 }
while (--lines > 0);
38 xor_8regs_3(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
41 long lines = bytes / (
sizeof (
long)) / 8;
44 p1[0] ^= p2[0] ^ p3[0];
45 p1[1] ^= p2[1] ^ p3[1];
46 p1[2] ^= p2[2] ^ p3[2];
47 p1[3] ^= p2[3] ^ p3[3];
48 p1[4] ^= p2[4] ^ p3[4];
49 p1[5] ^= p2[5] ^ p3[5];
50 p1[6] ^= p2[6] ^ p3[6];
51 p1[7] ^= p2[7] ^ p3[7];
55 }
while (--lines > 0);
59 xor_8regs_4(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
60 unsigned long *p3,
unsigned long *p4)
62 long lines = bytes / (
sizeof (
long)) / 8;
65 p1[0] ^= p2[0] ^ p3[0] ^ p4[0];
66 p1[1] ^= p2[1] ^ p3[1] ^ p4[1];
67 p1[2] ^= p2[2] ^ p3[2] ^ p4[2];
68 p1[3] ^= p2[3] ^ p3[3] ^ p4[3];
69 p1[4] ^= p2[4] ^ p3[4] ^ p4[4];
70 p1[5] ^= p2[5] ^ p3[5] ^ p4[5];
71 p1[6] ^= p2[6] ^ p3[6] ^ p4[6];
72 p1[7] ^= p2[7] ^ p3[7] ^ p4[7];
77 }
while (--lines > 0);
81 xor_8regs_5(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
82 unsigned long *p3,
unsigned long *p4,
unsigned long *p5)
84 long lines = bytes / (
sizeof (
long)) / 8;
87 p1[0] ^= p2[0] ^ p3[0] ^ p4[0] ^ p5[0];
88 p1[1] ^= p2[1] ^ p3[1] ^ p4[1] ^ p5[1];
89 p1[2] ^= p2[2] ^ p3[2] ^ p4[2] ^ p5[2];
90 p1[3] ^= p2[3] ^ p3[3] ^ p4[3] ^ p5[3];
91 p1[4] ^= p2[4] ^ p3[4] ^ p4[4] ^ p5[4];
92 p1[5] ^= p2[5] ^ p3[5] ^ p4[5] ^ p5[5];
93 p1[6] ^= p2[6] ^ p3[6] ^ p4[6] ^ p5[6];
94 p1[7] ^= p2[7] ^ p3[7] ^ p4[7] ^ p5[7];
100 }
while (--lines > 0);
104 xor_32regs_2(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2)
106 long lines = bytes / (
sizeof (
long)) / 8;
109 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
136 }
while (--lines > 0);
140 xor_32regs_3(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
143 long lines = bytes / (
sizeof (
long)) / 8;
146 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
182 }
while (--lines > 0);
186 xor_32regs_4(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
187 unsigned long *p3,
unsigned long *p4)
189 long lines = bytes / (
sizeof (
long)) / 8;
192 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
237 }
while (--lines > 0);
241 xor_32regs_5(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
242 unsigned long *p3,
unsigned long *p4,
unsigned long *p5)
244 long lines = bytes / (
sizeof (
long)) / 8;
247 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
301 }
while (--lines > 0);
305 xor_8regs_p_2(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2)
307 long lines = bytes / (
sizeof (
long)) / 8 - 1;
325 }
while (--lines > 0);
331 xor_8regs_p_3(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
334 long lines = bytes / (
sizeof (
long)) / 8 - 1;
344 p1[0] ^= p2[0] ^ p3[0];
345 p1[1] ^= p2[1] ^ p3[1];
346 p1[2] ^= p2[2] ^ p3[2];
347 p1[3] ^= p2[3] ^ p3[3];
348 p1[4] ^= p2[4] ^ p3[4];
349 p1[5] ^= p2[5] ^ p3[5];
350 p1[6] ^= p2[6] ^ p3[6];
351 p1[7] ^= p2[7] ^ p3[7];
355 }
while (--lines > 0);
361 xor_8regs_p_4(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
362 unsigned long *p3,
unsigned long *p4)
364 long lines = bytes / (
sizeof (
long)) / 8 - 1;
377 p1[0] ^= p2[0] ^ p3[0] ^ p4[0];
378 p1[1] ^= p2[1] ^ p3[1] ^ p4[1];
379 p1[2] ^= p2[2] ^ p3[2] ^ p4[2];
380 p1[3] ^= p2[3] ^ p3[3] ^ p4[3];
381 p1[4] ^= p2[4] ^ p3[4] ^ p4[4];
382 p1[5] ^= p2[5] ^ p3[5] ^ p4[5];
383 p1[6] ^= p2[6] ^ p3[6] ^ p4[6];
384 p1[7] ^= p2[7] ^ p3[7] ^ p4[7];
389 }
while (--lines > 0);
395 xor_8regs_p_5(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
396 unsigned long *p3,
unsigned long *p4,
unsigned long *p5)
398 long lines = bytes / (
sizeof (
long)) / 8 - 1;
413 p1[0] ^= p2[0] ^ p3[0] ^ p4[0] ^ p5[0];
414 p1[1] ^= p2[1] ^ p3[1] ^ p4[1] ^ p5[1];
415 p1[2] ^= p2[2] ^ p3[2] ^ p4[2] ^ p5[2];
416 p1[3] ^= p2[3] ^ p3[3] ^ p4[3] ^ p5[3];
417 p1[4] ^= p2[4] ^ p3[4] ^ p4[4] ^ p5[4];
418 p1[5] ^= p2[5] ^ p3[5] ^ p4[5] ^ p5[5];
419 p1[6] ^= p2[6] ^ p3[6] ^ p4[6] ^ p5[6];
420 p1[7] ^= p2[7] ^ p3[7] ^ p4[7] ^ p5[7];
426 }
while (--lines > 0);
432 xor_32regs_p_2(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2)
434 long lines = bytes / (
sizeof (
long)) / 8 - 1;
440 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
471 }
while (--lines > 0);
477 xor_32regs_p_3(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
480 long lines = bytes / (
sizeof (
long)) / 8 - 1;
487 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
528 }
while (--lines > 0);
534 xor_32regs_p_4(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
535 unsigned long *p3,
unsigned long *p4)
537 long lines = bytes / (
sizeof (
long)) / 8 - 1;
545 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
596 }
while (--lines > 0);
602 xor_32regs_p_5(
unsigned long bytes,
unsigned long *p1,
unsigned long *p2,
603 unsigned long *p3,
unsigned long *p4,
unsigned long *p5)
605 long lines = bytes / (
sizeof (
long)) / 8 - 1;
614 register long d0,
d1,
d2, d3, d4, d5, d6, d7;
675 }
while (--lines > 0);
690 .do_2 = xor_32regs_2,
691 .do_3 = xor_32regs_3,
692 .do_4 = xor_32regs_4,
693 .do_5 = xor_32regs_5,
697 .name =
"8regs_prefetch",
698 .do_2 = xor_8regs_p_2,
699 .do_3 = xor_8regs_p_3,
700 .do_4 = xor_8regs_p_4,
701 .do_5 = xor_8regs_p_5,
705 .
name =
"32regs_prefetch",
706 .do_2 = xor_32regs_p_2,
707 .do_3 = xor_32regs_p_3,
708 .do_4 = xor_32regs_p_4,
709 .do_5 = xor_32regs_p_5,
712 #define XOR_TRY_TEMPLATES \
714 xor_speed(&xor_block_8regs); \
715 xor_speed(&xor_block_8regs_p); \
716 xor_speed(&xor_block_32regs); \
717 xor_speed(&xor_block_32regs_p); \