annotate test/asm-powerpc.c @ 928:96c53f76b360

fix
author kono
date Sun, 13 Apr 2014 10:21:40 +0900
parents 5313ed059cee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
1 #define const
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
2
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
3 typedef unsigned short __u16;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
4 typedef unsigned int __u32;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
5
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
6 struct task_struct {
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
7 volatile long state;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
8 int usage;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
9 unsigned long flags;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
10 unsigned long ptrace;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
11 } c0;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
12
649
f1d71563a46a array size fix
kono
parents: 320
diff changeset
13 register struct task_struct *current asm ("r2");
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
14 typedef struct { volatile int counter; } atomic_t;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
15
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
16 struct thread_info {
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
17 struct task_struct *task;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
18 /*
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
19 struct exec_domain *exec_domain;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
20 unsigned long flags;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
21 unsigned long local_flags;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
22 int cpu;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
23 int preempt_count;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
24 struct restart_block restart_block;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
25 */
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
26 };
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
27
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
28 struct page {
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
29 int flags;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
30 atomic_t count;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
31 };
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
32
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
33 struct dentry {
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
34 atomic_t *d_count;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
35 unsigned long d_vfs_flags;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
36 int d_lock;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
37 };
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
38
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
39 int t;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
40 __u16 result;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
41 __u32 result32;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
42 unsigned long old;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
43 unsigned long mask;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
44 unsigned long *p ;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
45 const unsigned long *b;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
46 unsigned long msr;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
47 unsigned val;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
48 unsigned short *addr;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
49 __u16 value;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
50 atomic_t *v;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
51 int a;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
52 int lz;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
53 int owner;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
54 unsigned long x;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
55 struct thread_info *ti;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
56 unsigned long prev;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
57 int old1; int new;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
58 unsigned long ret;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
59 unsigned long size;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
60 struct dentry *dentry;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
61 unsigned long flags;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
62 unsigned long tmp;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
63 unsigned long clr;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
64 unsigned long set;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
65 unsigned int sum;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
66 struct page *page;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
67 unsigned int offset;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
68 int *sk_owner ;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
69 unsigned long saddr;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
70 unsigned long daddr;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
71 unsigned short len;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
72 unsigned short proto;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
73 unsigned int rval;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
74
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
75
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
76
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
77
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
78
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
79
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
80 main()
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
81 {
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
82
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
83
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
84
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
85 __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
86
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
87 __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
88
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
89
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
90 __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
91
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
92 __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
93
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
94
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
95 __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (value >> 8), "r" (value));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
96
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
97
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
98 __asm__("rlwimi %0,%2,24,16,23" : "=&r" (result) : "0" (value>>24), "r" (value));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
99 __asm__("rlwimi %0,%2,8,8,15" : "=&r" (result) : "0" (result), "r" (value));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
100 __asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (value));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
101
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
102
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
103 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
104 "1: lwarx %0,0,%3 \n add %0,%2,%0\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
105
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
106
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
107 " stwcx. %0,0,%3 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
108
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
109 : "=&r" (t), "=m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
110 : "r" (a), "r" (&v->counter), "m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
111 : "cc");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
112
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
113
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
114 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
115 "1: lwarx %0,0,%2 \n add %0,%1,%0\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
116
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
117
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
118 " stwcx. %0,0,%2 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
119
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
120
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
121 : "=&r" (t)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
122 : "r" (a), "r" (&v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
123 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
124
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
125
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
126
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
127
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
128 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
129 "1: lwarx %0,0,%3 \n subf %0,%2,%0\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
130
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
131
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
132 " stwcx. %0,0,%3 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
133
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
134 : "=&r" (t), "=m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
135 : "r" (a), "r" (&v->counter), "m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
136 : "cc");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
137
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
138
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
139 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
140 "1: lwarx %0,0,%2 \n subf %0,%1,%0\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
141
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
142
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
143 " stwcx. %0,0,%2 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
144
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
145
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
146 : "=&r" (t)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
147 : "r" (a), "r" (&v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
148 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
149
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
150
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
151
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
152 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
153 "1: lwarx %0,0,%2 \n addic %0,%0,1\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
154
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
155
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
156 " stwcx. %0,0,%2 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
157
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
158 : "=&r" (t), "=m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
159 : "r" (&v->counter), "m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
160 : "cc");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
161
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
162
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
163 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
164 "1: lwarx %0,0,%1 \n addic %0,%0,1\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
165
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
166
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
167 " stwcx. %0,0,%1 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
168
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
169
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
170 : "=&r" (t)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
171 : "r" (&v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
172 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
173
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
174
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
175
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
176 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
177 "1: lwarx %0,0,%2 \n addic %0,%0,-1\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
178
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
179 " stwcx. %0,0,%2\n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
180
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
181
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
182 : "=&r" (t), "=m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
183 : "r" (&v->counter), "m" (v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
184 : "cc");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
185
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
186
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
187 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
188 "1: lwarx %0,0,%1 \n addic %0,%0,-1\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
189
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
190
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
191 " stwcx. %0,0,%1\n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
192
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
193
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
194 : "=&r" (t)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
195 : "r" (&v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
196 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
197
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
198
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
199 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
200 "1: lwarx %0,0,%1 \n addic. %0,%0,-1\n blt- 2f\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
201
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
202
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
203
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
204 " stwcx. %0,0,%1\n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
205
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
206
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
207 "\n2:" : "=&r" (t)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
208
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
209 : "r" (&v->counter)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
210 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
211
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
212
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
213 __asm__ __volatile__("\n1: lwarx %0,0,%3 \n or %0,%0,%2 \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
214
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
215
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
216
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
217 " stwcx. %0,0,%3 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
218
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
219 : "=&r" (old), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
220 : "r" (mask), "r" (p), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
221 : "cc" );
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
222
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
223
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
224 __asm__ __volatile__("\n1: lwarx %0,0,%3 \n andc %0,%0,%2 \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
225
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
226
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
227
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
228 " stwcx. %0,0,%3 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
229
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
230 : "=&r" (old), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
231 : "r" (mask), "r" (p), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
232 : "cc");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
233
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
234
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
235
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
236 __asm__ __volatile__("\n1: lwarx %0,0,%3 \n xor %0,%0,%2 \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
237
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
238
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
239
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
240 " stwcx. %0,0,%3 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
241
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
242 : "=&r" (old), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
243 : "r" (mask), "r" (p), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
244 : "cc");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
245
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
246
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
247
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
248
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
249 __asm__ __volatile__( "\n1: lwarx %0,0,%4 \n or %1,%0,%3 \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
250
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
251
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
252
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
253 " stwcx. %1,0,%4 \n bne 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
254
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
255
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
256 : "=&r" (old), "=&r" (t), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
257 : "r" (mask), "r" (p), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
258 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
259
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
260
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
261
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
262
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
263 __asm__ __volatile__( "\n1: lwarx %0,0,%4 \n andc %1,%0,%3 \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
264
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
265
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
266
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
267 " stwcx. %1,0,%4 \n bne 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
268
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
269
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
270 : "=&r" (old), "=&r" (t), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
271 : "r" (mask), "r" (p), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
272 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
273
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
274
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
275 __asm__ __volatile__( "\n1: lwarx %0,0,%4 \n xor %1,%0,%3 \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
276
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
277
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
278
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
279 " stwcx. %1,0,%4 \n bne 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
280
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
281
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
282 : "=&r" (old), "=&r" (t), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
283 : "r" (mask), "r" (p), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
284 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
285
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
286 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
287 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
288 #if 0
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
289 if (__builtin_expect(!!(b[0]), 0))
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
290 return 0;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
291 #endif
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
292
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
293 // __asm__("rlwinm %0,1,0,0,18" : "=r"(ti));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
294
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
295
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
296
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
297
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
298 __asm__ __volatile__ ("dcbt 0,%0" : : "r" (x));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
299 __asm__ __volatile__ ("dcbtst 0,%0" : : "r" (x));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
300 msr = ({ asm volatile("mfmsr %0" : "=r" (rval)); rval;});
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
301 asm volatile("mtmsr %0" : : "r" (msr & ~(1<<15)));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
302 __asm__ __volatile__("": : :"memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
303
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
304 __asm__ __volatile__("": : :"memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
305 msr = ({ asm volatile("mfmsr %0" : "=r" (rval)); rval;});
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
306 asm volatile("mtmsr %0" : : "r" (msr | (1<<15)));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
307
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
308 msr = ({ asm volatile("mfmsr %0" : "=r" (rval)); rval;});
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
309 asm volatile("mtmsr %0" : : "r" (msr & ~(1<<15)));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
310 __asm__ __volatile__("": : :"memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
311
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
312 __asm__ __volatile__ ("\n1: lwarx %0,0,%2 \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
313
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
314
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
315 " stwcx. %3,0,%2 \n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
316
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
317 : "=&r" (prev), "=m" (*(volatile unsigned long *)p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
318 : "r" (p), "r" (val), "m" (*(volatile unsigned long *)p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
319 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
320
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
321 __asm__ __volatile__ ("\n1: lwarx %0,0,%2 \n cmpw 0,%0,%3 \n bne 2f \n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
322
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
323
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
324
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
325
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
326 " stwcx. %4,0,%2 \n bne- 1b\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
327
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
328
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
329
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
330
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
331 "2:"
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
332 : "=&r" (prev), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
333 : "r" (p), "r" (old1), "r" (new), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
334 : "cc", "memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
335
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
336
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
337 __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
338 "2: mftb %0\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
339 "3:\n"
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
340 ".section __ftr_fixup,\"a\"\n"
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
341 " .long %1\n"
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
342 " .long 0\n"
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
343 " .long 2b\n"
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
344 " .long 3b\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
345 ".text"
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
346 : "=r" (ret) : "i" (0x00000100));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
347 __asm__ __volatile__("": : :"memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
348 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (size));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
349
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
350
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
351
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
352 do { asm volatile("mtmsr %0" : : "r" (flags)); do { } while (0); } while (0);
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
353
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
354 do { __asm__ __volatile__(
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
355 "1: twnei %0,0\n"
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
356 ".section __bug_table,\"a\"\n\t"
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
357 " .long 1b,%1,%2,%3\n" ".text" : :
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
358 "r" (!((dentry->d_count)
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
359 ->counter)),
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
360 "i" (273),
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
361 "i" ("../../include/linux/dcache.h"),
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
362 "i" ((__func__))); } while (0);
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
363 __asm__ __volatile__("1: lwarx %0,0,%3\n andc %1,%0,%4\n or %1,%1,%5\n"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
364
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
365
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
366
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
367
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
368 " stwcx. %1,0,%3\n bne- 1b"
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
369
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
370 : "=&r" (old1), "=&r" (tmp), "=m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
371 : "r" ((unsigned long)(p+1) - 4), "r" (clr), "r" (set), "m" (*p)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
372 : "cc" );
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
373
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
374 if (({ do { __asm__ __volatile__( "1: twnei %0,0\n" ".section __bug_table,\"a\"\n\t" " .long 1b,%1,%2,%3\n" ".text" : : "r" (((&(page)->count)->counter) == 0), "i" (284), "i" ("../../include/linux/mm.h"), "i" ((__func__))); } while (0); (atomic_dec_return((&(page)->count)) == 0); }))
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
375 return 0;
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
376
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
377 do { __asm__ __volatile__( "1: twnei %0,0\n" ".section __bug_table,\"a\"\n\t" " .long 1b,%1,%2,%3\n" ".text" : : "r" (offset + size > (1UL << 12)), "i" (59), "i" ("../../include/linux/highmem.h"), "i" ((__func__))); } while (0);
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
378
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
379 asm volatile("mtmsr %0" : : "r" (flags));
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
380
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
381 asm volatile("mtmsr %0" : : "r" (flags));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
382
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
383 if (((({ asm volatile("mfmsr %0" : "=r" (rval)); rval;}) & (1<<15)) == 0))
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
384 return 0;
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
385
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
386 __asm__ __volatile__("": : :"memory");
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
387
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
388
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
389 do { __asm__ __volatile__( "1: twnei %0,0\n" ".section __bug_table,\"a\"\n\t" " .long 1b,%1,%2,%3\n" ".text" : : "r" ((v->counter) == 1), "i" (333 + 0x1000000), "i" ("../../include/net/sock.h"), "i" ((__func__))); } while (0);
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
390
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
391 do { __asm__ __volatile__( "1: twnei %0,0\n" ".section __bug_table,\"a\"\n\t" " .long 1b,%1,%2,%3\n" ".text" : : "r" (sk_owner != ((void *)0)), "i" (476), "i" ("../../include/net/sock.h"), "i" ((__func__))); } while (0);
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
392
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
393 do { __asm__ __volatile__( "1: twnei %0,0\n" ".section __bug_table,\"a\"\n\t" " .long 1b,%1,%2,%3\n" ".text" : : "r" (sizeof(struct page) > (24 * sizeof(long))), "i" (523), "i" ("../../include/net/sock.h"), "i" ((__func__))); } while (0);
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
394
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
395
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
396
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
397 __asm__("rlwinm %0,%1,16,0,31" : "=r" (tmp) : "r" (sum));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
398
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
399 __asm__("\n addc %0,%0,%1 \n adde %0,%0,%2 \n adde %0,%0,%3 \n addze %0,%0 \n "
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
400
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
401
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
402
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
403
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
404
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
405 : "=r" (sum)
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
406 : "r" (daddr), "r"(saddr), "r"((proto<<16)+len), "0"(sum));
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
407
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
408
880
5313ed059cee no tabs in source
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 649
diff changeset
409 do { __asm__ __volatile__( "1: twnei %0,0\n" ".section __bug_table,\"a\"\n\t" " .long 1b,%1,%2,%3\n" ".text" : : "r" ((tmp) != 0x00000001), "i" (231), "i" ("../../include/linux/crypto.h"), "i" ((__func__))); } while (0);
320
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
410
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
411
183726ccd83d asm minor fix. ia32 table jmp fix.
kono
parents:
diff changeset
412 }