@@ -15,7 +15,6 @@ static void xor_xc_2(unsigned long bytes, unsigned long * __restrict p1,
15
15
const unsigned long * __restrict p2 )
16
16
{
17
17
asm volatile (
18
- " larl 1,2f\n"
19
18
" aghi %0,-1\n"
20
19
" jm 3f\n"
21
20
" srlg 0,%0,8\n"
@@ -25,22 +24,21 @@ static void xor_xc_2(unsigned long bytes, unsigned long * __restrict p1,
25
24
" la %1,256(%1)\n"
26
25
" la %2,256(%2)\n"
27
26
" brctg 0,0b\n"
28
- "1: ex %0,0(1) \n"
27
+ "1: exrl %0,2f \n"
29
28
" j 3f\n"
30
29
"2: xc 0(1,%1),0(%2)\n"
31
30
"3:\n"
32
31
: : "d" (bytes ), "a" (p1 ), "a" (p2 )
33
- : "0" , "1" , " cc" , "memory" );
32
+ : "0" , "cc" , "memory" );
34
33
}
35
34
36
35
static void xor_xc_3 (unsigned long bytes , unsigned long * __restrict p1 ,
37
36
const unsigned long * __restrict p2 ,
38
37
const unsigned long * __restrict p3 )
39
38
{
40
39
asm volatile (
41
- " larl 1,2f\n"
42
40
" aghi %0,-1\n"
43
- " jm 3f \n"
41
+ " jm 4f \n"
44
42
" srlg 0,%0,8\n"
45
43
" ltgr 0,0\n"
46
44
" jz 1f\n"
@@ -50,14 +48,14 @@ static void xor_xc_3(unsigned long bytes, unsigned long * __restrict p1,
50
48
" la %2,256(%2)\n"
51
49
" la %3,256(%3)\n"
52
50
" brctg 0,0b\n"
53
- "1: ex %0,0(1) \n"
54
- " ex %0,6(1) \n"
55
- " j 3f \n"
51
+ "1: exrl %0,2f \n"
52
+ " exrl %0,3f \n"
53
+ " j 4f \n"
56
54
"2: xc 0(1,%1),0(%2)\n"
57
- " xc 0(1,%1),0(%3)\n"
58
- "3 :\n"
55
+ "3: xc 0(1,%1),0(%3)\n"
56
+ "4 :\n"
59
57
: "+d" (bytes ), "+a" (p1 ), "+a" (p2 ), "+a" (p3 )
60
- : : "0" , "1" , " cc" , "memory" );
58
+ : : "0" , "cc" , "memory" );
61
59
}
62
60
63
61
static void xor_xc_4 (unsigned long bytes , unsigned long * __restrict p1 ,
@@ -66,9 +64,8 @@ static void xor_xc_4(unsigned long bytes, unsigned long * __restrict p1,
66
64
const unsigned long * __restrict p4 )
67
65
{
68
66
asm volatile (
69
- " larl 1,2f\n"
70
67
" aghi %0,-1\n"
71
- " jm 3f \n"
68
+ " jm 5f \n"
72
69
" srlg 0,%0,8\n"
73
70
" ltgr 0,0\n"
74
71
" jz 1f\n"
@@ -80,16 +77,16 @@ static void xor_xc_4(unsigned long bytes, unsigned long * __restrict p1,
80
77
" la %3,256(%3)\n"
81
78
" la %4,256(%4)\n"
82
79
" brctg 0,0b\n"
83
- "1: ex %0,0(1) \n"
84
- " ex %0,6(1) \n"
85
- " ex %0,12(1) \n"
86
- " j 3f \n"
80
+ "1: exrl %0,2f \n"
81
+ " exrl %0,3f \n"
82
+ " exrl %0,4f \n"
83
+ " j 5f \n"
87
84
"2: xc 0(1,%1),0(%2)\n"
88
- " xc 0(1,%1),0(%3)\n"
89
- " xc 0(1,%1),0(%4)\n"
90
- "3 :\n"
85
+ "3: xc 0(1,%1),0(%3)\n"
86
+ "4: xc 0(1,%1),0(%4)\n"
87
+ "5 :\n"
91
88
: "+d" (bytes ), "+a" (p1 ), "+a" (p2 ), "+a" (p3 ), "+a" (p4 )
92
- : : "0" , "1" , " cc" , "memory" );
89
+ : : "0" , "cc" , "memory" );
93
90
}
94
91
95
92
static void xor_xc_5 (unsigned long bytes , unsigned long * __restrict p1 ,
@@ -101,7 +98,7 @@ static void xor_xc_5(unsigned long bytes, unsigned long * __restrict p1,
101
98
asm volatile (
102
99
" larl 1,2f\n"
103
100
" aghi %0,-1\n"
104
- " jm 3f \n"
101
+ " jm 6f \n"
105
102
" srlg 0,%0,8\n"
106
103
" ltgr 0,0\n"
107
104
" jz 1f\n"
@@ -115,19 +112,19 @@ static void xor_xc_5(unsigned long bytes, unsigned long * __restrict p1,
115
112
" la %4,256(%4)\n"
116
113
" la %5,256(%5)\n"
117
114
" brctg 0,0b\n"
118
- "1: ex %0,0(1) \n"
119
- " ex %0,6(1) \n"
120
- " ex %0,12(1) \n"
121
- " ex %0,18(1) \n"
122
- " j 3f \n"
115
+ "1: exrl %0,2f \n"
116
+ " exrl %0,3f \n"
117
+ " exrl %0,4f \n"
118
+ " exrl %0,5f \n"
119
+ " j 6f \n"
123
120
"2: xc 0(1,%1),0(%2)\n"
124
- " xc 0(1,%1),0(%3)\n"
125
- " xc 0(1,%1),0(%4)\n"
126
- " xc 0(1,%1),0(%5)\n"
127
- "3 :\n"
121
+ "3: xc 0(1,%1),0(%3)\n"
122
+ "4: xc 0(1,%1),0(%4)\n"
123
+ "5: xc 0(1,%1),0(%5)\n"
124
+ "6 :\n"
128
125
: "+d" (bytes ), "+a" (p1 ), "+a" (p2 ), "+a" (p3 ), "+a" (p4 ),
129
126
"+a" (p5 )
130
- : : "0" , "1" , " cc" , "memory" );
127
+ : : "0" , "cc" , "memory" );
131
128
}
132
129
133
130
struct xor_block_template xor_block_xc = {
0 commit comments