Debian Codegraph @

tests/aslts/src/runtime/collections/bdemo/ACPICA/0054/DECL.asl

raw
1 /*
2 * Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
7 *
8 * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 * Neither the name of Intel Corporation nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 /*
29 * Bug 0054:
30 *
31 * SUMMARY: All ASL Operators causes exceptions on two immediately passed Buffers
32 *
33 * All the ASL Operators which deal with
34 * at least two Buffer type objects cause
35 * unexpected exceptions in cases when both
36 * Buffer type objects are passed immediately.
37 */
38 Method (MDDF, 0, Serialized)
39 {
40 Name (B000, Buffer (0x02)
41 {
42 0x79, 0x00 // y.
43 })
44 Name (B001, Buffer (0x02)
45 {
46 0x79, 0x00 // y.
47 })
48 Local0 = ConcatenateResTemplate (B000, B001)
49 If ((Local0 != Buffer (0x02)
50 {
51 0x79, 0x00 // y.
52 }))
53 {
54 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Buffer (0x02)
55 {
56 0x79, 0x00 // y.
57 })
58 }
59 }
60
61 /* ConcatenateResTemplate */
62
63 Method (MDE0, 0, Serialized)
64 {
65 Name (B000, Buffer (0x02)
66 {
67 0x79, 0x00 // y.
68 })
69 Local0 = ConcatenateResTemplate (B000, Buffer (0x02)
70 {
71 0x79, 0x00 // y.
72 })
73 If ((Local0 != Buffer (0x02)
74 {
75 0x79, 0x00 // y.
76 }))
77 {
78 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Buffer (0x02)
79 {
80 0x79, 0x00 // y.
81 })
82 }
83
84 Local0 = ConcatenateResTemplate (Buffer (0x02)
85 {
86 0x79, 0x00 // y.
87 }, B000)
88 If ((Local0 != Buffer (0x02)
89 {
90 0x79, 0x00 // y.
91 }))
92 {
93 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Buffer (0x02)
94 {
95 0x79, 0x00 // y.
96 })
97 }
98 }
99
100 Method (MDE1, 0, NotSerialized)
101 {
102 Local0 = ConcatenateResTemplate (Buffer (0x02)
103 {
104 0x79, 0x00 // y.
105 }, Buffer (0x02)
106 {
107 0x79, 0x00 // y.
108 })
109 If ((Local0 != Buffer (0x02)
110 {
111 0x79, 0x00 // y.
112 }))
113 {
114 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Buffer (0x02)
115 {
116 0x79, 0x00 // y.
117 })
118 }
119 }
120
121 /* LEqual */
122
123 Method (MDE2, 0, Serialized)
124 {
125 Name (B000, Buffer (0x01)
126 {
127 0x79 // y
128 })
129 Local0 = (B000 == Buffer (0x01)
130 {
131 0x79 // y
132 })
133 If ((Local0 != Ones))
134 {
135 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Ones)
136 }
137
138 Local0 = (Buffer (0x01)
139 {
140 0x79 // y
141 } == B000)
142 If ((Local0 != Ones))
143 {
144 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Ones)
145 }
146 }
147
148 Method (MDE3, 0, NotSerialized)
149 {
150 Local0 = (Buffer (0x01)
151 {
152 0x79 // y
153 } == Buffer (0x01)
154 {
155 0x79 // y
156 })
157 If ((Local0 != Ones))
158 {
159 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Ones)
160 }
161 }
162
163 /* LGreater */
164
165 Method (MDE4, 0, Serialized)
166 {
167 Name (B000, Buffer (0x01)
168 {
169 0x79 // y
170 })
171 Local0 = (B000 > Buffer (0x01)
172 {
173 0x79 // y
174 })
175 If ((Local0 != Zero))
176 {
177 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Zero)
178 }
179
180 Local0 = (Buffer (0x01)
181 {
182 0x79 // y
183 } > B000)
184 If ((Local0 != Zero))
185 {
186 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Zero)
187 }
188 }
189
190 Method (MDE5, 0, NotSerialized)
191 {
192 Local0 = (Buffer (0x01)
193 {
194 0x79 // y
195 } > Buffer (0x01)
196 {
197 0x79 // y
198 })
199 If ((Local0 != Zero))
200 {
201 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Zero)
202 }
203 }
204
205 /* .......... */
206 /* Concatenate */
207 Method (MDE6, 0, Serialized)
208 {
209 Name (B000, Buffer (0x01)
210 {
211 0x79 // y
212 })
213 Local0 = Concatenate (B000, Buffer (0x01)
214 {
215 0x79 // y
216 })
217 If ((Local0 != Buffer (0x02)
218 {
219 0x79, 0x79 // yy
220 }))
221 {
222 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Buffer (0x02)
223 {
224 0x79, 0x79 // yy
225 })
226 }
227
228 Local0 = Concatenate (Buffer (0x01)
229 {
230 0x79 // y
231 }, B000)
232 If ((Local0 != Buffer (0x02)
233 {
234 0x79, 0x79 // yy
235 }))
236 {
237 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Buffer (0x02)
238 {
239 0x79, 0x79 // yy
240 })
241 }
242 }
243
244 Method (MDE7, 0, NotSerialized)
245 {
246 Local0 = Concatenate (Buffer (0x01)
247 {
248 0x79 // y
249 }, Buffer (0x01)
250 {
251 0x79 // y
252 })
253 If ((Local0 != Buffer (0x02)
254 {
255 0x79, 0x79 // yy
256 }))
257 {
258 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, Buffer (0x02)
259 {
260 0x79, 0x79 // yy
261 })
262 }
263 }
264
265 /* Add */
266
267 Method (MDE8, 0, Serialized)
268 {
269 Name (B000, Buffer (0x01)
270 {
271 0x79 // y
272 })
273 Local0 = (B000 + Buffer (0x01)
274 {
275 0x79 // y
276 })
277 If ((Local0 != 0xF2))
278 {
279 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, 0xF2)
280 }
281
282 Local0 = (Buffer (0x01)
283 {
284 0x79 // y
285 } + B000) /* \MDE8.B000 */
286 If ((Local0 != 0xF2))
287 {
288 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, 0xF2)
289 }
290 }
291
292 Method (MDE9, 0, NotSerialized)
293 {
294 Local0 = (Buffer (0x01)
295 {
296 0x79 // y
297 } + Buffer (0x01)
298 {
299 0x79 // y
300 })
301 If ((Local0 != 0xF2))
302 {
303 ERR (__METHOD__, ZFFF, __LINE__, 0x00, 0x00, Local0, 0xF2)
304 }
305 }
306
307 /* .......... */
308
309 Method (MDEA, 0, NotSerialized)
310 {
311 MDDF ()
312 /* ConcatenateResTemplate */
313
314 MDE0 ()
315 MDE1 ()
316 /* LEqual */
317
318 MDE2 ()
319 MDE3 ()
320 /* LGreater */
321
322 MDE4 ()
323 MDE5 ()
324 /* Concatenate */
325
326 MDE6 ()
327 MDE7 ()
328 /* Add */
329
330 MDE8 ()
331 MDE9 ()
332 }