1#![allow(unused)]
2#![cfg_attr(rustfmt, rustfmt_skip)]
3use crate::types::*;
5pub type Arguments = [Argument; 5];
6fn gen_add(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7 check_arg_count(args, 3)?;
8 let mut code = 0x7c000214 | modifiers;
9 {
11 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12 code |= (arg & 0x1f) << 21;
13 }
14 {
16 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
17 code |= (arg & 0x1f) << 16;
18 }
19 {
21 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
22 code |= (arg & 0x1f) << 11;
23 }
24 Ok(code)
25}
26fn gen_addc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
27 check_arg_count(args, 3)?;
28 let mut code = 0x7c000014 | modifiers;
29 {
31 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
32 code |= (arg & 0x1f) << 21;
33 }
34 {
36 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
37 code |= (arg & 0x1f) << 16;
38 }
39 {
41 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
42 code |= (arg & 0x1f) << 11;
43 }
44 Ok(code)
45}
46fn gen_adde(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
47 check_arg_count(args, 3)?;
48 let mut code = 0x7c000114 | modifiers;
49 {
51 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
52 code |= (arg & 0x1f) << 21;
53 }
54 {
56 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
57 code |= (arg & 0x1f) << 16;
58 }
59 {
61 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
62 code |= (arg & 0x1f) << 11;
63 }
64 Ok(code)
65}
66fn gen_addi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
67 check_arg_count(args, 3)?;
68 let mut code = 0x38000000 | modifiers;
69 {
71 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
72 code |= (arg & 0x1f) << 21;
73 }
74 {
76 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
77 code |= (arg & 0x1f) << 16;
78 }
79 {
81 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
82 code |= arg & 0xffff;
83 }
84 Ok(code)
85}
86fn gen_addic(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
87 check_arg_count(args, 3)?;
88 let mut code = 0x30000000 | modifiers;
89 {
91 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
92 code |= (arg & 0x1f) << 21;
93 }
94 {
96 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
97 code |= (arg & 0x1f) << 16;
98 }
99 {
101 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
102 code |= arg & 0xffff;
103 }
104 Ok(code)
105}
106fn gen_addic_(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
107 check_arg_count(args, 3)?;
108 let mut code = 0x34000000 | modifiers;
109 {
111 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
112 code |= (arg & 0x1f) << 21;
113 }
114 {
116 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
117 code |= (arg & 0x1f) << 16;
118 }
119 {
121 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
122 code |= arg & 0xffff;
123 }
124 Ok(code)
125}
126fn gen_addis(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
127 check_arg_count(args, 3)?;
128 let mut code = 0x3c000000 | modifiers;
129 {
131 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
132 code |= (arg & 0x1f) << 21;
133 }
134 {
136 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
137 code |= (arg & 0x1f) << 16;
138 }
139 {
141 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
142 code |= arg & 0xffff;
143 }
144 Ok(code)
145}
146fn gen_addme(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
147 check_arg_count(args, 2)?;
148 let mut code = 0x7c0001d4 | modifiers;
149 {
151 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
152 code |= (arg & 0x1f) << 21;
153 }
154 {
156 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
157 code |= (arg & 0x1f) << 16;
158 }
159 Ok(code)
160}
161fn gen_addze(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
162 check_arg_count(args, 2)?;
163 let mut code = 0x7c000194 | modifiers;
164 {
166 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
167 code |= (arg & 0x1f) << 21;
168 }
169 {
171 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
172 code |= (arg & 0x1f) << 16;
173 }
174 Ok(code)
175}
176fn gen_and(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
177 check_arg_count(args, 3)?;
178 let mut code = 0x7c000038 | modifiers;
179 {
181 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
182 code |= (arg & 0x1f) << 16;
183 }
184 {
186 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
187 code |= (arg & 0x1f) << 21;
188 }
189 {
191 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
192 code |= (arg & 0x1f) << 11;
193 }
194 Ok(code)
195}
196fn gen_andc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
197 check_arg_count(args, 3)?;
198 let mut code = 0x7c000078 | modifiers;
199 {
201 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
202 code |= (arg & 0x1f) << 16;
203 }
204 {
206 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
207 code |= (arg & 0x1f) << 21;
208 }
209 {
211 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
212 code |= (arg & 0x1f) << 11;
213 }
214 Ok(code)
215}
216fn gen_andi_(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
217 check_arg_count(args, 3)?;
218 let mut code = 0x70000000 | modifiers;
219 {
221 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
222 code |= (arg & 0x1f) << 16;
223 }
224 {
226 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
227 code |= (arg & 0x1f) << 21;
228 }
229 {
231 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
232 code |= arg & 0xffff;
233 }
234 Ok(code)
235}
236fn gen_andis_(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
237 check_arg_count(args, 3)?;
238 let mut code = 0x74000000 | modifiers;
239 {
241 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
242 code |= (arg & 0x1f) << 16;
243 }
244 {
246 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
247 code |= (arg & 0x1f) << 21;
248 }
249 {
251 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
252 code |= arg & 0xffff;
253 }
254 Ok(code)
255}
256fn gen_b(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
257 check_arg_count(args, 1)?;
258 let mut code = 0x48000000 | modifiers;
259 {
261 let arg = parse_signed(args, 0, -0x2000000, 0x2000000)? as u32;
262 code |= arg & 0x3fffffc;
263 }
264 Ok(code)
265}
266fn gen_bc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
267 check_arg_count(args, 3)?;
268 let mut code = 0x40000000 | modifiers;
269 {
271 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
272 code |= (arg & 0x1f) << 21;
273 }
274 {
276 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
277 code |= (arg & 0x1f) << 16;
278 }
279 {
281 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
282 code |= arg & 0xfffc;
283 }
284 Ok(code)
285}
286fn gen_bcctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
287 check_arg_count(args, 2)?;
288 let mut code = 0x4c000420 | modifiers;
289 {
291 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
292 code |= (arg & 0x1f) << 21;
293 }
294 {
296 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
297 code |= (arg & 0x1f) << 16;
298 }
299 Ok(code)
300}
301fn gen_bclr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
302 check_arg_count(args, 2)?;
303 let mut code = 0x4c000020 | modifiers;
304 {
306 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
307 code |= (arg & 0x1f) << 21;
308 }
309 {
311 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
312 code |= (arg & 0x1f) << 16;
313 }
314 Ok(code)
315}
316fn gen_bctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
317 check_arg_count(args, 0)?;
318 let mut code = 0x4e800420 | modifiers;
319 Ok(code)
320}
321fn gen_bdnz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
322 check_arg_count(args, 1)?;
323 let mut code = 0x42000000 | modifiers;
324 {
326 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
327 code |= arg & 0xfffc;
328 }
329 Ok(code)
330}
331fn gen_bdnzf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
332 check_arg_count(args, 2)?;
333 let mut code = 0x40000000 | modifiers;
334 {
336 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
337 code |= (arg & 0x1f) << 16;
338 }
339 {
341 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
342 code |= arg & 0xfffc;
343 }
344 Ok(code)
345}
346fn gen_bdnzflr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
347 check_arg_count(args, 1)?;
348 let mut code = 0x4c000020 | modifiers;
349 {
351 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
352 code |= (arg & 0x1f) << 16;
353 }
354 Ok(code)
355}
356fn gen_bdnzlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
357 check_arg_count(args, 0)?;
358 let mut code = 0x4e000020 | modifiers;
359 Ok(code)
360}
361fn gen_bdnzt(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
362 check_arg_count(args, 2)?;
363 let mut code = 0x41000000 | modifiers;
364 {
366 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
367 code |= (arg & 0x1f) << 16;
368 }
369 {
371 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
372 code |= arg & 0xfffc;
373 }
374 Ok(code)
375}
376fn gen_bdnztlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
377 check_arg_count(args, 1)?;
378 let mut code = 0x4d000020 | modifiers;
379 {
381 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
382 code |= (arg & 0x1f) << 16;
383 }
384 Ok(code)
385}
386fn gen_bdz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
387 check_arg_count(args, 1)?;
388 let mut code = 0x42400000 | modifiers;
389 {
391 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
392 code |= arg & 0xfffc;
393 }
394 Ok(code)
395}
396fn gen_bdzf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
397 check_arg_count(args, 2)?;
398 let mut code = 0x40400000 | modifiers;
399 {
401 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
402 code |= (arg & 0x1f) << 16;
403 }
404 {
406 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
407 code |= arg & 0xfffc;
408 }
409 Ok(code)
410}
411fn gen_bdzflr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
412 check_arg_count(args, 1)?;
413 let mut code = 0x4c000020 | modifiers;
414 {
416 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
417 code |= (arg & 0x1f) << 16;
418 }
419 Ok(code)
420}
421fn gen_bdzlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
422 check_arg_count(args, 0)?;
423 let mut code = 0x4e400020 | modifiers;
424 Ok(code)
425}
426fn gen_bdzt(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
427 check_arg_count(args, 2)?;
428 let mut code = 0x41400000 | modifiers;
429 {
431 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
432 code |= (arg & 0x1f) << 16;
433 }
434 {
436 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
437 code |= arg & 0xfffc;
438 }
439 Ok(code)
440}
441fn gen_bdztlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
442 check_arg_count(args, 1)?;
443 let mut code = 0x4d400020 | modifiers;
444 {
446 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
447 code |= (arg & 0x1f) << 16;
448 }
449 Ok(code)
450}
451fn gen_beq(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
452 match arg_count(args) {
453 1 => {
454 let mut code = 0x41820000 | modifiers;
455 {
457 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
458 code |= arg & 0xfffc;
459 }
460 Ok(code)
461 }
462 2 => {
463 let mut code = 0x41820000 | modifiers;
464 {
466 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
467 code |= (arg & 0x7) << 18;
468 }
469 {
471 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
472 code |= arg & 0xfffc;
473 }
474 Ok(code)
475 }
476 value => {
477 Err(ArgumentError::ArgCount {
478 value,
479 expected: 2,
480 })
481 }
482 }
483}
484fn gen_beqctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
485 match arg_count(args) {
486 0 => {
487 let mut code = 0x4d820420 | modifiers;
488 Ok(code)
489 }
490 1 => {
491 let mut code = 0x4d820420 | modifiers;
492 {
494 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
495 code |= (arg & 0x7) << 18;
496 }
497 Ok(code)
498 }
499 value => {
500 Err(ArgumentError::ArgCount {
501 value,
502 expected: 1,
503 })
504 }
505 }
506}
507fn gen_beqlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
508 match arg_count(args) {
509 0 => {
510 let mut code = 0x4d820020 | modifiers;
511 Ok(code)
512 }
513 1 => {
514 let mut code = 0x4d820020 | modifiers;
515 {
517 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
518 code |= (arg & 0x7) << 18;
519 }
520 Ok(code)
521 }
522 value => {
523 Err(ArgumentError::ArgCount {
524 value,
525 expected: 1,
526 })
527 }
528 }
529}
530fn gen_bge(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
531 match arg_count(args) {
532 1 => {
533 let mut code = 0x40800000 | modifiers;
534 {
536 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
537 code |= arg & 0xfffc;
538 }
539 Ok(code)
540 }
541 2 => {
542 let mut code = 0x40800000 | modifiers;
543 {
545 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
546 code |= (arg & 0x7) << 18;
547 }
548 {
550 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
551 code |= arg & 0xfffc;
552 }
553 Ok(code)
554 }
555 value => {
556 Err(ArgumentError::ArgCount {
557 value,
558 expected: 2,
559 })
560 }
561 }
562}
563fn gen_bgectr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
564 match arg_count(args) {
565 0 => {
566 let mut code = 0x4c800420 | modifiers;
567 Ok(code)
568 }
569 1 => {
570 let mut code = 0x4c800420 | modifiers;
571 {
573 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
574 code |= (arg & 0x7) << 18;
575 }
576 Ok(code)
577 }
578 value => {
579 Err(ArgumentError::ArgCount {
580 value,
581 expected: 1,
582 })
583 }
584 }
585}
586fn gen_bgelr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
587 match arg_count(args) {
588 0 => {
589 let mut code = 0x4c800020 | modifiers;
590 Ok(code)
591 }
592 1 => {
593 let mut code = 0x4c800020 | modifiers;
594 {
596 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
597 code |= (arg & 0x7) << 18;
598 }
599 Ok(code)
600 }
601 value => {
602 Err(ArgumentError::ArgCount {
603 value,
604 expected: 1,
605 })
606 }
607 }
608}
609fn gen_bgt(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
610 match arg_count(args) {
611 1 => {
612 let mut code = 0x41810000 | modifiers;
613 {
615 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
616 code |= arg & 0xfffc;
617 }
618 Ok(code)
619 }
620 2 => {
621 let mut code = 0x41810000 | modifiers;
622 {
624 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
625 code |= (arg & 0x7) << 18;
626 }
627 {
629 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
630 code |= arg & 0xfffc;
631 }
632 Ok(code)
633 }
634 value => {
635 Err(ArgumentError::ArgCount {
636 value,
637 expected: 2,
638 })
639 }
640 }
641}
642fn gen_bgtctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
643 match arg_count(args) {
644 0 => {
645 let mut code = 0x4d810420 | modifiers;
646 Ok(code)
647 }
648 1 => {
649 let mut code = 0x4d810420 | modifiers;
650 {
652 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
653 code |= (arg & 0x7) << 18;
654 }
655 Ok(code)
656 }
657 value => {
658 Err(ArgumentError::ArgCount {
659 value,
660 expected: 1,
661 })
662 }
663 }
664}
665fn gen_bgtlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
666 match arg_count(args) {
667 0 => {
668 let mut code = 0x4d810020 | modifiers;
669 Ok(code)
670 }
671 1 => {
672 let mut code = 0x4d810020 | modifiers;
673 {
675 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
676 code |= (arg & 0x7) << 18;
677 }
678 Ok(code)
679 }
680 value => {
681 Err(ArgumentError::ArgCount {
682 value,
683 expected: 1,
684 })
685 }
686 }
687}
688fn gen_ble(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
689 match arg_count(args) {
690 1 => {
691 let mut code = 0x40810000 | modifiers;
692 {
694 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
695 code |= arg & 0xfffc;
696 }
697 Ok(code)
698 }
699 2 => {
700 let mut code = 0x40810000 | modifiers;
701 {
703 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
704 code |= (arg & 0x7) << 18;
705 }
706 {
708 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
709 code |= arg & 0xfffc;
710 }
711 Ok(code)
712 }
713 value => {
714 Err(ArgumentError::ArgCount {
715 value,
716 expected: 2,
717 })
718 }
719 }
720}
721fn gen_blectr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
722 match arg_count(args) {
723 0 => {
724 let mut code = 0x4c810420 | modifiers;
725 Ok(code)
726 }
727 1 => {
728 let mut code = 0x4c810420 | modifiers;
729 {
731 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
732 code |= (arg & 0x7) << 18;
733 }
734 Ok(code)
735 }
736 value => {
737 Err(ArgumentError::ArgCount {
738 value,
739 expected: 1,
740 })
741 }
742 }
743}
744fn gen_blelr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
745 match arg_count(args) {
746 0 => {
747 let mut code = 0x4c810020 | modifiers;
748 Ok(code)
749 }
750 1 => {
751 let mut code = 0x4c810020 | modifiers;
752 {
754 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
755 code |= (arg & 0x7) << 18;
756 }
757 Ok(code)
758 }
759 value => {
760 Err(ArgumentError::ArgCount {
761 value,
762 expected: 1,
763 })
764 }
765 }
766}
767fn gen_blr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
768 check_arg_count(args, 0)?;
769 let mut code = 0x4e800020 | modifiers;
770 Ok(code)
771}
772fn gen_blt(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
773 match arg_count(args) {
774 1 => {
775 let mut code = 0x41800000 | modifiers;
776 {
778 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
779 code |= arg & 0xfffc;
780 }
781 Ok(code)
782 }
783 2 => {
784 let mut code = 0x41800000 | modifiers;
785 {
787 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
788 code |= (arg & 0x7) << 18;
789 }
790 {
792 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
793 code |= arg & 0xfffc;
794 }
795 Ok(code)
796 }
797 value => {
798 Err(ArgumentError::ArgCount {
799 value,
800 expected: 2,
801 })
802 }
803 }
804}
805fn gen_bltctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
806 match arg_count(args) {
807 0 => {
808 let mut code = 0x4d800420 | modifiers;
809 Ok(code)
810 }
811 1 => {
812 let mut code = 0x4d800420 | modifiers;
813 {
815 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
816 code |= (arg & 0x7) << 18;
817 }
818 Ok(code)
819 }
820 value => {
821 Err(ArgumentError::ArgCount {
822 value,
823 expected: 1,
824 })
825 }
826 }
827}
828fn gen_bltlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
829 match arg_count(args) {
830 0 => {
831 let mut code = 0x4d800020 | modifiers;
832 Ok(code)
833 }
834 1 => {
835 let mut code = 0x4d800020 | modifiers;
836 {
838 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
839 code |= (arg & 0x7) << 18;
840 }
841 Ok(code)
842 }
843 value => {
844 Err(ArgumentError::ArgCount {
845 value,
846 expected: 1,
847 })
848 }
849 }
850}
851fn gen_bne(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
852 match arg_count(args) {
853 1 => {
854 let mut code = 0x40820000 | modifiers;
855 {
857 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
858 code |= arg & 0xfffc;
859 }
860 Ok(code)
861 }
862 2 => {
863 let mut code = 0x40820000 | modifiers;
864 {
866 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
867 code |= (arg & 0x7) << 18;
868 }
869 {
871 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
872 code |= arg & 0xfffc;
873 }
874 Ok(code)
875 }
876 value => {
877 Err(ArgumentError::ArgCount {
878 value,
879 expected: 2,
880 })
881 }
882 }
883}
884fn gen_bnectr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
885 match arg_count(args) {
886 0 => {
887 let mut code = 0x4c820420 | modifiers;
888 Ok(code)
889 }
890 1 => {
891 let mut code = 0x4c820420 | modifiers;
892 {
894 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
895 code |= (arg & 0x7) << 18;
896 }
897 Ok(code)
898 }
899 value => {
900 Err(ArgumentError::ArgCount {
901 value,
902 expected: 1,
903 })
904 }
905 }
906}
907fn gen_bnelr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
908 match arg_count(args) {
909 0 => {
910 let mut code = 0x4c820020 | modifiers;
911 Ok(code)
912 }
913 1 => {
914 let mut code = 0x4c820020 | modifiers;
915 {
917 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
918 code |= (arg & 0x7) << 18;
919 }
920 Ok(code)
921 }
922 value => {
923 Err(ArgumentError::ArgCount {
924 value,
925 expected: 1,
926 })
927 }
928 }
929}
930fn gen_bns(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
931 match arg_count(args) {
932 1 => {
933 let mut code = 0x40830000 | modifiers;
934 {
936 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
937 code |= arg & 0xfffc;
938 }
939 Ok(code)
940 }
941 2 => {
942 let mut code = 0x40830000 | modifiers;
943 {
945 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
946 code |= (arg & 0x7) << 18;
947 }
948 {
950 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
951 code |= arg & 0xfffc;
952 }
953 Ok(code)
954 }
955 value => {
956 Err(ArgumentError::ArgCount {
957 value,
958 expected: 2,
959 })
960 }
961 }
962}
963fn gen_bnsctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
964 match arg_count(args) {
965 0 => {
966 let mut code = 0x4c830420 | modifiers;
967 Ok(code)
968 }
969 1 => {
970 let mut code = 0x4c830420 | modifiers;
971 {
973 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
974 code |= (arg & 0x7) << 18;
975 }
976 Ok(code)
977 }
978 value => {
979 Err(ArgumentError::ArgCount {
980 value,
981 expected: 1,
982 })
983 }
984 }
985}
986fn gen_bnslr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
987 match arg_count(args) {
988 0 => {
989 let mut code = 0x4c830020 | modifiers;
990 Ok(code)
991 }
992 1 => {
993 let mut code = 0x4c830020 | modifiers;
994 {
996 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
997 code |= (arg & 0x7) << 18;
998 }
999 Ok(code)
1000 }
1001 value => {
1002 Err(ArgumentError::ArgCount {
1003 value,
1004 expected: 1,
1005 })
1006 }
1007 }
1008}
1009fn gen_bso(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1010 match arg_count(args) {
1011 1 => {
1012 let mut code = 0x41830000 | modifiers;
1013 {
1015 let arg = parse_signed(args, 0, -0x8000, 0x8000)? as u32;
1016 code |= arg & 0xfffc;
1017 }
1018 Ok(code)
1019 }
1020 2 => {
1021 let mut code = 0x41830000 | modifiers;
1022 {
1024 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1025 code |= (arg & 0x7) << 18;
1026 }
1027 {
1029 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
1030 code |= arg & 0xfffc;
1031 }
1032 Ok(code)
1033 }
1034 value => {
1035 Err(ArgumentError::ArgCount {
1036 value,
1037 expected: 2,
1038 })
1039 }
1040 }
1041}
1042fn gen_bsoctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1043 match arg_count(args) {
1044 0 => {
1045 let mut code = 0x4d830420 | modifiers;
1046 Ok(code)
1047 }
1048 1 => {
1049 let mut code = 0x4d830420 | modifiers;
1050 {
1052 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1053 code |= (arg & 0x7) << 18;
1054 }
1055 Ok(code)
1056 }
1057 value => {
1058 Err(ArgumentError::ArgCount {
1059 value,
1060 expected: 1,
1061 })
1062 }
1063 }
1064}
1065fn gen_bsolr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1066 match arg_count(args) {
1067 0 => {
1068 let mut code = 0x4d830020 | modifiers;
1069 Ok(code)
1070 }
1071 1 => {
1072 let mut code = 0x4d830020 | modifiers;
1073 {
1075 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1076 code |= (arg & 0x7) << 18;
1077 }
1078 Ok(code)
1079 }
1080 value => {
1081 Err(ArgumentError::ArgCount {
1082 value,
1083 expected: 1,
1084 })
1085 }
1086 }
1087}
1088fn gen_clrlslwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1089 check_arg_count(args, 4)?;
1090 let mut code = 0x54000000 | modifiers;
1091 {
1093 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1094 code |= (arg & 0x1f) << 16;
1095 }
1096 {
1098 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1099 code |= (arg & 0x1f) << 21;
1100 }
1101 {
1103 let arg = (parse_unsigned(args, 2, 0x0, 0x1f)?
1104 - parse_unsigned(args, 3, 0x0, 0x1f)?);
1105 code |= (arg & 0x1f) << 6;
1106 }
1107 {
1109 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
1110 code |= (arg & 0x1f) << 11;
1111 }
1112 {
1114 let arg = (31 - parse_unsigned(args, 3, 0x0, 0x1f)?);
1115 code |= (arg & 0x1f) << 1;
1116 }
1117 Ok(code)
1118}
1119fn gen_clrlwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1120 check_arg_count(args, 3)?;
1121 let mut code = 0x5400003e | modifiers;
1122 {
1124 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1125 code |= (arg & 0x1f) << 16;
1126 }
1127 {
1129 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1130 code |= (arg & 0x1f) << 21;
1131 }
1132 {
1134 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1135 code |= (arg & 0x1f) << 6;
1136 }
1137 Ok(code)
1138}
1139fn gen_clrrwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1140 check_arg_count(args, 3)?;
1141 let mut code = 0x54000000 | modifiers;
1142 {
1144 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1145 code |= (arg & 0x1f) << 16;
1146 }
1147 {
1149 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1150 code |= (arg & 0x1f) << 21;
1151 }
1152 {
1154 let arg = (31 - parse_unsigned(args, 2, 0x0, 0x1f)?);
1155 code |= (arg & 0x1f) << 1;
1156 }
1157 Ok(code)
1158}
1159fn gen_cmp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1160 check_arg_count(args, 4)?;
1161 let mut code = 0x7c000000 | modifiers;
1162 {
1164 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1165 code |= (arg & 0x7) << 23;
1166 }
1167 {
1169 let arg = parse_unsigned(args, 1, 0x0, 0x1)?;
1170 code |= (arg & 0x1) << 21;
1171 }
1172 {
1174 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1175 code |= (arg & 0x1f) << 16;
1176 }
1177 {
1179 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
1180 code |= (arg & 0x1f) << 11;
1181 }
1182 Ok(code)
1183}
1184fn gen_cmpd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1185 match arg_count(args) {
1186 2 => {
1187 let mut code = 0x7c200000 | modifiers;
1188 {
1190 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1191 code |= (arg & 0x1f) << 16;
1192 }
1193 {
1195 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1196 code |= (arg & 0x1f) << 11;
1197 }
1198 Ok(code)
1199 }
1200 3 => {
1201 let mut code = 0x7c200000 | modifiers;
1202 {
1204 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1205 code |= (arg & 0x7) << 23;
1206 }
1207 {
1209 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1210 code |= (arg & 0x1f) << 16;
1211 }
1212 {
1214 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1215 code |= (arg & 0x1f) << 11;
1216 }
1217 Ok(code)
1218 }
1219 value => {
1220 Err(ArgumentError::ArgCount {
1221 value,
1222 expected: 3,
1223 })
1224 }
1225 }
1226}
1227fn gen_cmpdi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1228 match arg_count(args) {
1229 2 => {
1230 let mut code = 0x2c200000 | modifiers;
1231 {
1233 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1234 code |= (arg & 0x1f) << 16;
1235 }
1236 {
1238 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
1239 code |= arg & 0xffff;
1240 }
1241 Ok(code)
1242 }
1243 3 => {
1244 let mut code = 0x2c200000 | modifiers;
1245 {
1247 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1248 code |= (arg & 0x7) << 23;
1249 }
1250 {
1252 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1253 code |= (arg & 0x1f) << 16;
1254 }
1255 {
1257 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
1258 code |= arg & 0xffff;
1259 }
1260 Ok(code)
1261 }
1262 value => {
1263 Err(ArgumentError::ArgCount {
1264 value,
1265 expected: 3,
1266 })
1267 }
1268 }
1269}
1270fn gen_cmpi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1271 check_arg_count(args, 4)?;
1272 let mut code = 0x2c000000 | modifiers;
1273 {
1275 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1276 code |= (arg & 0x7) << 23;
1277 }
1278 {
1280 let arg = parse_unsigned(args, 1, 0x0, 0x1)?;
1281 code |= (arg & 0x1) << 21;
1282 }
1283 {
1285 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1286 code |= (arg & 0x1f) << 16;
1287 }
1288 {
1290 let arg = parse_signed(args, 3, -0x8000, 0x8000)? as u32;
1291 code |= arg & 0xffff;
1292 }
1293 Ok(code)
1294}
1295fn gen_cmpl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1296 check_arg_count(args, 4)?;
1297 let mut code = 0x7c000040 | modifiers;
1298 {
1300 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1301 code |= (arg & 0x7) << 23;
1302 }
1303 {
1305 let arg = parse_unsigned(args, 1, 0x0, 0x1)?;
1306 code |= (arg & 0x1) << 21;
1307 }
1308 {
1310 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1311 code |= (arg & 0x1f) << 16;
1312 }
1313 {
1315 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
1316 code |= (arg & 0x1f) << 11;
1317 }
1318 Ok(code)
1319}
1320fn gen_cmpld(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1321 match arg_count(args) {
1322 2 => {
1323 let mut code = 0x7c200040 | modifiers;
1324 {
1326 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1327 code |= (arg & 0x1f) << 16;
1328 }
1329 {
1331 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1332 code |= (arg & 0x1f) << 11;
1333 }
1334 Ok(code)
1335 }
1336 3 => {
1337 let mut code = 0x7c200040 | modifiers;
1338 {
1340 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1341 code |= (arg & 0x7) << 23;
1342 }
1343 {
1345 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1346 code |= (arg & 0x1f) << 16;
1347 }
1348 {
1350 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1351 code |= (arg & 0x1f) << 11;
1352 }
1353 Ok(code)
1354 }
1355 value => {
1356 Err(ArgumentError::ArgCount {
1357 value,
1358 expected: 3,
1359 })
1360 }
1361 }
1362}
1363fn gen_cmpldi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1364 match arg_count(args) {
1365 2 => {
1366 let mut code = 0x28200000 | modifiers;
1367 {
1369 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1370 code |= (arg & 0x1f) << 16;
1371 }
1372 {
1374 let arg = parse_unsigned(args, 1, 0x0, 0xffff)?;
1375 code |= arg & 0xffff;
1376 }
1377 Ok(code)
1378 }
1379 3 => {
1380 let mut code = 0x28200000 | modifiers;
1381 {
1383 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1384 code |= (arg & 0x7) << 23;
1385 }
1386 {
1388 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1389 code |= (arg & 0x1f) << 16;
1390 }
1391 {
1393 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
1394 code |= arg & 0xffff;
1395 }
1396 Ok(code)
1397 }
1398 value => {
1399 Err(ArgumentError::ArgCount {
1400 value,
1401 expected: 3,
1402 })
1403 }
1404 }
1405}
1406fn gen_cmpli(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1407 check_arg_count(args, 4)?;
1408 let mut code = 0x28000000 | modifiers;
1409 {
1411 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1412 code |= (arg & 0x7) << 23;
1413 }
1414 {
1416 let arg = parse_unsigned(args, 1, 0x0, 0x1)?;
1417 code |= (arg & 0x1) << 21;
1418 }
1419 {
1421 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1422 code |= (arg & 0x1f) << 16;
1423 }
1424 {
1426 let arg = parse_unsigned(args, 3, 0x0, 0xffff)?;
1427 code |= arg & 0xffff;
1428 }
1429 Ok(code)
1430}
1431fn gen_cmplw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1432 match arg_count(args) {
1433 2 => {
1434 let mut code = 0x7c000040 | modifiers;
1435 {
1437 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1438 code |= (arg & 0x1f) << 16;
1439 }
1440 {
1442 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1443 code |= (arg & 0x1f) << 11;
1444 }
1445 Ok(code)
1446 }
1447 3 => {
1448 let mut code = 0x7c000040 | modifiers;
1449 {
1451 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1452 code |= (arg & 0x7) << 23;
1453 }
1454 {
1456 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1457 code |= (arg & 0x1f) << 16;
1458 }
1459 {
1461 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1462 code |= (arg & 0x1f) << 11;
1463 }
1464 Ok(code)
1465 }
1466 value => {
1467 Err(ArgumentError::ArgCount {
1468 value,
1469 expected: 3,
1470 })
1471 }
1472 }
1473}
1474fn gen_cmplwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1475 match arg_count(args) {
1476 2 => {
1477 let mut code = 0x28000000 | modifiers;
1478 {
1480 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1481 code |= (arg & 0x1f) << 16;
1482 }
1483 {
1485 let arg = parse_unsigned(args, 1, 0x0, 0xffff)?;
1486 code |= arg & 0xffff;
1487 }
1488 Ok(code)
1489 }
1490 3 => {
1491 let mut code = 0x28000000 | modifiers;
1492 {
1494 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1495 code |= (arg & 0x7) << 23;
1496 }
1497 {
1499 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1500 code |= (arg & 0x1f) << 16;
1501 }
1502 {
1504 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
1505 code |= arg & 0xffff;
1506 }
1507 Ok(code)
1508 }
1509 value => {
1510 Err(ArgumentError::ArgCount {
1511 value,
1512 expected: 3,
1513 })
1514 }
1515 }
1516}
1517fn gen_cmpw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1518 match arg_count(args) {
1519 2 => {
1520 let mut code = 0x7c000000 | modifiers;
1521 {
1523 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1524 code |= (arg & 0x1f) << 16;
1525 }
1526 {
1528 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1529 code |= (arg & 0x1f) << 11;
1530 }
1531 Ok(code)
1532 }
1533 3 => {
1534 let mut code = 0x7c000000 | modifiers;
1535 {
1537 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1538 code |= (arg & 0x7) << 23;
1539 }
1540 {
1542 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1543 code |= (arg & 0x1f) << 16;
1544 }
1545 {
1547 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1548 code |= (arg & 0x1f) << 11;
1549 }
1550 Ok(code)
1551 }
1552 value => {
1553 Err(ArgumentError::ArgCount {
1554 value,
1555 expected: 3,
1556 })
1557 }
1558 }
1559}
1560fn gen_cmpwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1561 match arg_count(args) {
1562 2 => {
1563 let mut code = 0x2c000000 | modifiers;
1564 {
1566 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1567 code |= (arg & 0x1f) << 16;
1568 }
1569 {
1571 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
1572 code |= arg & 0xffff;
1573 }
1574 Ok(code)
1575 }
1576 3 => {
1577 let mut code = 0x2c000000 | modifiers;
1578 {
1580 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
1581 code |= (arg & 0x7) << 23;
1582 }
1583 {
1585 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1586 code |= (arg & 0x1f) << 16;
1587 }
1588 {
1590 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
1591 code |= arg & 0xffff;
1592 }
1593 Ok(code)
1594 }
1595 value => {
1596 Err(ArgumentError::ArgCount {
1597 value,
1598 expected: 3,
1599 })
1600 }
1601 }
1602}
1603fn gen_cntlzd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1604 check_arg_count(args, 2)?;
1605 let mut code = 0x7c000074 | modifiers;
1606 {
1608 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1609 code |= (arg & 0x1f) << 16;
1610 }
1611 {
1613 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1614 code |= (arg & 0x1f) << 21;
1615 }
1616 Ok(code)
1617}
1618fn gen_cntlzw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1619 check_arg_count(args, 2)?;
1620 let mut code = 0x7c000034 | modifiers;
1621 {
1623 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1624 code |= (arg & 0x1f) << 16;
1625 }
1626 {
1628 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1629 code |= (arg & 0x1f) << 21;
1630 }
1631 Ok(code)
1632}
1633fn gen_crand(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1634 check_arg_count(args, 3)?;
1635 let mut code = 0x4c000202 | modifiers;
1636 {
1638 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1639 code |= (arg & 0x1f) << 21;
1640 }
1641 {
1643 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1644 code |= (arg & 0x1f) << 16;
1645 }
1646 {
1648 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1649 code |= (arg & 0x1f) << 11;
1650 }
1651 Ok(code)
1652}
1653fn gen_crandc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1654 check_arg_count(args, 3)?;
1655 let mut code = 0x4c000102 | modifiers;
1656 {
1658 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1659 code |= (arg & 0x1f) << 21;
1660 }
1661 {
1663 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1664 code |= (arg & 0x1f) << 16;
1665 }
1666 {
1668 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1669 code |= (arg & 0x1f) << 11;
1670 }
1671 Ok(code)
1672}
1673fn gen_crclr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1674 check_arg_count(args, 1)?;
1675 let mut code = 0x4c000182 | modifiers;
1676 {
1678 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1679 code |= (arg & 0x1f) << 21;
1680 }
1681 {
1683 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1684 code |= (arg & 0x1f) << 16;
1685 }
1686 {
1688 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1689 code |= (arg & 0x1f) << 11;
1690 }
1691 Ok(code)
1692}
1693fn gen_creqv(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1694 check_arg_count(args, 3)?;
1695 let mut code = 0x4c000242 | modifiers;
1696 {
1698 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1699 code |= (arg & 0x1f) << 21;
1700 }
1701 {
1703 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1704 code |= (arg & 0x1f) << 16;
1705 }
1706 {
1708 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1709 code |= (arg & 0x1f) << 11;
1710 }
1711 Ok(code)
1712}
1713fn gen_crmove(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1714 check_arg_count(args, 2)?;
1715 let mut code = 0x4c000382 | modifiers;
1716 {
1718 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1719 code |= (arg & 0x1f) << 21;
1720 }
1721 {
1723 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1724 code |= (arg & 0x1f) << 16;
1725 }
1726 {
1728 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1729 code |= (arg & 0x1f) << 11;
1730 }
1731 Ok(code)
1732}
1733fn gen_crnand(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1734 check_arg_count(args, 3)?;
1735 let mut code = 0x4c0001c2 | modifiers;
1736 {
1738 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1739 code |= (arg & 0x1f) << 21;
1740 }
1741 {
1743 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1744 code |= (arg & 0x1f) << 16;
1745 }
1746 {
1748 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1749 code |= (arg & 0x1f) << 11;
1750 }
1751 Ok(code)
1752}
1753fn gen_crnor(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1754 check_arg_count(args, 3)?;
1755 let mut code = 0x4c000042 | modifiers;
1756 {
1758 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1759 code |= (arg & 0x1f) << 21;
1760 }
1761 {
1763 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1764 code |= (arg & 0x1f) << 16;
1765 }
1766 {
1768 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1769 code |= (arg & 0x1f) << 11;
1770 }
1771 Ok(code)
1772}
1773fn gen_crnot(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1774 check_arg_count(args, 2)?;
1775 let mut code = 0x4c000042 | modifiers;
1776 {
1778 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1779 code |= (arg & 0x1f) << 21;
1780 }
1781 {
1783 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1784 code |= (arg & 0x1f) << 16;
1785 }
1786 {
1788 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1789 code |= (arg & 0x1f) << 11;
1790 }
1791 Ok(code)
1792}
1793fn gen_cror(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1794 check_arg_count(args, 3)?;
1795 let mut code = 0x4c000382 | modifiers;
1796 {
1798 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1799 code |= (arg & 0x1f) << 21;
1800 }
1801 {
1803 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1804 code |= (arg & 0x1f) << 16;
1805 }
1806 {
1808 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1809 code |= (arg & 0x1f) << 11;
1810 }
1811 Ok(code)
1812}
1813fn gen_crorc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1814 check_arg_count(args, 3)?;
1815 let mut code = 0x4c000342 | modifiers;
1816 {
1818 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1819 code |= (arg & 0x1f) << 21;
1820 }
1821 {
1823 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1824 code |= (arg & 0x1f) << 16;
1825 }
1826 {
1828 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1829 code |= (arg & 0x1f) << 11;
1830 }
1831 Ok(code)
1832}
1833fn gen_crset(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1834 check_arg_count(args, 1)?;
1835 let mut code = 0x4c000242 | modifiers;
1836 {
1838 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1839 code |= (arg & 0x1f) << 21;
1840 }
1841 {
1843 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1844 code |= (arg & 0x1f) << 16;
1845 }
1846 {
1848 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1849 code |= (arg & 0x1f) << 11;
1850 }
1851 Ok(code)
1852}
1853fn gen_crxor(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1854 check_arg_count(args, 3)?;
1855 let mut code = 0x4c000182 | modifiers;
1856 {
1858 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1859 code |= (arg & 0x1f) << 21;
1860 }
1861 {
1863 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1864 code |= (arg & 0x1f) << 16;
1865 }
1866 {
1868 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
1869 code |= (arg & 0x1f) << 11;
1870 }
1871 Ok(code)
1872}
1873fn gen_dcbf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1874 check_arg_count(args, 2)?;
1875 let mut code = 0x7c0000ac | modifiers;
1876 {
1878 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1879 code |= (arg & 0x1f) << 16;
1880 }
1881 {
1883 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1884 code |= (arg & 0x1f) << 11;
1885 }
1886 Ok(code)
1887}
1888fn gen_dcbi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1889 check_arg_count(args, 2)?;
1890 let mut code = 0x7c0003ac | modifiers;
1891 {
1893 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1894 code |= (arg & 0x1f) << 16;
1895 }
1896 {
1898 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1899 code |= (arg & 0x1f) << 11;
1900 }
1901 Ok(code)
1902}
1903fn gen_dcbst(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1904 check_arg_count(args, 2)?;
1905 let mut code = 0x7c00006c | modifiers;
1906 {
1908 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1909 code |= (arg & 0x1f) << 16;
1910 }
1911 {
1913 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1914 code |= (arg & 0x1f) << 11;
1915 }
1916 Ok(code)
1917}
1918fn gen_dcbt(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1919 check_arg_count(args, 2)?;
1920 let mut code = 0x7c00022c | modifiers;
1921 {
1923 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1924 code |= (arg & 0x1f) << 16;
1925 }
1926 {
1928 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1929 code |= (arg & 0x1f) << 11;
1930 }
1931 Ok(code)
1932}
1933fn gen_dcbtst(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1934 check_arg_count(args, 2)?;
1935 let mut code = 0x7c0001ec | modifiers;
1936 {
1938 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1939 code |= (arg & 0x1f) << 16;
1940 }
1941 {
1943 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1944 code |= (arg & 0x1f) << 11;
1945 }
1946 Ok(code)
1947}
1948fn gen_dcbz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1949 check_arg_count(args, 2)?;
1950 let mut code = 0x7c0007ec | modifiers;
1951 {
1953 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1954 code |= (arg & 0x1f) << 16;
1955 }
1956 {
1958 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1959 code |= (arg & 0x1f) << 11;
1960 }
1961 Ok(code)
1962}
1963fn gen_dcbz_l(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1964 check_arg_count(args, 2)?;
1965 let mut code = 0x100007ec | modifiers;
1966 {
1968 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1969 code |= (arg & 0x1f) << 16;
1970 }
1971 {
1973 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1974 code |= (arg & 0x1f) << 11;
1975 }
1976 Ok(code)
1977}
1978fn gen_dcbzl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1979 check_arg_count(args, 2)?;
1980 let mut code = 0x7c2007ec | modifiers;
1981 {
1983 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1984 code |= (arg & 0x1f) << 16;
1985 }
1986 {
1988 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
1989 code |= (arg & 0x1f) << 11;
1990 }
1991 Ok(code)
1992}
1993fn gen_divd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
1994 check_arg_count(args, 3)?;
1995 let mut code = 0x7c0003d2 | modifiers;
1996 {
1998 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
1999 code |= (arg & 0x1f) << 21;
2000 }
2001 {
2003 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2004 code |= (arg & 0x1f) << 16;
2005 }
2006 {
2008 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2009 code |= (arg & 0x1f) << 11;
2010 }
2011 Ok(code)
2012}
2013fn gen_divdu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2014 check_arg_count(args, 3)?;
2015 let mut code = 0x7c000392 | modifiers;
2016 {
2018 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2019 code |= (arg & 0x1f) << 21;
2020 }
2021 {
2023 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2024 code |= (arg & 0x1f) << 16;
2025 }
2026 {
2028 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2029 code |= (arg & 0x1f) << 11;
2030 }
2031 Ok(code)
2032}
2033fn gen_divw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2034 check_arg_count(args, 3)?;
2035 let mut code = 0x7c0003d6 | modifiers;
2036 {
2038 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2039 code |= (arg & 0x1f) << 21;
2040 }
2041 {
2043 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2044 code |= (arg & 0x1f) << 16;
2045 }
2046 {
2048 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2049 code |= (arg & 0x1f) << 11;
2050 }
2051 Ok(code)
2052}
2053fn gen_divwu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2054 check_arg_count(args, 3)?;
2055 let mut code = 0x7c000396 | modifiers;
2056 {
2058 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2059 code |= (arg & 0x1f) << 21;
2060 }
2061 {
2063 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2064 code |= (arg & 0x1f) << 16;
2065 }
2066 {
2068 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2069 code |= (arg & 0x1f) << 11;
2070 }
2071 Ok(code)
2072}
2073fn gen_dss(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2074 match arg_count(args) {
2075 2 => {
2076 let mut code = 0x7c00066c | modifiers;
2077 {
2079 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
2080 code |= (arg & 0x3) << 21;
2081 }
2082 {
2084 let arg = parse_unsigned(args, 1, 0x0, 0x1)?;
2085 code |= (arg & 0x1) << 25;
2086 }
2087 Ok(code)
2088 }
2089 1 => {
2090 let mut code = 0x7c00066c | modifiers;
2091 {
2093 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
2094 code |= (arg & 0x3) << 21;
2095 }
2096 Ok(code)
2097 }
2098 value => {
2099 Err(ArgumentError::ArgCount {
2100 value,
2101 expected: 2,
2102 })
2103 }
2104 }
2105}
2106fn gen_dssall(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2107 check_arg_count(args, 0)?;
2108 let mut code = 0x7e00066c | modifiers;
2109 Ok(code)
2110}
2111fn gen_dst(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2112 check_arg_count(args, 3)?;
2113 let mut code = 0x7c0002ac | modifiers;
2114 {
2116 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2117 code |= (arg & 0x1f) << 16;
2118 }
2119 {
2121 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2122 code |= (arg & 0x1f) << 11;
2123 }
2124 {
2126 let arg = parse_unsigned(args, 2, 0x0, 0x3)?;
2127 code |= (arg & 0x3) << 21;
2128 }
2129 Ok(code)
2130}
2131fn gen_dstst(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2132 check_arg_count(args, 3)?;
2133 let mut code = 0x7c0002ec | modifiers;
2134 {
2136 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2137 code |= (arg & 0x1f) << 16;
2138 }
2139 {
2141 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2142 code |= (arg & 0x1f) << 11;
2143 }
2144 {
2146 let arg = parse_unsigned(args, 2, 0x0, 0x3)?;
2147 code |= (arg & 0x3) << 21;
2148 }
2149 Ok(code)
2150}
2151fn gen_eciwx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2152 check_arg_count(args, 3)?;
2153 let mut code = 0x7c00026c | modifiers;
2154 {
2156 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2157 code |= (arg & 0x1f) << 21;
2158 }
2159 {
2161 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2162 code |= (arg & 0x1f) << 16;
2163 }
2164 {
2166 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2167 code |= (arg & 0x1f) << 11;
2168 }
2169 Ok(code)
2170}
2171fn gen_ecowx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2172 check_arg_count(args, 3)?;
2173 let mut code = 0x7c00036c | modifiers;
2174 {
2176 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2177 code |= (arg & 0x1f) << 21;
2178 }
2179 {
2181 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2182 code |= (arg & 0x1f) << 16;
2183 }
2184 {
2186 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2187 code |= (arg & 0x1f) << 11;
2188 }
2189 Ok(code)
2190}
2191fn gen_eieio(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2192 check_arg_count(args, 0)?;
2193 let mut code = 0x7c0006ac | modifiers;
2194 Ok(code)
2195}
2196fn gen_eqv(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2197 check_arg_count(args, 3)?;
2198 let mut code = 0x7c000238 | modifiers;
2199 {
2201 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2202 code |= (arg & 0x1f) << 16;
2203 }
2204 {
2206 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2207 code |= (arg & 0x1f) << 21;
2208 }
2209 {
2211 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2212 code |= (arg & 0x1f) << 11;
2213 }
2214 Ok(code)
2215}
2216fn gen_extlwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2217 check_arg_count(args, 4)?;
2218 let mut code = 0x54000000 | modifiers;
2219 {
2221 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2222 code |= (arg & 0x1f) << 16;
2223 }
2224 {
2226 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2227 code |= (arg & 0x1f) << 21;
2228 }
2229 {
2231 let arg = (parse_unsigned(args, 2, 0x0, 0x1f)? - 1);
2232 code |= (arg & 0x1f) << 1;
2233 }
2234 {
2236 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2237 code |= (arg & 0x1f) << 11;
2238 }
2239 Ok(code)
2240}
2241fn gen_extrwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2242 check_arg_count(args, 4)?;
2243 let mut code = 0x5400003e | modifiers;
2244 {
2246 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2247 code |= (arg & 0x1f) << 16;
2248 }
2249 {
2251 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2252 code |= (arg & 0x1f) << 21;
2253 }
2254 {
2256 let arg = (32 - parse_unsigned(args, 2, 0x0, 0x1f)?);
2257 code |= (arg & 0x1f) << 6;
2258 }
2259 {
2261 let arg = (parse_unsigned(args, 3, 0x0, 0x1f)?
2262 + parse_unsigned(args, 2, 0x0, 0x1f)?);
2263 code |= (arg & 0x1f) << 11;
2264 }
2265 Ok(code)
2266}
2267fn gen_extsb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2268 check_arg_count(args, 2)?;
2269 let mut code = 0x7c000774 | modifiers;
2270 {
2272 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2273 code |= (arg & 0x1f) << 16;
2274 }
2275 {
2277 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2278 code |= (arg & 0x1f) << 21;
2279 }
2280 Ok(code)
2281}
2282fn gen_extsh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2283 check_arg_count(args, 2)?;
2284 let mut code = 0x7c000734 | modifiers;
2285 {
2287 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2288 code |= (arg & 0x1f) << 16;
2289 }
2290 {
2292 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2293 code |= (arg & 0x1f) << 21;
2294 }
2295 Ok(code)
2296}
2297fn gen_extsw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2298 check_arg_count(args, 2)?;
2299 let mut code = 0x7c0007b4 | modifiers;
2300 {
2302 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2303 code |= (arg & 0x1f) << 16;
2304 }
2305 {
2307 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2308 code |= (arg & 0x1f) << 21;
2309 }
2310 Ok(code)
2311}
2312fn gen_fabs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2313 check_arg_count(args, 2)?;
2314 let mut code = 0xfc000210 | modifiers;
2315 {
2317 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2318 code |= (arg & 0x1f) << 21;
2319 }
2320 {
2322 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2323 code |= (arg & 0x1f) << 11;
2324 }
2325 Ok(code)
2326}
2327fn gen_fadd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2328 check_arg_count(args, 3)?;
2329 let mut code = 0xfc00002a | modifiers;
2330 {
2332 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2333 code |= (arg & 0x1f) << 21;
2334 }
2335 {
2337 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2338 code |= (arg & 0x1f) << 16;
2339 }
2340 {
2342 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2343 code |= (arg & 0x1f) << 11;
2344 }
2345 Ok(code)
2346}
2347fn gen_fadds(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2348 check_arg_count(args, 3)?;
2349 let mut code = 0xec00002a | modifiers;
2350 {
2352 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2353 code |= (arg & 0x1f) << 21;
2354 }
2355 {
2357 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2358 code |= (arg & 0x1f) << 16;
2359 }
2360 {
2362 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2363 code |= (arg & 0x1f) << 11;
2364 }
2365 Ok(code)
2366}
2367fn gen_fcfid(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2368 check_arg_count(args, 2)?;
2369 let mut code = 0xfc00069c | modifiers;
2370 {
2372 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2373 code |= (arg & 0x1f) << 21;
2374 }
2375 {
2377 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2378 code |= (arg & 0x1f) << 11;
2379 }
2380 Ok(code)
2381}
2382fn gen_fcmpo(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2383 check_arg_count(args, 3)?;
2384 let mut code = 0xfc000040 | modifiers;
2385 {
2387 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
2388 code |= (arg & 0x7) << 23;
2389 }
2390 {
2392 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2393 code |= (arg & 0x1f) << 16;
2394 }
2395 {
2397 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2398 code |= (arg & 0x1f) << 11;
2399 }
2400 Ok(code)
2401}
2402fn gen_fcmpu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2403 check_arg_count(args, 3)?;
2404 let mut code = 0xfc000000 | modifiers;
2405 {
2407 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
2408 code |= (arg & 0x7) << 23;
2409 }
2410 {
2412 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2413 code |= (arg & 0x1f) << 16;
2414 }
2415 {
2417 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2418 code |= (arg & 0x1f) << 11;
2419 }
2420 Ok(code)
2421}
2422fn gen_fctid(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2423 check_arg_count(args, 2)?;
2424 let mut code = 0xfc00065c | modifiers;
2425 {
2427 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2428 code |= (arg & 0x1f) << 21;
2429 }
2430 {
2432 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2433 code |= (arg & 0x1f) << 11;
2434 }
2435 Ok(code)
2436}
2437fn gen_fctidz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2438 check_arg_count(args, 2)?;
2439 let mut code = 0xfc00065e | modifiers;
2440 {
2442 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2443 code |= (arg & 0x1f) << 21;
2444 }
2445 {
2447 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2448 code |= (arg & 0x1f) << 11;
2449 }
2450 Ok(code)
2451}
2452fn gen_fctiw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2453 check_arg_count(args, 2)?;
2454 let mut code = 0xfc00001c | modifiers;
2455 {
2457 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2458 code |= (arg & 0x1f) << 21;
2459 }
2460 {
2462 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2463 code |= (arg & 0x1f) << 11;
2464 }
2465 Ok(code)
2466}
2467fn gen_fctiwz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2468 check_arg_count(args, 2)?;
2469 let mut code = 0xfc00001e | modifiers;
2470 {
2472 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2473 code |= (arg & 0x1f) << 21;
2474 }
2475 {
2477 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2478 code |= (arg & 0x1f) << 11;
2479 }
2480 Ok(code)
2481}
2482fn gen_fdiv(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2483 check_arg_count(args, 3)?;
2484 let mut code = 0xfc000024 | modifiers;
2485 {
2487 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2488 code |= (arg & 0x1f) << 21;
2489 }
2490 {
2492 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2493 code |= (arg & 0x1f) << 16;
2494 }
2495 {
2497 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2498 code |= (arg & 0x1f) << 11;
2499 }
2500 Ok(code)
2501}
2502fn gen_fdivs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2503 check_arg_count(args, 3)?;
2504 let mut code = 0xec000024 | modifiers;
2505 {
2507 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2508 code |= (arg & 0x1f) << 21;
2509 }
2510 {
2512 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2513 code |= (arg & 0x1f) << 16;
2514 }
2515 {
2517 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2518 code |= (arg & 0x1f) << 11;
2519 }
2520 Ok(code)
2521}
2522fn gen_fmadd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2523 check_arg_count(args, 4)?;
2524 let mut code = 0xfc00003a | modifiers;
2525 {
2527 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2528 code |= (arg & 0x1f) << 21;
2529 }
2530 {
2532 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2533 code |= (arg & 0x1f) << 16;
2534 }
2535 {
2537 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2538 code |= (arg & 0x1f) << 6;
2539 }
2540 {
2542 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2543 code |= (arg & 0x1f) << 11;
2544 }
2545 Ok(code)
2546}
2547fn gen_fmadds(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2548 check_arg_count(args, 4)?;
2549 let mut code = 0xec00003a | modifiers;
2550 {
2552 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2553 code |= (arg & 0x1f) << 21;
2554 }
2555 {
2557 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2558 code |= (arg & 0x1f) << 16;
2559 }
2560 {
2562 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2563 code |= (arg & 0x1f) << 6;
2564 }
2565 {
2567 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2568 code |= (arg & 0x1f) << 11;
2569 }
2570 Ok(code)
2571}
2572fn gen_fmr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2573 check_arg_count(args, 2)?;
2574 let mut code = 0xfc000090 | modifiers;
2575 {
2577 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2578 code |= (arg & 0x1f) << 21;
2579 }
2580 {
2582 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2583 code |= (arg & 0x1f) << 11;
2584 }
2585 Ok(code)
2586}
2587fn gen_fmsub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2588 check_arg_count(args, 4)?;
2589 let mut code = 0xfc000038 | modifiers;
2590 {
2592 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2593 code |= (arg & 0x1f) << 21;
2594 }
2595 {
2597 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2598 code |= (arg & 0x1f) << 16;
2599 }
2600 {
2602 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2603 code |= (arg & 0x1f) << 6;
2604 }
2605 {
2607 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2608 code |= (arg & 0x1f) << 11;
2609 }
2610 Ok(code)
2611}
2612fn gen_fmsubs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2613 check_arg_count(args, 4)?;
2614 let mut code = 0xec000038 | modifiers;
2615 {
2617 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2618 code |= (arg & 0x1f) << 21;
2619 }
2620 {
2622 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2623 code |= (arg & 0x1f) << 16;
2624 }
2625 {
2627 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2628 code |= (arg & 0x1f) << 6;
2629 }
2630 {
2632 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2633 code |= (arg & 0x1f) << 11;
2634 }
2635 Ok(code)
2636}
2637fn gen_fmul(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2638 check_arg_count(args, 3)?;
2639 let mut code = 0xfc000032 | modifiers;
2640 {
2642 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2643 code |= (arg & 0x1f) << 21;
2644 }
2645 {
2647 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2648 code |= (arg & 0x1f) << 16;
2649 }
2650 {
2652 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2653 code |= (arg & 0x1f) << 6;
2654 }
2655 Ok(code)
2656}
2657fn gen_fmuls(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2658 check_arg_count(args, 3)?;
2659 let mut code = 0xec000032 | modifiers;
2660 {
2662 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2663 code |= (arg & 0x1f) << 21;
2664 }
2665 {
2667 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2668 code |= (arg & 0x1f) << 16;
2669 }
2670 {
2672 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2673 code |= (arg & 0x1f) << 6;
2674 }
2675 Ok(code)
2676}
2677fn gen_fnabs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2678 check_arg_count(args, 2)?;
2679 let mut code = 0xfc000110 | modifiers;
2680 {
2682 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2683 code |= (arg & 0x1f) << 21;
2684 }
2685 {
2687 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2688 code |= (arg & 0x1f) << 11;
2689 }
2690 Ok(code)
2691}
2692fn gen_fneg(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2693 check_arg_count(args, 2)?;
2694 let mut code = 0xfc000050 | modifiers;
2695 {
2697 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2698 code |= (arg & 0x1f) << 21;
2699 }
2700 {
2702 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2703 code |= (arg & 0x1f) << 11;
2704 }
2705 Ok(code)
2706}
2707fn gen_fnmadd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2708 check_arg_count(args, 4)?;
2709 let mut code = 0xfc00003e | modifiers;
2710 {
2712 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2713 code |= (arg & 0x1f) << 21;
2714 }
2715 {
2717 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2718 code |= (arg & 0x1f) << 16;
2719 }
2720 {
2722 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2723 code |= (arg & 0x1f) << 6;
2724 }
2725 {
2727 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2728 code |= (arg & 0x1f) << 11;
2729 }
2730 Ok(code)
2731}
2732fn gen_fnmadds(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2733 check_arg_count(args, 4)?;
2734 let mut code = 0xec00003e | modifiers;
2735 {
2737 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2738 code |= (arg & 0x1f) << 21;
2739 }
2740 {
2742 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2743 code |= (arg & 0x1f) << 16;
2744 }
2745 {
2747 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2748 code |= (arg & 0x1f) << 6;
2749 }
2750 {
2752 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2753 code |= (arg & 0x1f) << 11;
2754 }
2755 Ok(code)
2756}
2757fn gen_fnmsub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2758 check_arg_count(args, 4)?;
2759 let mut code = 0xfc00003c | modifiers;
2760 {
2762 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2763 code |= (arg & 0x1f) << 21;
2764 }
2765 {
2767 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2768 code |= (arg & 0x1f) << 16;
2769 }
2770 {
2772 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2773 code |= (arg & 0x1f) << 6;
2774 }
2775 {
2777 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2778 code |= (arg & 0x1f) << 11;
2779 }
2780 Ok(code)
2781}
2782fn gen_fnmsubs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2783 check_arg_count(args, 4)?;
2784 let mut code = 0xec00003c | modifiers;
2785 {
2787 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2788 code |= (arg & 0x1f) << 21;
2789 }
2790 {
2792 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2793 code |= (arg & 0x1f) << 16;
2794 }
2795 {
2797 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2798 code |= (arg & 0x1f) << 6;
2799 }
2800 {
2802 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2803 code |= (arg & 0x1f) << 11;
2804 }
2805 Ok(code)
2806}
2807fn gen_fres(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2808 check_arg_count(args, 2)?;
2809 let mut code = 0xec000030 | modifiers;
2810 {
2812 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2813 code |= (arg & 0x1f) << 21;
2814 }
2815 {
2817 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2818 code |= (arg & 0x1f) << 11;
2819 }
2820 Ok(code)
2821}
2822fn gen_frsp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2823 check_arg_count(args, 2)?;
2824 let mut code = 0xfc000018 | modifiers;
2825 {
2827 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2828 code |= (arg & 0x1f) << 21;
2829 }
2830 {
2832 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2833 code |= (arg & 0x1f) << 11;
2834 }
2835 Ok(code)
2836}
2837fn gen_frsqrte(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2838 check_arg_count(args, 2)?;
2839 let mut code = 0xfc000034 | modifiers;
2840 {
2842 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2843 code |= (arg & 0x1f) << 21;
2844 }
2845 {
2847 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2848 code |= (arg & 0x1f) << 11;
2849 }
2850 Ok(code)
2851}
2852fn gen_fsel(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2853 check_arg_count(args, 4)?;
2854 let mut code = 0xfc00002e | modifiers;
2855 {
2857 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2858 code |= (arg & 0x1f) << 21;
2859 }
2860 {
2862 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2863 code |= (arg & 0x1f) << 16;
2864 }
2865 {
2867 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2868 code |= (arg & 0x1f) << 6;
2869 }
2870 {
2872 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
2873 code |= (arg & 0x1f) << 11;
2874 }
2875 Ok(code)
2876}
2877fn gen_fsqrt(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2878 check_arg_count(args, 2)?;
2879 let mut code = 0xfc00002c | modifiers;
2880 {
2882 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2883 code |= (arg & 0x1f) << 21;
2884 }
2885 {
2887 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2888 code |= (arg & 0x1f) << 11;
2889 }
2890 Ok(code)
2891}
2892fn gen_fsqrts(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2893 check_arg_count(args, 2)?;
2894 let mut code = 0xec00002c | modifiers;
2895 {
2897 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2898 code |= (arg & 0x1f) << 21;
2899 }
2900 {
2902 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2903 code |= (arg & 0x1f) << 11;
2904 }
2905 Ok(code)
2906}
2907fn gen_fsub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2908 check_arg_count(args, 3)?;
2909 let mut code = 0xfc000028 | modifiers;
2910 {
2912 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2913 code |= (arg & 0x1f) << 21;
2914 }
2915 {
2917 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2918 code |= (arg & 0x1f) << 16;
2919 }
2920 {
2922 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2923 code |= (arg & 0x1f) << 11;
2924 }
2925 Ok(code)
2926}
2927fn gen_fsubs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2928 check_arg_count(args, 3)?;
2929 let mut code = 0xec000028 | modifiers;
2930 {
2932 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2933 code |= (arg & 0x1f) << 21;
2934 }
2935 {
2937 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2938 code |= (arg & 0x1f) << 16;
2939 }
2940 {
2942 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2943 code |= (arg & 0x1f) << 11;
2944 }
2945 Ok(code)
2946}
2947fn gen_icbi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2948 check_arg_count(args, 2)?;
2949 let mut code = 0x7c0007ac | modifiers;
2950 {
2952 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2953 code |= (arg & 0x1f) << 16;
2954 }
2955 {
2957 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
2958 code |= (arg & 0x1f) << 11;
2959 }
2960 Ok(code)
2961}
2962fn gen_isync(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2963 check_arg_count(args, 0)?;
2964 let mut code = 0x4c00012c | modifiers;
2965 Ok(code)
2966}
2967fn gen_lbz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2968 check_arg_count(args, 3)?;
2969 let mut code = 0x88000000 | modifiers;
2970 {
2972 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2973 code |= (arg & 0x1f) << 21;
2974 }
2975 {
2977 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
2978 code |= arg & 0xffff;
2979 }
2980 {
2982 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
2983 code |= (arg & 0x1f) << 16;
2984 }
2985 Ok(code)
2986}
2987fn gen_lbzu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
2988 check_arg_count(args, 3)?;
2989 let mut code = 0x8c000000 | modifiers;
2990 {
2992 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
2993 code |= (arg & 0x1f) << 21;
2994 }
2995 {
2997 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
2998 code |= arg & 0xffff;
2999 }
3000 {
3002 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3003 code |= (arg & 0x1f) << 16;
3004 }
3005 Ok(code)
3006}
3007fn gen_lbzux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3008 check_arg_count(args, 3)?;
3009 let mut code = 0x7c0000ee | modifiers;
3010 {
3012 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3013 code |= (arg & 0x1f) << 21;
3014 }
3015 {
3017 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3018 code |= (arg & 0x1f) << 16;
3019 }
3020 {
3022 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3023 code |= (arg & 0x1f) << 11;
3024 }
3025 Ok(code)
3026}
3027fn gen_lbzx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3028 check_arg_count(args, 3)?;
3029 let mut code = 0x7c0000ae | modifiers;
3030 {
3032 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3033 code |= (arg & 0x1f) << 21;
3034 }
3035 {
3037 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3038 code |= (arg & 0x1f) << 16;
3039 }
3040 {
3042 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3043 code |= (arg & 0x1f) << 11;
3044 }
3045 Ok(code)
3046}
3047fn gen_ld(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3048 check_arg_count(args, 3)?;
3049 let mut code = 0xe8000000 | modifiers;
3050 {
3052 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3053 code |= (arg & 0x1f) << 21;
3054 }
3055 {
3057 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3058 code |= arg & 0xfffc;
3059 }
3060 {
3062 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3063 code |= (arg & 0x1f) << 16;
3064 }
3065 Ok(code)
3066}
3067fn gen_ldarx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3068 check_arg_count(args, 3)?;
3069 let mut code = 0x7c0000a8 | modifiers;
3070 {
3072 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3073 code |= (arg & 0x1f) << 21;
3074 }
3075 {
3077 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3078 code |= (arg & 0x1f) << 16;
3079 }
3080 {
3082 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3083 code |= (arg & 0x1f) << 11;
3084 }
3085 Ok(code)
3086}
3087fn gen_ldu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3088 check_arg_count(args, 3)?;
3089 let mut code = 0xe8000001 | modifiers;
3090 {
3092 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3093 code |= (arg & 0x1f) << 21;
3094 }
3095 {
3097 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3098 code |= arg & 0xfffc;
3099 }
3100 {
3102 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3103 code |= (arg & 0x1f) << 16;
3104 }
3105 Ok(code)
3106}
3107fn gen_ldux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3108 check_arg_count(args, 3)?;
3109 let mut code = 0x7c00006a | modifiers;
3110 {
3112 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3113 code |= (arg & 0x1f) << 21;
3114 }
3115 {
3117 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3118 code |= (arg & 0x1f) << 16;
3119 }
3120 {
3122 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3123 code |= (arg & 0x1f) << 11;
3124 }
3125 Ok(code)
3126}
3127fn gen_ldx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3128 check_arg_count(args, 3)?;
3129 let mut code = 0x7c00002a | modifiers;
3130 {
3132 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3133 code |= (arg & 0x1f) << 21;
3134 }
3135 {
3137 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3138 code |= (arg & 0x1f) << 16;
3139 }
3140 {
3142 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3143 code |= (arg & 0x1f) << 11;
3144 }
3145 Ok(code)
3146}
3147fn gen_lfd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3148 check_arg_count(args, 3)?;
3149 let mut code = 0xc8000000 | modifiers;
3150 {
3152 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3153 code |= (arg & 0x1f) << 21;
3154 }
3155 {
3157 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3158 code |= arg & 0xffff;
3159 }
3160 {
3162 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3163 code |= (arg & 0x1f) << 16;
3164 }
3165 Ok(code)
3166}
3167fn gen_lfdu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3168 check_arg_count(args, 3)?;
3169 let mut code = 0xcc000000 | modifiers;
3170 {
3172 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3173 code |= (arg & 0x1f) << 21;
3174 }
3175 {
3177 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3178 code |= arg & 0xffff;
3179 }
3180 {
3182 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3183 code |= (arg & 0x1f) << 16;
3184 }
3185 Ok(code)
3186}
3187fn gen_lfdux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3188 check_arg_count(args, 3)?;
3189 let mut code = 0x7c0004ee | modifiers;
3190 {
3192 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3193 code |= (arg & 0x1f) << 21;
3194 }
3195 {
3197 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3198 code |= (arg & 0x1f) << 16;
3199 }
3200 {
3202 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3203 code |= (arg & 0x1f) << 11;
3204 }
3205 Ok(code)
3206}
3207fn gen_lfdx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3208 check_arg_count(args, 3)?;
3209 let mut code = 0x7c0004ae | modifiers;
3210 {
3212 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3213 code |= (arg & 0x1f) << 21;
3214 }
3215 {
3217 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3218 code |= (arg & 0x1f) << 16;
3219 }
3220 {
3222 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3223 code |= (arg & 0x1f) << 11;
3224 }
3225 Ok(code)
3226}
3227fn gen_lfs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3228 check_arg_count(args, 3)?;
3229 let mut code = 0xc0000000 | modifiers;
3230 {
3232 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3233 code |= (arg & 0x1f) << 21;
3234 }
3235 {
3237 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3238 code |= arg & 0xffff;
3239 }
3240 {
3242 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3243 code |= (arg & 0x1f) << 16;
3244 }
3245 Ok(code)
3246}
3247fn gen_lfsu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3248 check_arg_count(args, 3)?;
3249 let mut code = 0xc4000000 | modifiers;
3250 {
3252 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3253 code |= (arg & 0x1f) << 21;
3254 }
3255 {
3257 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3258 code |= arg & 0xffff;
3259 }
3260 {
3262 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3263 code |= (arg & 0x1f) << 16;
3264 }
3265 Ok(code)
3266}
3267fn gen_lfsux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3268 check_arg_count(args, 3)?;
3269 let mut code = 0x7c00046e | modifiers;
3270 {
3272 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3273 code |= (arg & 0x1f) << 21;
3274 }
3275 {
3277 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3278 code |= (arg & 0x1f) << 16;
3279 }
3280 {
3282 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3283 code |= (arg & 0x1f) << 11;
3284 }
3285 Ok(code)
3286}
3287fn gen_lfsx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3288 check_arg_count(args, 3)?;
3289 let mut code = 0x7c00042e | modifiers;
3290 {
3292 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3293 code |= (arg & 0x1f) << 21;
3294 }
3295 {
3297 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3298 code |= (arg & 0x1f) << 16;
3299 }
3300 {
3302 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3303 code |= (arg & 0x1f) << 11;
3304 }
3305 Ok(code)
3306}
3307fn gen_lha(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3308 check_arg_count(args, 3)?;
3309 let mut code = 0xa8000000 | modifiers;
3310 {
3312 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3313 code |= (arg & 0x1f) << 21;
3314 }
3315 {
3317 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3318 code |= arg & 0xffff;
3319 }
3320 {
3322 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3323 code |= (arg & 0x1f) << 16;
3324 }
3325 Ok(code)
3326}
3327fn gen_lhau(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3328 check_arg_count(args, 3)?;
3329 let mut code = 0xac000000 | modifiers;
3330 {
3332 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3333 code |= (arg & 0x1f) << 21;
3334 }
3335 {
3337 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3338 code |= arg & 0xffff;
3339 }
3340 {
3342 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3343 code |= (arg & 0x1f) << 16;
3344 }
3345 Ok(code)
3346}
3347fn gen_lhaux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3348 check_arg_count(args, 3)?;
3349 let mut code = 0x7c0002ee | modifiers;
3350 {
3352 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3353 code |= (arg & 0x1f) << 21;
3354 }
3355 {
3357 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3358 code |= (arg & 0x1f) << 16;
3359 }
3360 {
3362 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3363 code |= (arg & 0x1f) << 11;
3364 }
3365 Ok(code)
3366}
3367fn gen_lhax(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3368 check_arg_count(args, 3)?;
3369 let mut code = 0x7c0002ae | modifiers;
3370 {
3372 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3373 code |= (arg & 0x1f) << 21;
3374 }
3375 {
3377 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3378 code |= (arg & 0x1f) << 16;
3379 }
3380 {
3382 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3383 code |= (arg & 0x1f) << 11;
3384 }
3385 Ok(code)
3386}
3387fn gen_lhbrx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3388 check_arg_count(args, 3)?;
3389 let mut code = 0x7c00062c | modifiers;
3390 {
3392 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3393 code |= (arg & 0x1f) << 21;
3394 }
3395 {
3397 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3398 code |= (arg & 0x1f) << 16;
3399 }
3400 {
3402 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3403 code |= (arg & 0x1f) << 11;
3404 }
3405 Ok(code)
3406}
3407fn gen_lhz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3408 check_arg_count(args, 3)?;
3409 let mut code = 0xa0000000 | modifiers;
3410 {
3412 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3413 code |= (arg & 0x1f) << 21;
3414 }
3415 {
3417 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3418 code |= arg & 0xffff;
3419 }
3420 {
3422 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3423 code |= (arg & 0x1f) << 16;
3424 }
3425 Ok(code)
3426}
3427fn gen_lhzu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3428 check_arg_count(args, 3)?;
3429 let mut code = 0xa4000000 | modifiers;
3430 {
3432 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3433 code |= (arg & 0x1f) << 21;
3434 }
3435 {
3437 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3438 code |= arg & 0xffff;
3439 }
3440 {
3442 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3443 code |= (arg & 0x1f) << 16;
3444 }
3445 Ok(code)
3446}
3447fn gen_lhzux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3448 check_arg_count(args, 3)?;
3449 let mut code = 0x7c00026e | modifiers;
3450 {
3452 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3453 code |= (arg & 0x1f) << 21;
3454 }
3455 {
3457 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3458 code |= (arg & 0x1f) << 16;
3459 }
3460 {
3462 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3463 code |= (arg & 0x1f) << 11;
3464 }
3465 Ok(code)
3466}
3467fn gen_lhzx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3468 check_arg_count(args, 3)?;
3469 let mut code = 0x7c00022e | modifiers;
3470 {
3472 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3473 code |= (arg & 0x1f) << 21;
3474 }
3475 {
3477 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3478 code |= (arg & 0x1f) << 16;
3479 }
3480 {
3482 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3483 code |= (arg & 0x1f) << 11;
3484 }
3485 Ok(code)
3486}
3487fn gen_li(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3488 check_arg_count(args, 2)?;
3489 let mut code = 0x38000000 | modifiers;
3490 {
3492 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3493 code |= (arg & 0x1f) << 21;
3494 }
3495 {
3497 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3498 code |= arg & 0xffff;
3499 }
3500 Ok(code)
3501}
3502fn gen_lis(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3503 check_arg_count(args, 2)?;
3504 let mut code = 0x3c000000 | modifiers;
3505 {
3507 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3508 code |= (arg & 0x1f) << 21;
3509 }
3510 {
3512 let arg = parse_unsigned(args, 1, 0x0, 0xffff)?;
3513 code |= arg & 0xffff;
3514 }
3515 Ok(code)
3516}
3517fn gen_lmw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3518 check_arg_count(args, 3)?;
3519 let mut code = 0xb8000000 | modifiers;
3520 {
3522 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3523 code |= (arg & 0x1f) << 21;
3524 }
3525 {
3527 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3528 code |= arg & 0xffff;
3529 }
3530 {
3532 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3533 code |= (arg & 0x1f) << 16;
3534 }
3535 Ok(code)
3536}
3537fn gen_lswi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3538 check_arg_count(args, 3)?;
3539 let mut code = 0x7c0004aa | modifiers;
3540 {
3542 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3543 code |= (arg & 0x1f) << 21;
3544 }
3545 {
3547 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3548 code |= (arg & 0x1f) << 16;
3549 }
3550 {
3552 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3553 code |= (arg & 0x1f) << 11;
3554 }
3555 Ok(code)
3556}
3557fn gen_lswx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3558 check_arg_count(args, 3)?;
3559 let mut code = 0x7c00042a | modifiers;
3560 {
3562 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3563 code |= (arg & 0x1f) << 21;
3564 }
3565 {
3567 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3568 code |= (arg & 0x1f) << 16;
3569 }
3570 {
3572 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3573 code |= (arg & 0x1f) << 11;
3574 }
3575 Ok(code)
3576}
3577fn gen_lvebx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3578 check_arg_count(args, 3)?;
3579 let mut code = 0x7c00000e | modifiers;
3580 {
3582 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3583 code |= (arg & 0x1f) << 21;
3584 }
3585 {
3587 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3588 code |= (arg & 0x1f) << 16;
3589 }
3590 {
3592 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3593 code |= (arg & 0x1f) << 11;
3594 }
3595 Ok(code)
3596}
3597fn gen_lvehx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3598 check_arg_count(args, 3)?;
3599 let mut code = 0x7c00004e | modifiers;
3600 {
3602 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3603 code |= (arg & 0x1f) << 21;
3604 }
3605 {
3607 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3608 code |= (arg & 0x1f) << 16;
3609 }
3610 {
3612 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3613 code |= (arg & 0x1f) << 11;
3614 }
3615 Ok(code)
3616}
3617fn gen_lvewx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3618 check_arg_count(args, 3)?;
3619 let mut code = 0x7c00008e | modifiers;
3620 {
3622 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3623 code |= (arg & 0x1f) << 21;
3624 }
3625 {
3627 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3628 code |= (arg & 0x1f) << 16;
3629 }
3630 {
3632 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3633 code |= (arg & 0x1f) << 11;
3634 }
3635 Ok(code)
3636}
3637fn gen_lvewx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3638 check_arg_count(args, 3)?;
3639 let mut code = 0x10000083 | modifiers;
3640 {
3642 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3643 code |= (arg & 0x1f) << 21;
3644 code |= (arg >> 3) & 0xc;
3645 }
3646 {
3648 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3649 code |= (arg & 0x1f) << 16;
3650 }
3651 {
3653 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3654 code |= (arg & 0x1f) << 11;
3655 }
3656 Ok(code)
3657}
3658fn gen_lvlx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3659 check_arg_count(args, 3)?;
3660 let mut code = 0x7c00040e | modifiers;
3661 {
3663 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3664 code |= (arg & 0x1f) << 21;
3665 }
3666 {
3668 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3669 code |= (arg & 0x1f) << 16;
3670 }
3671 {
3673 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3674 code |= (arg & 0x1f) << 11;
3675 }
3676 Ok(code)
3677}
3678fn gen_lvlx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3679 check_arg_count(args, 3)?;
3680 let mut code = 0x10000403 | modifiers;
3681 {
3683 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3684 code |= (arg & 0x1f) << 21;
3685 code |= (arg >> 3) & 0xc;
3686 }
3687 {
3689 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3690 code |= (arg & 0x1f) << 16;
3691 }
3692 {
3694 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3695 code |= (arg & 0x1f) << 11;
3696 }
3697 Ok(code)
3698}
3699fn gen_lvlxl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3700 check_arg_count(args, 3)?;
3701 let mut code = 0x7c00060e | modifiers;
3702 {
3704 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3705 code |= (arg & 0x1f) << 21;
3706 }
3707 {
3709 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3710 code |= (arg & 0x1f) << 16;
3711 }
3712 {
3714 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3715 code |= (arg & 0x1f) << 11;
3716 }
3717 Ok(code)
3718}
3719fn gen_lvlxl128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3720 check_arg_count(args, 3)?;
3721 let mut code = 0x10000603 | modifiers;
3722 {
3724 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3725 code |= (arg & 0x1f) << 21;
3726 code |= (arg >> 3) & 0xc;
3727 }
3728 {
3730 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3731 code |= (arg & 0x1f) << 16;
3732 }
3733 {
3735 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3736 code |= (arg & 0x1f) << 11;
3737 }
3738 Ok(code)
3739}
3740fn gen_lvrx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3741 check_arg_count(args, 3)?;
3742 let mut code = 0x7c00044e | modifiers;
3743 {
3745 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3746 code |= (arg & 0x1f) << 21;
3747 }
3748 {
3750 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3751 code |= (arg & 0x1f) << 16;
3752 }
3753 {
3755 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3756 code |= (arg & 0x1f) << 11;
3757 }
3758 Ok(code)
3759}
3760fn gen_lvrx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3761 check_arg_count(args, 3)?;
3762 let mut code = 0x10000443 | modifiers;
3763 {
3765 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3766 code |= (arg & 0x1f) << 21;
3767 code |= (arg >> 3) & 0xc;
3768 }
3769 {
3771 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3772 code |= (arg & 0x1f) << 16;
3773 }
3774 {
3776 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3777 code |= (arg & 0x1f) << 11;
3778 }
3779 Ok(code)
3780}
3781fn gen_lvrxl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3782 check_arg_count(args, 3)?;
3783 let mut code = 0x7c00064e | modifiers;
3784 {
3786 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3787 code |= (arg & 0x1f) << 21;
3788 }
3789 {
3791 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3792 code |= (arg & 0x1f) << 16;
3793 }
3794 {
3796 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3797 code |= (arg & 0x1f) << 11;
3798 }
3799 Ok(code)
3800}
3801fn gen_lvrxl128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3802 check_arg_count(args, 3)?;
3803 let mut code = 0x10000643 | modifiers;
3804 {
3806 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3807 code |= (arg & 0x1f) << 21;
3808 code |= (arg >> 3) & 0xc;
3809 }
3810 {
3812 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3813 code |= (arg & 0x1f) << 16;
3814 }
3815 {
3817 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3818 code |= (arg & 0x1f) << 11;
3819 }
3820 Ok(code)
3821}
3822fn gen_lvsl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3823 check_arg_count(args, 3)?;
3824 let mut code = 0x7c00000c | modifiers;
3825 {
3827 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3828 code |= (arg & 0x1f) << 21;
3829 }
3830 {
3832 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3833 code |= (arg & 0x1f) << 16;
3834 }
3835 {
3837 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3838 code |= (arg & 0x1f) << 11;
3839 }
3840 Ok(code)
3841}
3842fn gen_lvsl128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3843 check_arg_count(args, 3)?;
3844 let mut code = 0x10000003 | modifiers;
3845 {
3847 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3848 code |= (arg & 0x1f) << 21;
3849 code |= (arg >> 3) & 0xc;
3850 }
3851 {
3853 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3854 code |= (arg & 0x1f) << 16;
3855 }
3856 {
3858 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3859 code |= (arg & 0x1f) << 11;
3860 }
3861 Ok(code)
3862}
3863fn gen_lvsr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3864 check_arg_count(args, 3)?;
3865 let mut code = 0x7c00004c | modifiers;
3866 {
3868 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3869 code |= (arg & 0x1f) << 21;
3870 }
3871 {
3873 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3874 code |= (arg & 0x1f) << 16;
3875 }
3876 {
3878 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3879 code |= (arg & 0x1f) << 11;
3880 }
3881 Ok(code)
3882}
3883fn gen_lvsr128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3884 check_arg_count(args, 3)?;
3885 let mut code = 0x10000043 | modifiers;
3886 {
3888 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3889 code |= (arg & 0x1f) << 21;
3890 code |= (arg >> 3) & 0xc;
3891 }
3892 {
3894 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3895 code |= (arg & 0x1f) << 16;
3896 }
3897 {
3899 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3900 code |= (arg & 0x1f) << 11;
3901 }
3902 Ok(code)
3903}
3904fn gen_lvx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3905 check_arg_count(args, 3)?;
3906 let mut code = 0x7c0000ce | modifiers;
3907 {
3909 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3910 code |= (arg & 0x1f) << 21;
3911 }
3912 {
3914 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3915 code |= (arg & 0x1f) << 16;
3916 }
3917 {
3919 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3920 code |= (arg & 0x1f) << 11;
3921 }
3922 Ok(code)
3923}
3924fn gen_lvx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3925 check_arg_count(args, 3)?;
3926 let mut code = 0x100000c3 | modifiers;
3927 {
3929 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3930 code |= (arg & 0x1f) << 21;
3931 code |= (arg >> 3) & 0xc;
3932 }
3933 {
3935 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3936 code |= (arg & 0x1f) << 16;
3937 }
3938 {
3940 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3941 code |= (arg & 0x1f) << 11;
3942 }
3943 Ok(code)
3944}
3945fn gen_lvxl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3946 check_arg_count(args, 3)?;
3947 let mut code = 0x7c0002ce | modifiers;
3948 {
3950 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3951 code |= (arg & 0x1f) << 21;
3952 }
3953 {
3955 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3956 code |= (arg & 0x1f) << 16;
3957 }
3958 {
3960 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3961 code |= (arg & 0x1f) << 11;
3962 }
3963 Ok(code)
3964}
3965fn gen_lvxl128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3966 check_arg_count(args, 3)?;
3967 let mut code = 0x100002c3 | modifiers;
3968 {
3970 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
3971 code |= (arg & 0x1f) << 21;
3972 code |= (arg >> 3) & 0xc;
3973 }
3974 {
3976 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
3977 code |= (arg & 0x1f) << 16;
3978 }
3979 {
3981 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
3982 code |= (arg & 0x1f) << 11;
3983 }
3984 Ok(code)
3985}
3986fn gen_lwa(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
3987 check_arg_count(args, 3)?;
3988 let mut code = 0xe8000002 | modifiers;
3989 {
3991 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
3992 code |= (arg & 0x1f) << 21;
3993 }
3994 {
3996 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
3997 code |= arg & 0xfffc;
3998 }
3999 {
4001 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4002 code |= (arg & 0x1f) << 16;
4003 }
4004 Ok(code)
4005}
4006fn gen_lwarx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4007 check_arg_count(args, 3)?;
4008 let mut code = 0x7c000028 | modifiers;
4009 {
4011 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4012 code |= (arg & 0x1f) << 21;
4013 }
4014 {
4016 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4017 code |= (arg & 0x1f) << 16;
4018 }
4019 {
4021 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4022 code |= (arg & 0x1f) << 11;
4023 }
4024 Ok(code)
4025}
4026fn gen_lwaux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4027 check_arg_count(args, 3)?;
4028 let mut code = 0x7c0002ea | modifiers;
4029 {
4031 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4032 code |= (arg & 0x1f) << 21;
4033 }
4034 {
4036 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4037 code |= (arg & 0x1f) << 16;
4038 }
4039 {
4041 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4042 code |= (arg & 0x1f) << 11;
4043 }
4044 Ok(code)
4045}
4046fn gen_lwax(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4047 check_arg_count(args, 3)?;
4048 let mut code = 0x7c0002aa | modifiers;
4049 {
4051 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4052 code |= (arg & 0x1f) << 21;
4053 }
4054 {
4056 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4057 code |= (arg & 0x1f) << 16;
4058 }
4059 {
4061 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4062 code |= (arg & 0x1f) << 11;
4063 }
4064 Ok(code)
4065}
4066fn gen_lwbrx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4067 check_arg_count(args, 3)?;
4068 let mut code = 0x7c00042c | modifiers;
4069 {
4071 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4072 code |= (arg & 0x1f) << 21;
4073 }
4074 {
4076 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4077 code |= (arg & 0x1f) << 16;
4078 }
4079 {
4081 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4082 code |= (arg & 0x1f) << 11;
4083 }
4084 Ok(code)
4085}
4086fn gen_lwsync(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4087 check_arg_count(args, 0)?;
4088 let mut code = 0x7c2004ac | modifiers;
4089 Ok(code)
4090}
4091fn gen_lwz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4092 check_arg_count(args, 3)?;
4093 let mut code = 0x80000000 | modifiers;
4094 {
4096 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4097 code |= (arg & 0x1f) << 21;
4098 }
4099 {
4101 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
4102 code |= arg & 0xffff;
4103 }
4104 {
4106 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4107 code |= (arg & 0x1f) << 16;
4108 }
4109 Ok(code)
4110}
4111fn gen_lwzu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4112 check_arg_count(args, 3)?;
4113 let mut code = 0x84000000 | modifiers;
4114 {
4116 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4117 code |= (arg & 0x1f) << 21;
4118 }
4119 {
4121 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
4122 code |= arg & 0xffff;
4123 }
4124 {
4126 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4127 code |= (arg & 0x1f) << 16;
4128 }
4129 Ok(code)
4130}
4131fn gen_lwzux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4132 check_arg_count(args, 3)?;
4133 let mut code = 0x7c00006e | modifiers;
4134 {
4136 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4137 code |= (arg & 0x1f) << 21;
4138 }
4139 {
4141 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4142 code |= (arg & 0x1f) << 16;
4143 }
4144 {
4146 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4147 code |= (arg & 0x1f) << 11;
4148 }
4149 Ok(code)
4150}
4151fn gen_lwzx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4152 check_arg_count(args, 3)?;
4153 let mut code = 0x7c00002e | modifiers;
4154 {
4156 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4157 code |= (arg & 0x1f) << 21;
4158 }
4159 {
4161 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4162 code |= (arg & 0x1f) << 16;
4163 }
4164 {
4166 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4167 code |= (arg & 0x1f) << 11;
4168 }
4169 Ok(code)
4170}
4171fn gen_mcrf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4172 check_arg_count(args, 2)?;
4173 let mut code = 0x4c000000 | modifiers;
4174 {
4176 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
4177 code |= (arg & 0x7) << 23;
4178 }
4179 {
4181 let arg = parse_unsigned(args, 1, 0x0, 0x7)?;
4182 code |= (arg & 0x7) << 18;
4183 }
4184 Ok(code)
4185}
4186fn gen_mcrfs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4187 check_arg_count(args, 2)?;
4188 let mut code = 0xfc000080 | modifiers;
4189 {
4191 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
4192 code |= (arg & 0x7) << 23;
4193 }
4194 {
4196 let arg = parse_unsigned(args, 1, 0x0, 0x7)?;
4197 code |= (arg & 0x7) << 18;
4198 }
4199 Ok(code)
4200}
4201fn gen_mcrxr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4202 check_arg_count(args, 1)?;
4203 let mut code = 0x7c000400 | modifiers;
4204 {
4206 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
4207 code |= (arg & 0x7) << 23;
4208 }
4209 Ok(code)
4210}
4211fn gen_mfcr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4212 check_arg_count(args, 1)?;
4213 let mut code = 0x7c000026 | modifiers;
4214 {
4216 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4217 code |= (arg & 0x1f) << 21;
4218 }
4219 Ok(code)
4220}
4221fn gen_mfctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4222 check_arg_count(args, 1)?;
4223 let mut code = 0x7c0902a6 | modifiers;
4224 {
4226 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4227 code |= (arg & 0x1f) << 21;
4228 }
4229 Ok(code)
4230}
4231fn gen_mfdar(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4232 check_arg_count(args, 1)?;
4233 let mut code = 0x7c1302a6 | modifiers;
4234 {
4236 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4237 code |= (arg & 0x1f) << 21;
4238 }
4239 Ok(code)
4240}
4241fn gen_mfdbatl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4242 check_arg_count(args, 2)?;
4243 let mut code = 0x7c1982a6 | modifiers;
4244 {
4246 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4247 code |= (arg & 0x1f) << 21;
4248 }
4249 {
4251 let arg = parse_unsigned(args, 1, 0x0, 0x3)?;
4252 code |= (arg & 0x3) << 17;
4253 }
4254 Ok(code)
4255}
4256fn gen_mfdbatu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4257 check_arg_count(args, 2)?;
4258 let mut code = 0x7c1882a6 | modifiers;
4259 {
4261 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4262 code |= (arg & 0x1f) << 21;
4263 }
4264 {
4266 let arg = parse_unsigned(args, 1, 0x0, 0x3)?;
4267 code |= (arg & 0x3) << 17;
4268 }
4269 Ok(code)
4270}
4271fn gen_mfdec(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4272 check_arg_count(args, 1)?;
4273 let mut code = 0x7c1602a6 | modifiers;
4274 {
4276 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4277 code |= (arg & 0x1f) << 21;
4278 }
4279 Ok(code)
4280}
4281fn gen_mfdsisr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4282 check_arg_count(args, 1)?;
4283 let mut code = 0x7c1202a6 | modifiers;
4284 {
4286 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4287 code |= (arg & 0x1f) << 21;
4288 }
4289 Ok(code)
4290}
4291fn gen_mfear(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4292 check_arg_count(args, 1)?;
4293 let mut code = 0x7c1a42a6 | modifiers;
4294 {
4296 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4297 code |= (arg & 0x1f) << 21;
4298 }
4299 Ok(code)
4300}
4301fn gen_mffs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4302 check_arg_count(args, 1)?;
4303 let mut code = 0xfc00048e | modifiers;
4304 {
4306 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4307 code |= (arg & 0x1f) << 21;
4308 }
4309 Ok(code)
4310}
4311fn gen_mfibatl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4312 check_arg_count(args, 2)?;
4313 let mut code = 0x7c1182a6 | modifiers;
4314 {
4316 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4317 code |= (arg & 0x1f) << 21;
4318 }
4319 {
4321 let arg = parse_unsigned(args, 1, 0x0, 0x3)?;
4322 code |= (arg & 0x3) << 17;
4323 }
4324 Ok(code)
4325}
4326fn gen_mfibatu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4327 check_arg_count(args, 2)?;
4328 let mut code = 0x7c1082a6 | modifiers;
4329 {
4331 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4332 code |= (arg & 0x1f) << 21;
4333 }
4334 {
4336 let arg = parse_unsigned(args, 1, 0x0, 0x3)?;
4337 code |= (arg & 0x3) << 17;
4338 }
4339 Ok(code)
4340}
4341fn gen_mflr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4342 check_arg_count(args, 1)?;
4343 let mut code = 0x7c0802a6 | modifiers;
4344 {
4346 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4347 code |= (arg & 0x1f) << 21;
4348 }
4349 Ok(code)
4350}
4351fn gen_mfmsr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4352 check_arg_count(args, 1)?;
4353 let mut code = 0x7c0000a6 | modifiers;
4354 {
4356 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4357 code |= (arg & 0x1f) << 21;
4358 }
4359 Ok(code)
4360}
4361fn gen_mfocrf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4362 check_arg_count(args, 2)?;
4363 let mut code = 0x7c100026 | modifiers;
4364 {
4366 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4367 code |= (arg & 0x1f) << 21;
4368 }
4369 {
4371 let arg = parse_unsigned(args, 1, 0x0, 0xff)?;
4372 code |= (arg & 0xff) << 12;
4373 }
4374 Ok(code)
4375}
4376fn gen_mfsdr1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4377 check_arg_count(args, 1)?;
4378 let mut code = 0x7c1902a6 | modifiers;
4379 {
4381 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4382 code |= (arg & 0x1f) << 21;
4383 }
4384 Ok(code)
4385}
4386fn gen_mfspr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4387 check_arg_count(args, 2)?;
4388 let mut code = 0x7c0002a6 | modifiers;
4389 {
4391 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4392 code |= (arg & 0x1f) << 21;
4393 }
4394 {
4396 let arg = parse_unsigned(args, 1, 0x0, 0x3ff)?;
4397 code |= (arg & 0x1f) << 16;
4398 code |= (arg & 0x3e0) << 6;
4399 }
4400 Ok(code)
4401}
4402fn gen_mfsprg(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4403 check_arg_count(args, 2)?;
4404 let mut code = 0x7c1042a6 | modifiers;
4405 {
4407 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4408 code |= (arg & 0x1f) << 21;
4409 }
4410 {
4412 let arg = parse_unsigned(args, 1, 0x0, 0x3)?;
4413 code |= (arg & 0x3) << 16;
4414 }
4415 Ok(code)
4416}
4417fn gen_mfsr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4418 check_arg_count(args, 2)?;
4419 let mut code = 0x7c0004a6 | modifiers;
4420 {
4422 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4423 code |= (arg & 0x1f) << 21;
4424 }
4425 {
4427 let arg = parse_unsigned(args, 1, 0x0, 0xf)?;
4428 code |= (arg & 0xf) << 16;
4429 }
4430 Ok(code)
4431}
4432fn gen_mfsrin(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4433 check_arg_count(args, 2)?;
4434 let mut code = 0x7c000526 | modifiers;
4435 {
4437 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4438 code |= (arg & 0x1f) << 21;
4439 }
4440 {
4442 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4443 code |= (arg & 0x1f) << 11;
4444 }
4445 Ok(code)
4446}
4447fn gen_mfsrr0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4448 check_arg_count(args, 1)?;
4449 let mut code = 0x7c1a02a6 | modifiers;
4450 {
4452 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4453 code |= (arg & 0x1f) << 21;
4454 }
4455 Ok(code)
4456}
4457fn gen_mfsrr1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4458 check_arg_count(args, 1)?;
4459 let mut code = 0x7c1b02a6 | modifiers;
4460 {
4462 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4463 code |= (arg & 0x1f) << 21;
4464 }
4465 Ok(code)
4466}
4467fn gen_mftb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4468 check_arg_count(args, 2)?;
4469 let mut code = 0x7c0002e6 | modifiers;
4470 {
4472 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4473 code |= (arg & 0x1f) << 21;
4474 }
4475 {
4477 let arg = parse_unsigned(args, 1, 0x0, 0x3ff)?;
4478 code |= (arg & 0x1f) << 16;
4479 code |= (arg & 0x3e0) << 6;
4480 }
4481 Ok(code)
4482}
4483fn gen_mfvscr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4484 check_arg_count(args, 1)?;
4485 let mut code = 0x10000604 | modifiers;
4486 {
4488 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4489 code |= (arg & 0x1f) << 21;
4490 }
4491 Ok(code)
4492}
4493fn gen_mfxer(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4494 check_arg_count(args, 1)?;
4495 let mut code = 0x7c0102a6 | modifiers;
4496 {
4498 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4499 code |= (arg & 0x1f) << 21;
4500 }
4501 Ok(code)
4502}
4503fn gen_mr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4504 check_arg_count(args, 2)?;
4505 let mut code = 0x7c000378 | modifiers;
4506 {
4508 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4509 code |= (arg & 0x1f) << 16;
4510 }
4511 {
4513 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4514 code |= (arg & 0x1f) << 21;
4515 }
4516 {
4518 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4519 code |= (arg & 0x1f) << 11;
4520 }
4521 Ok(code)
4522}
4523fn gen_mtcrf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4524 check_arg_count(args, 2)?;
4525 let mut code = 0x7c000120 | modifiers;
4526 {
4528 let arg = parse_unsigned(args, 0, 0x0, 0xff)?;
4529 code |= (arg & 0xff) << 12;
4530 }
4531 {
4533 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4534 code |= (arg & 0x1f) << 21;
4535 }
4536 Ok(code)
4537}
4538fn gen_mtctr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4539 check_arg_count(args, 1)?;
4540 let mut code = 0x7c0903a6 | modifiers;
4541 {
4543 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4544 code |= (arg & 0x1f) << 21;
4545 }
4546 Ok(code)
4547}
4548fn gen_mtdar(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4549 check_arg_count(args, 1)?;
4550 let mut code = 0x7c1303a6 | modifiers;
4551 {
4553 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4554 code |= (arg & 0x1f) << 21;
4555 }
4556 Ok(code)
4557}
4558fn gen_mtdbatl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4559 check_arg_count(args, 2)?;
4560 let mut code = 0x7c1983a6 | modifiers;
4561 {
4563 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
4564 code |= (arg & 0x3) << 17;
4565 }
4566 {
4568 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4569 code |= (arg & 0x1f) << 21;
4570 }
4571 Ok(code)
4572}
4573fn gen_mtdbatu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4574 check_arg_count(args, 2)?;
4575 let mut code = 0x7c1883a6 | modifiers;
4576 {
4578 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
4579 code |= (arg & 0x3) << 17;
4580 }
4581 {
4583 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4584 code |= (arg & 0x1f) << 21;
4585 }
4586 Ok(code)
4587}
4588fn gen_mtdec(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4589 check_arg_count(args, 1)?;
4590 let mut code = 0x7c1603a6 | modifiers;
4591 {
4593 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4594 code |= (arg & 0x1f) << 21;
4595 }
4596 Ok(code)
4597}
4598fn gen_mtdsisr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4599 check_arg_count(args, 1)?;
4600 let mut code = 0x7c1203a6 | modifiers;
4601 {
4603 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4604 code |= (arg & 0x1f) << 21;
4605 }
4606 Ok(code)
4607}
4608fn gen_mtear(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4609 check_arg_count(args, 1)?;
4610 let mut code = 0x7c1a43a6 | modifiers;
4611 {
4613 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4614 code |= (arg & 0x1f) << 21;
4615 }
4616 Ok(code)
4617}
4618fn gen_mtfsb0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4619 check_arg_count(args, 1)?;
4620 let mut code = 0xfc00008c | modifiers;
4621 {
4623 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4624 code |= (arg & 0x1f) << 21;
4625 }
4626 Ok(code)
4627}
4628fn gen_mtfsb1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4629 check_arg_count(args, 1)?;
4630 let mut code = 0xfc00004c | modifiers;
4631 {
4633 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4634 code |= (arg & 0x1f) << 21;
4635 }
4636 Ok(code)
4637}
4638fn gen_mtfsf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4639 check_arg_count(args, 2)?;
4640 let mut code = 0xfc00058e | modifiers;
4641 {
4643 let arg = parse_unsigned(args, 0, 0x0, 0xff)?;
4644 code |= (arg & 0xff) << 17;
4645 }
4646 {
4648 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4649 code |= (arg & 0x1f) << 11;
4650 }
4651 Ok(code)
4652}
4653fn gen_mtfsfi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4654 check_arg_count(args, 2)?;
4655 let mut code = 0xfc00010c | modifiers;
4656 {
4658 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
4659 code |= (arg & 0x7) << 23;
4660 }
4661 {
4663 let arg = parse_unsigned(args, 1, 0x0, 0xf)?;
4664 code |= (arg & 0xf) << 12;
4665 }
4666 Ok(code)
4667}
4668fn gen_mtibatl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4669 check_arg_count(args, 2)?;
4670 let mut code = 0x7c1183a6 | modifiers;
4671 {
4673 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
4674 code |= (arg & 0x3) << 17;
4675 }
4676 {
4678 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4679 code |= (arg & 0x1f) << 21;
4680 }
4681 Ok(code)
4682}
4683fn gen_mtibatu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4684 check_arg_count(args, 2)?;
4685 let mut code = 0x7c1083a6 | modifiers;
4686 {
4688 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
4689 code |= (arg & 0x3) << 17;
4690 }
4691 {
4693 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4694 code |= (arg & 0x1f) << 21;
4695 }
4696 Ok(code)
4697}
4698fn gen_mtlr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4699 check_arg_count(args, 1)?;
4700 let mut code = 0x7c0803a6 | modifiers;
4701 {
4703 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4704 code |= (arg & 0x1f) << 21;
4705 }
4706 Ok(code)
4707}
4708fn gen_mtmsr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4709 check_arg_count(args, 1)?;
4710 let mut code = 0x7c000124 | modifiers;
4711 {
4713 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4714 code |= (arg & 0x1f) << 21;
4715 }
4716 Ok(code)
4717}
4718fn gen_mtmsrd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4719 check_arg_count(args, 2)?;
4720 let mut code = 0x7c000164 | modifiers;
4721 {
4723 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4724 code |= (arg & 0x1f) << 21;
4725 }
4726 {
4728 let arg = parse_unsigned(args, 1, 0x0, 0x1)?;
4729 code |= (arg & 0x1) << 16;
4730 }
4731 Ok(code)
4732}
4733fn gen_mtsdr1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4734 check_arg_count(args, 1)?;
4735 let mut code = 0x7c1903a6 | modifiers;
4736 {
4738 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4739 code |= (arg & 0x1f) << 21;
4740 }
4741 Ok(code)
4742}
4743fn gen_mtspr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4744 check_arg_count(args, 2)?;
4745 let mut code = 0x7c0003a6 | modifiers;
4746 {
4748 let arg = parse_unsigned(args, 0, 0x0, 0x3ff)?;
4749 code |= (arg & 0x1f) << 16;
4750 code |= (arg & 0x3e0) << 6;
4751 }
4752 {
4754 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4755 code |= (arg & 0x1f) << 21;
4756 }
4757 Ok(code)
4758}
4759fn gen_mtsprg(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4760 check_arg_count(args, 2)?;
4761 let mut code = 0x7c1043a6 | modifiers;
4762 {
4764 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
4765 code |= (arg & 0x3) << 16;
4766 }
4767 {
4769 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4770 code |= (arg & 0x1f) << 21;
4771 }
4772 Ok(code)
4773}
4774fn gen_mtsr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4775 check_arg_count(args, 2)?;
4776 let mut code = 0x7c0001a4 | modifiers;
4777 {
4779 let arg = parse_unsigned(args, 0, 0x0, 0xf)?;
4780 code |= (arg & 0xf) << 16;
4781 }
4782 {
4784 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4785 code |= (arg & 0x1f) << 21;
4786 }
4787 Ok(code)
4788}
4789fn gen_mtsrd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4790 check_arg_count(args, 2)?;
4791 let mut code = 0x7c0000a4 | modifiers;
4792 {
4794 let arg = parse_unsigned(args, 0, 0x0, 0xf)?;
4795 code |= (arg & 0xf) << 16;
4796 }
4797 {
4799 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4800 code |= (arg & 0x1f) << 21;
4801 }
4802 Ok(code)
4803}
4804fn gen_mtsrdin(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4805 check_arg_count(args, 2)?;
4806 let mut code = 0x7c0000e4 | modifiers;
4807 {
4809 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4810 code |= (arg & 0x1f) << 21;
4811 }
4812 {
4814 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4815 code |= (arg & 0x1f) << 11;
4816 }
4817 Ok(code)
4818}
4819fn gen_mtsrin(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4820 check_arg_count(args, 2)?;
4821 let mut code = 0x7c0001e4 | modifiers;
4822 {
4824 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4825 code |= (arg & 0x1f) << 21;
4826 }
4827 {
4829 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4830 code |= (arg & 0x1f) << 11;
4831 }
4832 Ok(code)
4833}
4834fn gen_mtsrr0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4835 check_arg_count(args, 1)?;
4836 let mut code = 0x7c1a03a6 | modifiers;
4837 {
4839 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4840 code |= (arg & 0x1f) << 21;
4841 }
4842 Ok(code)
4843}
4844fn gen_mtsrr1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4845 check_arg_count(args, 1)?;
4846 let mut code = 0x7c1b03a6 | modifiers;
4847 {
4849 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4850 code |= (arg & 0x1f) << 21;
4851 }
4852 Ok(code)
4853}
4854fn gen_mttbl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4855 check_arg_count(args, 1)?;
4856 let mut code = 0x7c1c43a6 | modifiers;
4857 {
4859 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4860 code |= (arg & 0x1f) << 21;
4861 }
4862 Ok(code)
4863}
4864fn gen_mttbu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4865 check_arg_count(args, 1)?;
4866 let mut code = 0x7c1d43a6 | modifiers;
4867 {
4869 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4870 code |= (arg & 0x1f) << 21;
4871 }
4872 Ok(code)
4873}
4874fn gen_mtvscr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4875 check_arg_count(args, 1)?;
4876 let mut code = 0x10000644 | modifiers;
4877 {
4879 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4880 code |= (arg & 0x1f) << 11;
4881 }
4882 Ok(code)
4883}
4884fn gen_mtxer(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4885 check_arg_count(args, 1)?;
4886 let mut code = 0x7c0103a6 | modifiers;
4887 {
4889 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4890 code |= (arg & 0x1f) << 21;
4891 }
4892 Ok(code)
4893}
4894fn gen_mulhd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4895 check_arg_count(args, 3)?;
4896 let mut code = 0x7c000092 | modifiers;
4897 {
4899 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4900 code |= (arg & 0x1f) << 21;
4901 }
4902 {
4904 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4905 code |= (arg & 0x1f) << 16;
4906 }
4907 {
4909 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4910 code |= (arg & 0x1f) << 11;
4911 }
4912 Ok(code)
4913}
4914fn gen_mulhdu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4915 check_arg_count(args, 3)?;
4916 let mut code = 0x7c000012 | modifiers;
4917 {
4919 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4920 code |= (arg & 0x1f) << 21;
4921 }
4922 {
4924 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4925 code |= (arg & 0x1f) << 16;
4926 }
4927 {
4929 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4930 code |= (arg & 0x1f) << 11;
4931 }
4932 Ok(code)
4933}
4934fn gen_mulhw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4935 check_arg_count(args, 3)?;
4936 let mut code = 0x7c000096 | modifiers;
4937 {
4939 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4940 code |= (arg & 0x1f) << 21;
4941 }
4942 {
4944 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4945 code |= (arg & 0x1f) << 16;
4946 }
4947 {
4949 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4950 code |= (arg & 0x1f) << 11;
4951 }
4952 Ok(code)
4953}
4954fn gen_mulhwu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4955 check_arg_count(args, 3)?;
4956 let mut code = 0x7c000016 | modifiers;
4957 {
4959 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4960 code |= (arg & 0x1f) << 21;
4961 }
4962 {
4964 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4965 code |= (arg & 0x1f) << 16;
4966 }
4967 {
4969 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4970 code |= (arg & 0x1f) << 11;
4971 }
4972 Ok(code)
4973}
4974fn gen_mulld(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4975 check_arg_count(args, 3)?;
4976 let mut code = 0x7c0001d2 | modifiers;
4977 {
4979 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
4980 code |= (arg & 0x1f) << 21;
4981 }
4982 {
4984 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
4985 code |= (arg & 0x1f) << 16;
4986 }
4987 {
4989 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
4990 code |= (arg & 0x1f) << 11;
4991 }
4992 Ok(code)
4993}
4994fn gen_mulli(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
4995 check_arg_count(args, 3)?;
4996 let mut code = 0x1c000000 | modifiers;
4997 {
4999 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5000 code |= (arg & 0x1f) << 21;
5001 }
5002 {
5004 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5005 code |= (arg & 0x1f) << 16;
5006 }
5007 {
5009 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
5010 code |= arg & 0xffff;
5011 }
5012 Ok(code)
5013}
5014fn gen_mullw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5015 check_arg_count(args, 3)?;
5016 let mut code = 0x7c0001d6 | modifiers;
5017 {
5019 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5020 code |= (arg & 0x1f) << 21;
5021 }
5022 {
5024 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5025 code |= (arg & 0x1f) << 16;
5026 }
5027 {
5029 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5030 code |= (arg & 0x1f) << 11;
5031 }
5032 Ok(code)
5033}
5034fn gen_nand(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5035 check_arg_count(args, 3)?;
5036 let mut code = 0x7c0003b8 | modifiers;
5037 {
5039 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5040 code |= (arg & 0x1f) << 16;
5041 }
5042 {
5044 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5045 code |= (arg & 0x1f) << 21;
5046 }
5047 {
5049 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5050 code |= (arg & 0x1f) << 11;
5051 }
5052 Ok(code)
5053}
5054fn gen_neg(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5055 check_arg_count(args, 2)?;
5056 let mut code = 0x7c0000d0 | modifiers;
5057 {
5059 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5060 code |= (arg & 0x1f) << 21;
5061 }
5062 {
5064 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5065 code |= (arg & 0x1f) << 16;
5066 }
5067 Ok(code)
5068}
5069fn gen_nop(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5070 check_arg_count(args, 0)?;
5071 let mut code = 0x60000000 | modifiers;
5072 Ok(code)
5073}
5074fn gen_nor(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5075 check_arg_count(args, 3)?;
5076 let mut code = 0x7c0000f8 | modifiers;
5077 {
5079 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5080 code |= (arg & 0x1f) << 16;
5081 }
5082 {
5084 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5085 code |= (arg & 0x1f) << 21;
5086 }
5087 {
5089 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5090 code |= (arg & 0x1f) << 11;
5091 }
5092 Ok(code)
5093}
5094fn gen_or(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5095 check_arg_count(args, 3)?;
5096 let mut code = 0x7c000378 | modifiers;
5097 {
5099 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5100 code |= (arg & 0x1f) << 16;
5101 }
5102 {
5104 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5105 code |= (arg & 0x1f) << 21;
5106 }
5107 {
5109 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5110 code |= (arg & 0x1f) << 11;
5111 }
5112 Ok(code)
5113}
5114fn gen_orc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5115 check_arg_count(args, 3)?;
5116 let mut code = 0x7c000338 | modifiers;
5117 {
5119 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5120 code |= (arg & 0x1f) << 16;
5121 }
5122 {
5124 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5125 code |= (arg & 0x1f) << 21;
5126 }
5127 {
5129 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5130 code |= (arg & 0x1f) << 11;
5131 }
5132 Ok(code)
5133}
5134fn gen_ori(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5135 check_arg_count(args, 3)?;
5136 let mut code = 0x60000000 | modifiers;
5137 {
5139 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5140 code |= (arg & 0x1f) << 16;
5141 }
5142 {
5144 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5145 code |= (arg & 0x1f) << 21;
5146 }
5147 {
5149 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
5150 code |= arg & 0xffff;
5151 }
5152 Ok(code)
5153}
5154fn gen_oris(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5155 check_arg_count(args, 3)?;
5156 let mut code = 0x64000000 | modifiers;
5157 {
5159 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5160 code |= (arg & 0x1f) << 16;
5161 }
5162 {
5164 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5165 code |= (arg & 0x1f) << 21;
5166 }
5167 {
5169 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
5170 code |= arg & 0xffff;
5171 }
5172 Ok(code)
5173}
5174fn gen_ps_abs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5175 check_arg_count(args, 2)?;
5176 let mut code = 0x10000210 | modifiers;
5177 {
5179 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5180 code |= (arg & 0x1f) << 21;
5181 }
5182 {
5184 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5185 code |= (arg & 0x1f) << 11;
5186 }
5187 Ok(code)
5188}
5189fn gen_ps_add(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5190 check_arg_count(args, 3)?;
5191 let mut code = 0x1000002a | modifiers;
5192 {
5194 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5195 code |= (arg & 0x1f) << 21;
5196 }
5197 {
5199 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5200 code |= (arg & 0x1f) << 16;
5201 }
5202 {
5204 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5205 code |= (arg & 0x1f) << 11;
5206 }
5207 Ok(code)
5208}
5209fn gen_ps_cmpo0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5210 check_arg_count(args, 3)?;
5211 let mut code = 0x10000040 | modifiers;
5212 {
5214 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
5215 code |= (arg & 0x7) << 23;
5216 }
5217 {
5219 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5220 code |= (arg & 0x1f) << 16;
5221 }
5222 {
5224 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5225 code |= (arg & 0x1f) << 11;
5226 }
5227 Ok(code)
5228}
5229fn gen_ps_cmpo1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5230 check_arg_count(args, 3)?;
5231 let mut code = 0x100000c0 | modifiers;
5232 {
5234 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
5235 code |= (arg & 0x7) << 23;
5236 }
5237 {
5239 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5240 code |= (arg & 0x1f) << 16;
5241 }
5242 {
5244 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5245 code |= (arg & 0x1f) << 11;
5246 }
5247 Ok(code)
5248}
5249fn gen_ps_cmpu0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5250 check_arg_count(args, 3)?;
5251 let mut code = 0x10000000 | modifiers;
5252 {
5254 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
5255 code |= (arg & 0x7) << 23;
5256 }
5257 {
5259 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5260 code |= (arg & 0x1f) << 16;
5261 }
5262 {
5264 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5265 code |= (arg & 0x1f) << 11;
5266 }
5267 Ok(code)
5268}
5269fn gen_ps_cmpu1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5270 check_arg_count(args, 3)?;
5271 let mut code = 0x10000080 | modifiers;
5272 {
5274 let arg = parse_unsigned(args, 0, 0x0, 0x7)?;
5275 code |= (arg & 0x7) << 23;
5276 }
5277 {
5279 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5280 code |= (arg & 0x1f) << 16;
5281 }
5282 {
5284 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5285 code |= (arg & 0x1f) << 11;
5286 }
5287 Ok(code)
5288}
5289fn gen_ps_div(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5290 check_arg_count(args, 3)?;
5291 let mut code = 0x10000024 | modifiers;
5292 {
5294 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5295 code |= (arg & 0x1f) << 21;
5296 }
5297 {
5299 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5300 code |= (arg & 0x1f) << 16;
5301 }
5302 {
5304 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5305 code |= (arg & 0x1f) << 11;
5306 }
5307 Ok(code)
5308}
5309fn gen_ps_madd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5310 check_arg_count(args, 4)?;
5311 let mut code = 0x1000003a | modifiers;
5312 {
5314 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5315 code |= (arg & 0x1f) << 21;
5316 }
5317 {
5319 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5320 code |= (arg & 0x1f) << 16;
5321 }
5322 {
5324 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5325 code |= (arg & 0x1f) << 6;
5326 }
5327 {
5329 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5330 code |= (arg & 0x1f) << 11;
5331 }
5332 Ok(code)
5333}
5334fn gen_ps_madds0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5335 check_arg_count(args, 4)?;
5336 let mut code = 0x1000001c | modifiers;
5337 {
5339 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5340 code |= (arg & 0x1f) << 21;
5341 }
5342 {
5344 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5345 code |= (arg & 0x1f) << 16;
5346 }
5347 {
5349 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5350 code |= (arg & 0x1f) << 6;
5351 }
5352 {
5354 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5355 code |= (arg & 0x1f) << 11;
5356 }
5357 Ok(code)
5358}
5359fn gen_ps_madds1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5360 check_arg_count(args, 4)?;
5361 let mut code = 0x1000001e | modifiers;
5362 {
5364 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5365 code |= (arg & 0x1f) << 21;
5366 }
5367 {
5369 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5370 code |= (arg & 0x1f) << 16;
5371 }
5372 {
5374 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5375 code |= (arg & 0x1f) << 6;
5376 }
5377 {
5379 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5380 code |= (arg & 0x1f) << 11;
5381 }
5382 Ok(code)
5383}
5384fn gen_ps_merge00(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5385 check_arg_count(args, 3)?;
5386 let mut code = 0x10000420 | modifiers;
5387 {
5389 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5390 code |= (arg & 0x1f) << 21;
5391 }
5392 {
5394 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5395 code |= (arg & 0x1f) << 16;
5396 }
5397 {
5399 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5400 code |= (arg & 0x1f) << 11;
5401 }
5402 Ok(code)
5403}
5404fn gen_ps_merge01(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5405 check_arg_count(args, 3)?;
5406 let mut code = 0x10000460 | modifiers;
5407 {
5409 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5410 code |= (arg & 0x1f) << 21;
5411 }
5412 {
5414 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5415 code |= (arg & 0x1f) << 16;
5416 }
5417 {
5419 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5420 code |= (arg & 0x1f) << 11;
5421 }
5422 Ok(code)
5423}
5424fn gen_ps_merge10(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5425 check_arg_count(args, 3)?;
5426 let mut code = 0x100004a0 | modifiers;
5427 {
5429 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5430 code |= (arg & 0x1f) << 21;
5431 }
5432 {
5434 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5435 code |= (arg & 0x1f) << 16;
5436 }
5437 {
5439 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5440 code |= (arg & 0x1f) << 11;
5441 }
5442 Ok(code)
5443}
5444fn gen_ps_merge11(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5445 check_arg_count(args, 3)?;
5446 let mut code = 0x100004e0 | modifiers;
5447 {
5449 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5450 code |= (arg & 0x1f) << 21;
5451 }
5452 {
5454 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5455 code |= (arg & 0x1f) << 16;
5456 }
5457 {
5459 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5460 code |= (arg & 0x1f) << 11;
5461 }
5462 Ok(code)
5463}
5464fn gen_ps_mr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5465 check_arg_count(args, 2)?;
5466 let mut code = 0x10000090 | modifiers;
5467 {
5469 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5470 code |= (arg & 0x1f) << 21;
5471 }
5472 {
5474 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5475 code |= (arg & 0x1f) << 11;
5476 }
5477 Ok(code)
5478}
5479fn gen_ps_msub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5480 check_arg_count(args, 4)?;
5481 let mut code = 0x10000038 | modifiers;
5482 {
5484 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5485 code |= (arg & 0x1f) << 21;
5486 }
5487 {
5489 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5490 code |= (arg & 0x1f) << 16;
5491 }
5492 {
5494 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5495 code |= (arg & 0x1f) << 6;
5496 }
5497 {
5499 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5500 code |= (arg & 0x1f) << 11;
5501 }
5502 Ok(code)
5503}
5504fn gen_ps_mul(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5505 check_arg_count(args, 3)?;
5506 let mut code = 0x10000032 | modifiers;
5507 {
5509 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5510 code |= (arg & 0x1f) << 21;
5511 }
5512 {
5514 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5515 code |= (arg & 0x1f) << 16;
5516 }
5517 {
5519 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5520 code |= (arg & 0x1f) << 6;
5521 }
5522 Ok(code)
5523}
5524fn gen_ps_muls0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5525 check_arg_count(args, 3)?;
5526 let mut code = 0x10000018 | modifiers;
5527 {
5529 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5530 code |= (arg & 0x1f) << 21;
5531 }
5532 {
5534 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5535 code |= (arg & 0x1f) << 16;
5536 }
5537 {
5539 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5540 code |= (arg & 0x1f) << 6;
5541 }
5542 Ok(code)
5543}
5544fn gen_ps_muls1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5545 check_arg_count(args, 3)?;
5546 let mut code = 0x1000001a | modifiers;
5547 {
5549 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5550 code |= (arg & 0x1f) << 21;
5551 }
5552 {
5554 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5555 code |= (arg & 0x1f) << 16;
5556 }
5557 {
5559 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5560 code |= (arg & 0x1f) << 6;
5561 }
5562 Ok(code)
5563}
5564fn gen_ps_nabs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5565 check_arg_count(args, 2)?;
5566 let mut code = 0x10000110 | modifiers;
5567 {
5569 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5570 code |= (arg & 0x1f) << 21;
5571 }
5572 {
5574 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5575 code |= (arg & 0x1f) << 11;
5576 }
5577 Ok(code)
5578}
5579fn gen_ps_neg(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5580 check_arg_count(args, 2)?;
5581 let mut code = 0x10000050 | modifiers;
5582 {
5584 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5585 code |= (arg & 0x1f) << 21;
5586 }
5587 {
5589 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5590 code |= (arg & 0x1f) << 11;
5591 }
5592 Ok(code)
5593}
5594fn gen_ps_nmadd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5595 check_arg_count(args, 4)?;
5596 let mut code = 0x1000003e | modifiers;
5597 {
5599 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5600 code |= (arg & 0x1f) << 21;
5601 }
5602 {
5604 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5605 code |= (arg & 0x1f) << 16;
5606 }
5607 {
5609 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5610 code |= (arg & 0x1f) << 6;
5611 }
5612 {
5614 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5615 code |= (arg & 0x1f) << 11;
5616 }
5617 Ok(code)
5618}
5619fn gen_ps_nmsub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5620 check_arg_count(args, 4)?;
5621 let mut code = 0x1000003c | modifiers;
5622 {
5624 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5625 code |= (arg & 0x1f) << 21;
5626 }
5627 {
5629 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5630 code |= (arg & 0x1f) << 16;
5631 }
5632 {
5634 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5635 code |= (arg & 0x1f) << 6;
5636 }
5637 {
5639 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5640 code |= (arg & 0x1f) << 11;
5641 }
5642 Ok(code)
5643}
5644fn gen_ps_res(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5645 check_arg_count(args, 2)?;
5646 let mut code = 0x10000030 | modifiers;
5647 {
5649 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5650 code |= (arg & 0x1f) << 21;
5651 }
5652 {
5654 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5655 code |= (arg & 0x1f) << 11;
5656 }
5657 Ok(code)
5658}
5659fn gen_ps_rsqrte(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5660 check_arg_count(args, 2)?;
5661 let mut code = 0x10000034 | modifiers;
5662 {
5664 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5665 code |= (arg & 0x1f) << 21;
5666 }
5667 {
5669 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5670 code |= (arg & 0x1f) << 11;
5671 }
5672 Ok(code)
5673}
5674fn gen_ps_sel(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5675 check_arg_count(args, 4)?;
5676 let mut code = 0x1000002e | modifiers;
5677 {
5679 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5680 code |= (arg & 0x1f) << 21;
5681 }
5682 {
5684 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5685 code |= (arg & 0x1f) << 16;
5686 }
5687 {
5689 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5690 code |= (arg & 0x1f) << 6;
5691 }
5692 {
5694 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5695 code |= (arg & 0x1f) << 11;
5696 }
5697 Ok(code)
5698}
5699fn gen_ps_sub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5700 check_arg_count(args, 3)?;
5701 let mut code = 0x10000028 | modifiers;
5702 {
5704 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5705 code |= (arg & 0x1f) << 21;
5706 }
5707 {
5709 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5710 code |= (arg & 0x1f) << 16;
5711 }
5712 {
5714 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5715 code |= (arg & 0x1f) << 11;
5716 }
5717 Ok(code)
5718}
5719fn gen_ps_sum0(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5720 check_arg_count(args, 4)?;
5721 let mut code = 0x10000014 | modifiers;
5722 {
5724 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5725 code |= (arg & 0x1f) << 21;
5726 }
5727 {
5729 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5730 code |= (arg & 0x1f) << 16;
5731 }
5732 {
5734 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5735 code |= (arg & 0x1f) << 6;
5736 }
5737 {
5739 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5740 code |= (arg & 0x1f) << 11;
5741 }
5742 Ok(code)
5743}
5744fn gen_ps_sum1(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5745 check_arg_count(args, 4)?;
5746 let mut code = 0x10000016 | modifiers;
5747 {
5749 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5750 code |= (arg & 0x1f) << 21;
5751 }
5752 {
5754 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5755 code |= (arg & 0x1f) << 16;
5756 }
5757 {
5759 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5760 code |= (arg & 0x1f) << 6;
5761 }
5762 {
5764 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
5765 code |= (arg & 0x1f) << 11;
5766 }
5767 Ok(code)
5768}
5769fn gen_psq_l(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5770 check_arg_count(args, 5)?;
5771 let mut code = 0xe0000000 | modifiers;
5772 {
5774 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5775 code |= (arg & 0x1f) << 21;
5776 }
5777 {
5779 let arg = parse_signed(args, 1, -0x800, 0x800)? as u32;
5780 code |= arg & 0xfff;
5781 }
5782 {
5784 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5785 code |= (arg & 0x1f) << 16;
5786 }
5787 {
5789 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
5790 code |= (arg & 0x1) << 15;
5791 }
5792 {
5794 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
5795 code |= (arg & 0x7) << 12;
5796 }
5797 Ok(code)
5798}
5799fn gen_psq_lu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5800 check_arg_count(args, 5)?;
5801 let mut code = 0xe4000000 | modifiers;
5802 {
5804 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5805 code |= (arg & 0x1f) << 21;
5806 }
5807 {
5809 let arg = parse_signed(args, 1, -0x800, 0x800)? as u32;
5810 code |= arg & 0xfff;
5811 }
5812 {
5814 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5815 code |= (arg & 0x1f) << 16;
5816 }
5817 {
5819 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
5820 code |= (arg & 0x1) << 15;
5821 }
5822 {
5824 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
5825 code |= (arg & 0x7) << 12;
5826 }
5827 Ok(code)
5828}
5829fn gen_psq_lux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5830 check_arg_count(args, 5)?;
5831 let mut code = 0x1000004c | modifiers;
5832 {
5834 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5835 code |= (arg & 0x1f) << 21;
5836 }
5837 {
5839 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5840 code |= (arg & 0x1f) << 16;
5841 }
5842 {
5844 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5845 code |= (arg & 0x1f) << 11;
5846 }
5847 {
5849 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
5850 code |= (arg & 0x1) << 10;
5851 }
5852 {
5854 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
5855 code |= (arg & 0x7) << 7;
5856 }
5857 Ok(code)
5858}
5859fn gen_psq_lx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5860 check_arg_count(args, 5)?;
5861 let mut code = 0x1000000c | modifiers;
5862 {
5864 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5865 code |= (arg & 0x1f) << 21;
5866 }
5867 {
5869 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5870 code |= (arg & 0x1f) << 16;
5871 }
5872 {
5874 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5875 code |= (arg & 0x1f) << 11;
5876 }
5877 {
5879 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
5880 code |= (arg & 0x1) << 10;
5881 }
5882 {
5884 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
5885 code |= (arg & 0x7) << 7;
5886 }
5887 Ok(code)
5888}
5889fn gen_psq_st(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5890 check_arg_count(args, 5)?;
5891 let mut code = 0xf0000000 | modifiers;
5892 {
5894 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5895 code |= (arg & 0x1f) << 21;
5896 }
5897 {
5899 let arg = parse_signed(args, 1, -0x800, 0x800)? as u32;
5900 code |= arg & 0xfff;
5901 }
5902 {
5904 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5905 code |= (arg & 0x1f) << 16;
5906 }
5907 {
5909 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
5910 code |= (arg & 0x1) << 15;
5911 }
5912 {
5914 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
5915 code |= (arg & 0x7) << 12;
5916 }
5917 Ok(code)
5918}
5919fn gen_psq_stu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5920 check_arg_count(args, 5)?;
5921 let mut code = 0xf4000000 | modifiers;
5922 {
5924 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5925 code |= (arg & 0x1f) << 21;
5926 }
5927 {
5929 let arg = parse_signed(args, 1, -0x800, 0x800)? as u32;
5930 code |= arg & 0xfff;
5931 }
5932 {
5934 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5935 code |= (arg & 0x1f) << 16;
5936 }
5937 {
5939 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
5940 code |= (arg & 0x1) << 15;
5941 }
5942 {
5944 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
5945 code |= (arg & 0x7) << 12;
5946 }
5947 Ok(code)
5948}
5949fn gen_psq_stux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5950 check_arg_count(args, 5)?;
5951 let mut code = 0x1000004e | modifiers;
5952 {
5954 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5955 code |= (arg & 0x1f) << 21;
5956 }
5957 {
5959 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5960 code |= (arg & 0x1f) << 16;
5961 }
5962 {
5964 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5965 code |= (arg & 0x1f) << 11;
5966 }
5967 {
5969 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
5970 code |= (arg & 0x1) << 10;
5971 }
5972 {
5974 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
5975 code |= (arg & 0x7) << 7;
5976 }
5977 Ok(code)
5978}
5979fn gen_psq_stx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
5980 check_arg_count(args, 5)?;
5981 let mut code = 0x1000000e | modifiers;
5982 {
5984 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
5985 code |= (arg & 0x1f) << 21;
5986 }
5987 {
5989 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
5990 code |= (arg & 0x1f) << 16;
5991 }
5992 {
5994 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
5995 code |= (arg & 0x1f) << 11;
5996 }
5997 {
5999 let arg = parse_unsigned(args, 3, 0x0, 0x1)?;
6000 code |= (arg & 0x1) << 10;
6001 }
6002 {
6004 let arg = parse_unsigned(args, 4, 0x0, 0x7)?;
6005 code |= (arg & 0x7) << 7;
6006 }
6007 Ok(code)
6008}
6009fn gen_ptesync(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6010 check_arg_count(args, 0)?;
6011 let mut code = 0x7c4004ac | modifiers;
6012 Ok(code)
6013}
6014fn gen_rfi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6015 check_arg_count(args, 0)?;
6016 let mut code = 0x4c000064 | modifiers;
6017 Ok(code)
6018}
6019fn gen_rfid(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6020 check_arg_count(args, 0)?;
6021 let mut code = 0x4c000024 | modifiers;
6022 Ok(code)
6023}
6024fn gen_rldcl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6025 check_arg_count(args, 4)?;
6026 let mut code = 0x78000010 | modifiers;
6027 {
6029 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6030 code |= (arg & 0x1f) << 16;
6031 }
6032 {
6034 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6035 code |= (arg & 0x1f) << 21;
6036 }
6037 {
6039 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6040 code |= (arg & 0x1f) << 11;
6041 }
6042 {
6044 let arg = parse_unsigned(args, 3, 0x0, 0x3f)?;
6045 code |= (arg & 0x1f) << 6;
6046 code |= arg & 0x20;
6047 }
6048 Ok(code)
6049}
6050fn gen_rldcr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6051 check_arg_count(args, 4)?;
6052 let mut code = 0x78000012 | modifiers;
6053 {
6055 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6056 code |= (arg & 0x1f) << 16;
6057 }
6058 {
6060 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6061 code |= (arg & 0x1f) << 21;
6062 }
6063 {
6065 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6066 code |= (arg & 0x1f) << 11;
6067 }
6068 {
6070 let arg = parse_unsigned(args, 3, 0x0, 0x3f)?;
6071 code |= (arg & 0x1f) << 6;
6072 code |= arg & 0x20;
6073 }
6074 Ok(code)
6075}
6076fn gen_rldic(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6077 check_arg_count(args, 4)?;
6078 let mut code = 0x78000008 | modifiers;
6079 {
6081 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6082 code |= (arg & 0x1f) << 16;
6083 }
6084 {
6086 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6087 code |= (arg & 0x1f) << 21;
6088 }
6089 {
6091 let arg = parse_unsigned(args, 2, 0x0, 0x3f)?;
6092 code |= (arg & 0x1f) << 11;
6093 code |= (arg >> 4) & 0x2;
6094 }
6095 {
6097 let arg = parse_unsigned(args, 3, 0x0, 0x3f)?;
6098 code |= (arg & 0x1f) << 6;
6099 code |= arg & 0x20;
6100 }
6101 Ok(code)
6102}
6103fn gen_rldicl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6104 check_arg_count(args, 4)?;
6105 let mut code = 0x78000000 | modifiers;
6106 {
6108 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6109 code |= (arg & 0x1f) << 16;
6110 }
6111 {
6113 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6114 code |= (arg & 0x1f) << 21;
6115 }
6116 {
6118 let arg = parse_unsigned(args, 2, 0x0, 0x3f)?;
6119 code |= (arg & 0x1f) << 11;
6120 code |= (arg >> 4) & 0x2;
6121 }
6122 {
6124 let arg = parse_unsigned(args, 3, 0x0, 0x3f)?;
6125 code |= (arg & 0x1f) << 6;
6126 code |= arg & 0x20;
6127 }
6128 Ok(code)
6129}
6130fn gen_rldicr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6131 check_arg_count(args, 4)?;
6132 let mut code = 0x78000004 | modifiers;
6133 {
6135 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6136 code |= (arg & 0x1f) << 16;
6137 }
6138 {
6140 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6141 code |= (arg & 0x1f) << 21;
6142 }
6143 {
6145 let arg = parse_unsigned(args, 2, 0x0, 0x3f)?;
6146 code |= (arg & 0x1f) << 11;
6147 code |= (arg >> 4) & 0x2;
6148 }
6149 {
6151 let arg = parse_unsigned(args, 3, 0x0, 0x3f)?;
6152 code |= (arg & 0x1f) << 6;
6153 code |= arg & 0x20;
6154 }
6155 Ok(code)
6156}
6157fn gen_rldimi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6158 check_arg_count(args, 4)?;
6159 let mut code = 0x7800000c | modifiers;
6160 {
6162 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6163 code |= (arg & 0x1f) << 16;
6164 }
6165 {
6167 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6168 code |= (arg & 0x1f) << 21;
6169 }
6170 {
6172 let arg = parse_unsigned(args, 2, 0x0, 0x3f)?;
6173 code |= (arg & 0x1f) << 11;
6174 code |= (arg >> 4) & 0x2;
6175 }
6176 {
6178 let arg = parse_unsigned(args, 3, 0x0, 0x3f)?;
6179 code |= (arg & 0x1f) << 6;
6180 code |= arg & 0x20;
6181 }
6182 Ok(code)
6183}
6184fn gen_rlwimi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6185 check_arg_count(args, 5)?;
6186 let mut code = 0x50000000 | modifiers;
6187 {
6189 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6190 code |= (arg & 0x1f) << 16;
6191 }
6192 {
6194 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6195 code |= (arg & 0x1f) << 21;
6196 }
6197 {
6199 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6200 code |= (arg & 0x1f) << 11;
6201 }
6202 {
6204 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
6205 code |= (arg & 0x1f) << 6;
6206 }
6207 {
6209 let arg = parse_unsigned(args, 4, 0x0, 0x1f)?;
6210 code |= (arg & 0x1f) << 1;
6211 }
6212 Ok(code)
6213}
6214fn gen_rlwinm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6215 check_arg_count(args, 5)?;
6216 let mut code = 0x54000000 | modifiers;
6217 {
6219 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6220 code |= (arg & 0x1f) << 16;
6221 }
6222 {
6224 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6225 code |= (arg & 0x1f) << 21;
6226 }
6227 {
6229 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6230 code |= (arg & 0x1f) << 11;
6231 }
6232 {
6234 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
6235 code |= (arg & 0x1f) << 6;
6236 }
6237 {
6239 let arg = parse_unsigned(args, 4, 0x0, 0x1f)?;
6240 code |= (arg & 0x1f) << 1;
6241 }
6242 Ok(code)
6243}
6244fn gen_rlwnm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6245 check_arg_count(args, 5)?;
6246 let mut code = 0x5c000000 | modifiers;
6247 {
6249 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6250 code |= (arg & 0x1f) << 16;
6251 }
6252 {
6254 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6255 code |= (arg & 0x1f) << 21;
6256 }
6257 {
6259 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6260 code |= (arg & 0x1f) << 11;
6261 }
6262 {
6264 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
6265 code |= (arg & 0x1f) << 6;
6266 }
6267 {
6269 let arg = parse_unsigned(args, 4, 0x0, 0x1f)?;
6270 code |= (arg & 0x1f) << 1;
6271 }
6272 Ok(code)
6273}
6274fn gen_rotld(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6275 check_arg_count(args, 3)?;
6276 let mut code = 0x78000010 | modifiers;
6277 {
6279 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6280 code |= (arg & 0x1f) << 16;
6281 }
6282 {
6284 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6285 code |= (arg & 0x1f) << 21;
6286 }
6287 {
6289 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6290 code |= (arg & 0x1f) << 11;
6291 }
6292 Ok(code)
6293}
6294fn gen_rotlw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6295 check_arg_count(args, 3)?;
6296 let mut code = 0x5c00003e | modifiers;
6297 {
6299 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6300 code |= (arg & 0x1f) << 16;
6301 }
6302 {
6304 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6305 code |= (arg & 0x1f) << 21;
6306 }
6307 {
6309 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6310 code |= (arg & 0x1f) << 11;
6311 }
6312 Ok(code)
6313}
6314fn gen_rotlwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6315 check_arg_count(args, 3)?;
6316 let mut code = 0x5400003e | modifiers;
6317 {
6319 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6320 code |= (arg & 0x1f) << 16;
6321 }
6322 {
6324 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6325 code |= (arg & 0x1f) << 21;
6326 }
6327 {
6329 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6330 code |= (arg & 0x1f) << 11;
6331 }
6332 Ok(code)
6333}
6334fn gen_rotrwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6335 check_arg_count(args, 3)?;
6336 let mut code = 0x5400003e | modifiers;
6337 {
6339 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6340 code |= (arg & 0x1f) << 16;
6341 }
6342 {
6344 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6345 code |= (arg & 0x1f) << 21;
6346 }
6347 {
6349 let arg = (32 - parse_unsigned(args, 2, 0x0, 0x1f)?);
6350 code |= (arg & 0x1f) << 11;
6351 }
6352 Ok(code)
6353}
6354fn gen_sc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6355 check_arg_count(args, 0)?;
6356 let mut code = 0x44000002 | modifiers;
6357 Ok(code)
6358}
6359fn gen_slbia(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6360 check_arg_count(args, 0)?;
6361 let mut code = 0x7c0003e4 | modifiers;
6362 Ok(code)
6363}
6364fn gen_slbie(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6365 check_arg_count(args, 1)?;
6366 let mut code = 0x7c000364 | modifiers;
6367 {
6369 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6370 code |= (arg & 0x1f) << 11;
6371 }
6372 Ok(code)
6373}
6374fn gen_sld(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6375 check_arg_count(args, 3)?;
6376 let mut code = 0x7c000036 | modifiers;
6377 {
6379 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6380 code |= (arg & 0x1f) << 16;
6381 }
6382 {
6384 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6385 code |= (arg & 0x1f) << 21;
6386 }
6387 {
6389 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6390 code |= (arg & 0x1f) << 11;
6391 }
6392 Ok(code)
6393}
6394fn gen_slw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6395 check_arg_count(args, 3)?;
6396 let mut code = 0x7c000030 | modifiers;
6397 {
6399 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6400 code |= (arg & 0x1f) << 16;
6401 }
6402 {
6404 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6405 code |= (arg & 0x1f) << 21;
6406 }
6407 {
6409 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6410 code |= (arg & 0x1f) << 11;
6411 }
6412 Ok(code)
6413}
6414fn gen_slwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6415 check_arg_count(args, 3)?;
6416 let mut code = 0x54000000 | modifiers;
6417 {
6419 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6420 code |= (arg & 0x1f) << 16;
6421 }
6422 {
6424 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6425 code |= (arg & 0x1f) << 21;
6426 }
6427 {
6429 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6430 code |= (arg & 0x1f) << 11;
6431 }
6432 {
6434 let arg = (31 - parse_unsigned(args, 2, 0x0, 0x1f)?);
6435 code |= (arg & 0x1f) << 1;
6436 }
6437 Ok(code)
6438}
6439fn gen_srad(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6440 check_arg_count(args, 3)?;
6441 let mut code = 0x7c000634 | modifiers;
6442 {
6444 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6445 code |= (arg & 0x1f) << 16;
6446 }
6447 {
6449 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6450 code |= (arg & 0x1f) << 21;
6451 }
6452 {
6454 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6455 code |= (arg & 0x1f) << 11;
6456 }
6457 Ok(code)
6458}
6459fn gen_sradi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6460 check_arg_count(args, 3)?;
6461 let mut code = 0x7c000674 | modifiers;
6462 {
6464 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6465 code |= (arg & 0x1f) << 16;
6466 }
6467 {
6469 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6470 code |= (arg & 0x1f) << 21;
6471 }
6472 {
6474 let arg = parse_unsigned(args, 2, 0x0, 0x3f)?;
6475 code |= (arg & 0x1f) << 11;
6476 code |= (arg >> 4) & 0x2;
6477 }
6478 Ok(code)
6479}
6480fn gen_sraw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6481 check_arg_count(args, 3)?;
6482 let mut code = 0x7c000630 | modifiers;
6483 {
6485 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6486 code |= (arg & 0x1f) << 16;
6487 }
6488 {
6490 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6491 code |= (arg & 0x1f) << 21;
6492 }
6493 {
6495 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6496 code |= (arg & 0x1f) << 11;
6497 }
6498 Ok(code)
6499}
6500fn gen_srawi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6501 check_arg_count(args, 3)?;
6502 let mut code = 0x7c000670 | modifiers;
6503 {
6505 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6506 code |= (arg & 0x1f) << 16;
6507 }
6508 {
6510 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6511 code |= (arg & 0x1f) << 21;
6512 }
6513 {
6515 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6516 code |= (arg & 0x1f) << 11;
6517 }
6518 Ok(code)
6519}
6520fn gen_srd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6521 check_arg_count(args, 3)?;
6522 let mut code = 0x7c000436 | modifiers;
6523 {
6525 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6526 code |= (arg & 0x1f) << 16;
6527 }
6528 {
6530 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6531 code |= (arg & 0x1f) << 21;
6532 }
6533 {
6535 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6536 code |= (arg & 0x1f) << 11;
6537 }
6538 Ok(code)
6539}
6540fn gen_srw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6541 check_arg_count(args, 3)?;
6542 let mut code = 0x7c000430 | modifiers;
6543 {
6545 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6546 code |= (arg & 0x1f) << 16;
6547 }
6548 {
6550 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6551 code |= (arg & 0x1f) << 21;
6552 }
6553 {
6555 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6556 code |= (arg & 0x1f) << 11;
6557 }
6558 Ok(code)
6559}
6560fn gen_srwi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6561 check_arg_count(args, 3)?;
6562 let mut code = 0x5400003e | modifiers;
6563 {
6565 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6566 code |= (arg & 0x1f) << 16;
6567 }
6568 {
6570 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6571 code |= (arg & 0x1f) << 21;
6572 }
6573 {
6575 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6576 code |= (arg & 0x1f) << 6;
6577 }
6578 {
6580 let arg = (32 - parse_unsigned(args, 2, 0x0, 0x1f)?);
6581 code |= (arg & 0x1f) << 11;
6582 }
6583 Ok(code)
6584}
6585fn gen_stb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6586 check_arg_count(args, 3)?;
6587 let mut code = 0x98000000 | modifiers;
6588 {
6590 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6591 code |= (arg & 0x1f) << 21;
6592 }
6593 {
6595 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6596 code |= arg & 0xffff;
6597 }
6598 {
6600 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6601 code |= (arg & 0x1f) << 16;
6602 }
6603 Ok(code)
6604}
6605fn gen_stbu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6606 check_arg_count(args, 3)?;
6607 let mut code = 0x9c000000 | modifiers;
6608 {
6610 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6611 code |= (arg & 0x1f) << 21;
6612 }
6613 {
6615 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6616 code |= arg & 0xffff;
6617 }
6618 {
6620 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6621 code |= (arg & 0x1f) << 16;
6622 }
6623 Ok(code)
6624}
6625fn gen_stbux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6626 check_arg_count(args, 3)?;
6627 let mut code = 0x7c0001ee | modifiers;
6628 {
6630 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6631 code |= (arg & 0x1f) << 21;
6632 }
6633 {
6635 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6636 code |= (arg & 0x1f) << 16;
6637 }
6638 {
6640 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6641 code |= (arg & 0x1f) << 11;
6642 }
6643 Ok(code)
6644}
6645fn gen_stbx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6646 check_arg_count(args, 3)?;
6647 let mut code = 0x7c0001ae | modifiers;
6648 {
6650 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6651 code |= (arg & 0x1f) << 21;
6652 }
6653 {
6655 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6656 code |= (arg & 0x1f) << 16;
6657 }
6658 {
6660 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6661 code |= (arg & 0x1f) << 11;
6662 }
6663 Ok(code)
6664}
6665fn gen_std(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6666 check_arg_count(args, 3)?;
6667 let mut code = 0xf8000000 | modifiers;
6668 {
6670 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6671 code |= (arg & 0x1f) << 21;
6672 }
6673 {
6675 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6676 code |= arg & 0xfffc;
6677 }
6678 {
6680 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6681 code |= (arg & 0x1f) << 16;
6682 }
6683 Ok(code)
6684}
6685fn gen_stdcx_(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6686 check_arg_count(args, 3)?;
6687 let mut code = 0x7c0001ad | modifiers;
6688 {
6690 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6691 code |= (arg & 0x1f) << 21;
6692 }
6693 {
6695 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6696 code |= (arg & 0x1f) << 16;
6697 }
6698 {
6700 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6701 code |= (arg & 0x1f) << 11;
6702 }
6703 Ok(code)
6704}
6705fn gen_stdu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6706 check_arg_count(args, 3)?;
6707 let mut code = 0xf8000001 | modifiers;
6708 {
6710 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6711 code |= (arg & 0x1f) << 21;
6712 }
6713 {
6715 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6716 code |= arg & 0xfffc;
6717 }
6718 {
6720 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6721 code |= (arg & 0x1f) << 16;
6722 }
6723 Ok(code)
6724}
6725fn gen_stdux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6726 check_arg_count(args, 3)?;
6727 let mut code = 0x7c00016a | modifiers;
6728 {
6730 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6731 code |= (arg & 0x1f) << 21;
6732 }
6733 {
6735 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6736 code |= (arg & 0x1f) << 16;
6737 }
6738 {
6740 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6741 code |= (arg & 0x1f) << 11;
6742 }
6743 Ok(code)
6744}
6745fn gen_stdx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6746 check_arg_count(args, 3)?;
6747 let mut code = 0x7c00012a | modifiers;
6748 {
6750 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6751 code |= (arg & 0x1f) << 21;
6752 }
6753 {
6755 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6756 code |= (arg & 0x1f) << 16;
6757 }
6758 {
6760 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6761 code |= (arg & 0x1f) << 11;
6762 }
6763 Ok(code)
6764}
6765fn gen_stfd(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6766 check_arg_count(args, 3)?;
6767 let mut code = 0xd8000000 | modifiers;
6768 {
6770 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6771 code |= (arg & 0x1f) << 21;
6772 }
6773 {
6775 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6776 code |= arg & 0xffff;
6777 }
6778 {
6780 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6781 code |= (arg & 0x1f) << 16;
6782 }
6783 Ok(code)
6784}
6785fn gen_stfdu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6786 check_arg_count(args, 3)?;
6787 let mut code = 0xdc000000 | modifiers;
6788 {
6790 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6791 code |= (arg & 0x1f) << 21;
6792 }
6793 {
6795 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6796 code |= arg & 0xffff;
6797 }
6798 {
6800 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6801 code |= (arg & 0x1f) << 16;
6802 }
6803 Ok(code)
6804}
6805fn gen_stfdux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6806 check_arg_count(args, 3)?;
6807 let mut code = 0x7c0005ee | modifiers;
6808 {
6810 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6811 code |= (arg & 0x1f) << 21;
6812 }
6813 {
6815 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6816 code |= (arg & 0x1f) << 16;
6817 }
6818 {
6820 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6821 code |= (arg & 0x1f) << 11;
6822 }
6823 Ok(code)
6824}
6825fn gen_stfdx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6826 check_arg_count(args, 3)?;
6827 let mut code = 0x7c0005ae | modifiers;
6828 {
6830 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6831 code |= (arg & 0x1f) << 21;
6832 }
6833 {
6835 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6836 code |= (arg & 0x1f) << 16;
6837 }
6838 {
6840 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6841 code |= (arg & 0x1f) << 11;
6842 }
6843 Ok(code)
6844}
6845fn gen_stfiwx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6846 check_arg_count(args, 3)?;
6847 let mut code = 0x7c0007ae | modifiers;
6848 {
6850 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6851 code |= (arg & 0x1f) << 21;
6852 }
6853 {
6855 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6856 code |= (arg & 0x1f) << 16;
6857 }
6858 {
6860 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6861 code |= (arg & 0x1f) << 11;
6862 }
6863 Ok(code)
6864}
6865fn gen_stfs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6866 check_arg_count(args, 3)?;
6867 let mut code = 0xd0000000 | modifiers;
6868 {
6870 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6871 code |= (arg & 0x1f) << 21;
6872 }
6873 {
6875 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6876 code |= arg & 0xffff;
6877 }
6878 {
6880 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6881 code |= (arg & 0x1f) << 16;
6882 }
6883 Ok(code)
6884}
6885fn gen_stfsu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6886 check_arg_count(args, 3)?;
6887 let mut code = 0xd4000000 | modifiers;
6888 {
6890 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6891 code |= (arg & 0x1f) << 21;
6892 }
6893 {
6895 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6896 code |= arg & 0xffff;
6897 }
6898 {
6900 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6901 code |= (arg & 0x1f) << 16;
6902 }
6903 Ok(code)
6904}
6905fn gen_stfsux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6906 check_arg_count(args, 3)?;
6907 let mut code = 0x7c00056e | modifiers;
6908 {
6910 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6911 code |= (arg & 0x1f) << 21;
6912 }
6913 {
6915 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6916 code |= (arg & 0x1f) << 16;
6917 }
6918 {
6920 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6921 code |= (arg & 0x1f) << 11;
6922 }
6923 Ok(code)
6924}
6925fn gen_stfsx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6926 check_arg_count(args, 3)?;
6927 let mut code = 0x7c00052e | modifiers;
6928 {
6930 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6931 code |= (arg & 0x1f) << 21;
6932 }
6933 {
6935 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6936 code |= (arg & 0x1f) << 16;
6937 }
6938 {
6940 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6941 code |= (arg & 0x1f) << 11;
6942 }
6943 Ok(code)
6944}
6945fn gen_sth(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6946 check_arg_count(args, 3)?;
6947 let mut code = 0xb0000000 | modifiers;
6948 {
6950 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6951 code |= (arg & 0x1f) << 21;
6952 }
6953 {
6955 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6956 code |= arg & 0xffff;
6957 }
6958 {
6960 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6961 code |= (arg & 0x1f) << 16;
6962 }
6963 Ok(code)
6964}
6965fn gen_sthbrx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6966 check_arg_count(args, 3)?;
6967 let mut code = 0x7c00072c | modifiers;
6968 {
6970 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6971 code |= (arg & 0x1f) << 21;
6972 }
6973 {
6975 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
6976 code |= (arg & 0x1f) << 16;
6977 }
6978 {
6980 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
6981 code |= (arg & 0x1f) << 11;
6982 }
6983 Ok(code)
6984}
6985fn gen_sthu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
6986 check_arg_count(args, 3)?;
6987 let mut code = 0xb4000000 | modifiers;
6988 {
6990 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
6991 code |= (arg & 0x1f) << 21;
6992 }
6993 {
6995 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
6996 code |= arg & 0xffff;
6997 }
6998 {
7000 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7001 code |= (arg & 0x1f) << 16;
7002 }
7003 Ok(code)
7004}
7005fn gen_sthux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7006 check_arg_count(args, 3)?;
7007 let mut code = 0x7c00036e | modifiers;
7008 {
7010 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7011 code |= (arg & 0x1f) << 21;
7012 }
7013 {
7015 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7016 code |= (arg & 0x1f) << 16;
7017 }
7018 {
7020 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7021 code |= (arg & 0x1f) << 11;
7022 }
7023 Ok(code)
7024}
7025fn gen_sthx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7026 check_arg_count(args, 3)?;
7027 let mut code = 0x7c00032e | modifiers;
7028 {
7030 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7031 code |= (arg & 0x1f) << 21;
7032 }
7033 {
7035 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7036 code |= (arg & 0x1f) << 16;
7037 }
7038 {
7040 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7041 code |= (arg & 0x1f) << 11;
7042 }
7043 Ok(code)
7044}
7045fn gen_stmw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7046 check_arg_count(args, 3)?;
7047 let mut code = 0xbc000000 | modifiers;
7048 {
7050 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7051 code |= (arg & 0x1f) << 21;
7052 }
7053 {
7055 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7056 code |= arg & 0xffff;
7057 }
7058 {
7060 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7061 code |= (arg & 0x1f) << 16;
7062 }
7063 Ok(code)
7064}
7065fn gen_stswi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7066 check_arg_count(args, 3)?;
7067 let mut code = 0x7c0005aa | modifiers;
7068 {
7070 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7071 code |= (arg & 0x1f) << 21;
7072 }
7073 {
7075 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7076 code |= (arg & 0x1f) << 16;
7077 }
7078 {
7080 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7081 code |= (arg & 0x1f) << 11;
7082 }
7083 Ok(code)
7084}
7085fn gen_stswx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7086 check_arg_count(args, 3)?;
7087 let mut code = 0x7c00052a | modifiers;
7088 {
7090 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7091 code |= (arg & 0x1f) << 21;
7092 }
7093 {
7095 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7096 code |= (arg & 0x1f) << 16;
7097 }
7098 {
7100 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7101 code |= (arg & 0x1f) << 11;
7102 }
7103 Ok(code)
7104}
7105fn gen_stvebx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7106 check_arg_count(args, 3)?;
7107 let mut code = 0x7c00010e | modifiers;
7108 {
7110 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7111 code |= (arg & 0x1f) << 21;
7112 }
7113 {
7115 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7116 code |= (arg & 0x1f) << 16;
7117 }
7118 {
7120 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7121 code |= (arg & 0x1f) << 11;
7122 }
7123 Ok(code)
7124}
7125fn gen_stvehx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7126 check_arg_count(args, 3)?;
7127 let mut code = 0x7c00014e | modifiers;
7128 {
7130 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7131 code |= (arg & 0x1f) << 21;
7132 }
7133 {
7135 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7136 code |= (arg & 0x1f) << 16;
7137 }
7138 {
7140 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7141 code |= (arg & 0x1f) << 11;
7142 }
7143 Ok(code)
7144}
7145fn gen_stvewx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7146 check_arg_count(args, 3)?;
7147 let mut code = 0x7c00018e | modifiers;
7148 {
7150 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7151 code |= (arg & 0x1f) << 21;
7152 }
7153 {
7155 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7156 code |= (arg & 0x1f) << 16;
7157 }
7158 {
7160 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7161 code |= (arg & 0x1f) << 11;
7162 }
7163 Ok(code)
7164}
7165fn gen_stvewx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7166 check_arg_count(args, 3)?;
7167 let mut code = 0x10000183 | modifiers;
7168 {
7170 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
7171 code |= (arg & 0x1f) << 21;
7172 code |= (arg >> 3) & 0xc;
7173 }
7174 {
7176 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7177 code |= (arg & 0x1f) << 16;
7178 }
7179 {
7181 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7182 code |= (arg & 0x1f) << 11;
7183 }
7184 Ok(code)
7185}
7186fn gen_stvlx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7187 check_arg_count(args, 3)?;
7188 let mut code = 0x7c00050e | modifiers;
7189 {
7191 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7192 code |= (arg & 0x1f) << 21;
7193 }
7194 {
7196 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7197 code |= (arg & 0x1f) << 16;
7198 }
7199 {
7201 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7202 code |= (arg & 0x1f) << 11;
7203 }
7204 Ok(code)
7205}
7206fn gen_stvlx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7207 check_arg_count(args, 3)?;
7208 let mut code = 0x10000503 | modifiers;
7209 {
7211 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
7212 code |= (arg & 0x1f) << 21;
7213 code |= (arg >> 3) & 0xc;
7214 }
7215 {
7217 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7218 code |= (arg & 0x1f) << 16;
7219 }
7220 {
7222 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7223 code |= (arg & 0x1f) << 11;
7224 }
7225 Ok(code)
7226}
7227fn gen_stvlxl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7228 check_arg_count(args, 3)?;
7229 let mut code = 0x7c00070e | modifiers;
7230 {
7232 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7233 code |= (arg & 0x1f) << 21;
7234 }
7235 {
7237 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7238 code |= (arg & 0x1f) << 16;
7239 }
7240 {
7242 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7243 code |= (arg & 0x1f) << 11;
7244 }
7245 Ok(code)
7246}
7247fn gen_stvlxl128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7248 check_arg_count(args, 3)?;
7249 let mut code = 0x10000703 | modifiers;
7250 {
7252 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
7253 code |= (arg & 0x1f) << 21;
7254 code |= (arg >> 3) & 0xc;
7255 }
7256 {
7258 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7259 code |= (arg & 0x1f) << 16;
7260 }
7261 {
7263 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7264 code |= (arg & 0x1f) << 11;
7265 }
7266 Ok(code)
7267}
7268fn gen_stvrx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7269 check_arg_count(args, 3)?;
7270 let mut code = 0x7c00054e | modifiers;
7271 {
7273 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7274 code |= (arg & 0x1f) << 21;
7275 }
7276 {
7278 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7279 code |= (arg & 0x1f) << 16;
7280 }
7281 {
7283 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7284 code |= (arg & 0x1f) << 11;
7285 }
7286 Ok(code)
7287}
7288fn gen_stvrx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7289 check_arg_count(args, 3)?;
7290 let mut code = 0x10000543 | modifiers;
7291 {
7293 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
7294 code |= (arg & 0x1f) << 21;
7295 code |= (arg >> 3) & 0xc;
7296 }
7297 {
7299 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7300 code |= (arg & 0x1f) << 16;
7301 }
7302 {
7304 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7305 code |= (arg & 0x1f) << 11;
7306 }
7307 Ok(code)
7308}
7309fn gen_stvrxl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7310 check_arg_count(args, 3)?;
7311 let mut code = 0x7c00074e | modifiers;
7312 {
7314 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7315 code |= (arg & 0x1f) << 21;
7316 }
7317 {
7319 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7320 code |= (arg & 0x1f) << 16;
7321 }
7322 {
7324 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7325 code |= (arg & 0x1f) << 11;
7326 }
7327 Ok(code)
7328}
7329fn gen_stvrxl128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7330 check_arg_count(args, 3)?;
7331 let mut code = 0x10000743 | modifiers;
7332 {
7334 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
7335 code |= (arg & 0x1f) << 21;
7336 code |= (arg >> 3) & 0xc;
7337 }
7338 {
7340 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7341 code |= (arg & 0x1f) << 16;
7342 }
7343 {
7345 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7346 code |= (arg & 0x1f) << 11;
7347 }
7348 Ok(code)
7349}
7350fn gen_stvx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7351 check_arg_count(args, 3)?;
7352 let mut code = 0x7c0001ce | modifiers;
7353 {
7355 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7356 code |= (arg & 0x1f) << 21;
7357 }
7358 {
7360 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7361 code |= (arg & 0x1f) << 16;
7362 }
7363 {
7365 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7366 code |= (arg & 0x1f) << 11;
7367 }
7368 Ok(code)
7369}
7370fn gen_stvx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7371 check_arg_count(args, 3)?;
7372 let mut code = 0x100001c3 | modifiers;
7373 {
7375 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
7376 code |= (arg & 0x1f) << 21;
7377 code |= (arg >> 3) & 0xc;
7378 }
7379 {
7381 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7382 code |= (arg & 0x1f) << 16;
7383 }
7384 {
7386 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7387 code |= (arg & 0x1f) << 11;
7388 }
7389 Ok(code)
7390}
7391fn gen_stvxl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7392 check_arg_count(args, 3)?;
7393 let mut code = 0x7c0003ce | modifiers;
7394 {
7396 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7397 code |= (arg & 0x1f) << 21;
7398 }
7399 {
7401 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7402 code |= (arg & 0x1f) << 16;
7403 }
7404 {
7406 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7407 code |= (arg & 0x1f) << 11;
7408 }
7409 Ok(code)
7410}
7411fn gen_stvxl128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7412 check_arg_count(args, 3)?;
7413 let mut code = 0x100003c3 | modifiers;
7414 {
7416 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
7417 code |= (arg & 0x1f) << 21;
7418 code |= (arg >> 3) & 0xc;
7419 }
7420 {
7422 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7423 code |= (arg & 0x1f) << 16;
7424 }
7425 {
7427 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7428 code |= (arg & 0x1f) << 11;
7429 }
7430 Ok(code)
7431}
7432fn gen_stw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7433 check_arg_count(args, 3)?;
7434 let mut code = 0x90000000 | modifiers;
7435 {
7437 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7438 code |= (arg & 0x1f) << 21;
7439 }
7440 {
7442 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7443 code |= arg & 0xffff;
7444 }
7445 {
7447 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7448 code |= (arg & 0x1f) << 16;
7449 }
7450 Ok(code)
7451}
7452fn gen_stwbrx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7453 check_arg_count(args, 3)?;
7454 let mut code = 0x7c00052c | modifiers;
7455 {
7457 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7458 code |= (arg & 0x1f) << 21;
7459 }
7460 {
7462 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7463 code |= (arg & 0x1f) << 16;
7464 }
7465 {
7467 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7468 code |= (arg & 0x1f) << 11;
7469 }
7470 Ok(code)
7471}
7472fn gen_stwcx_(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7473 check_arg_count(args, 3)?;
7474 let mut code = 0x7c00012d | modifiers;
7475 {
7477 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7478 code |= (arg & 0x1f) << 21;
7479 }
7480 {
7482 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7483 code |= (arg & 0x1f) << 16;
7484 }
7485 {
7487 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7488 code |= (arg & 0x1f) << 11;
7489 }
7490 Ok(code)
7491}
7492fn gen_stwu(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7493 check_arg_count(args, 3)?;
7494 let mut code = 0x94000000 | modifiers;
7495 {
7497 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7498 code |= (arg & 0x1f) << 21;
7499 }
7500 {
7502 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7503 code |= arg & 0xffff;
7504 }
7505 {
7507 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7508 code |= (arg & 0x1f) << 16;
7509 }
7510 Ok(code)
7511}
7512fn gen_stwux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7513 check_arg_count(args, 3)?;
7514 let mut code = 0x7c00016e | modifiers;
7515 {
7517 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7518 code |= (arg & 0x1f) << 21;
7519 }
7520 {
7522 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7523 code |= (arg & 0x1f) << 16;
7524 }
7525 {
7527 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7528 code |= (arg & 0x1f) << 11;
7529 }
7530 Ok(code)
7531}
7532fn gen_stwx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7533 check_arg_count(args, 3)?;
7534 let mut code = 0x7c00012e | modifiers;
7535 {
7537 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7538 code |= (arg & 0x1f) << 21;
7539 }
7540 {
7542 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7543 code |= (arg & 0x1f) << 16;
7544 }
7545 {
7547 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7548 code |= (arg & 0x1f) << 11;
7549 }
7550 Ok(code)
7551}
7552fn gen_subf(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7553 check_arg_count(args, 3)?;
7554 let mut code = 0x7c000050 | modifiers;
7555 {
7557 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7558 code |= (arg & 0x1f) << 21;
7559 }
7560 {
7562 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7563 code |= (arg & 0x1f) << 16;
7564 }
7565 {
7567 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7568 code |= (arg & 0x1f) << 11;
7569 }
7570 Ok(code)
7571}
7572fn gen_subfc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7573 check_arg_count(args, 3)?;
7574 let mut code = 0x7c000010 | modifiers;
7575 {
7577 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7578 code |= (arg & 0x1f) << 21;
7579 }
7580 {
7582 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7583 code |= (arg & 0x1f) << 16;
7584 }
7585 {
7587 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7588 code |= (arg & 0x1f) << 11;
7589 }
7590 Ok(code)
7591}
7592fn gen_subfe(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7593 check_arg_count(args, 3)?;
7594 let mut code = 0x7c000110 | modifiers;
7595 {
7597 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7598 code |= (arg & 0x1f) << 21;
7599 }
7600 {
7602 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7603 code |= (arg & 0x1f) << 16;
7604 }
7605 {
7607 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7608 code |= (arg & 0x1f) << 11;
7609 }
7610 Ok(code)
7611}
7612fn gen_subfic(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7613 check_arg_count(args, 3)?;
7614 let mut code = 0x20000000 | modifiers;
7615 {
7617 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7618 code |= (arg & 0x1f) << 21;
7619 }
7620 {
7622 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7623 code |= (arg & 0x1f) << 16;
7624 }
7625 {
7627 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
7628 code |= arg & 0xffff;
7629 }
7630 Ok(code)
7631}
7632fn gen_subfme(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7633 check_arg_count(args, 2)?;
7634 let mut code = 0x7c0001d0 | modifiers;
7635 {
7637 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7638 code |= (arg & 0x1f) << 21;
7639 }
7640 {
7642 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7643 code |= (arg & 0x1f) << 16;
7644 }
7645 Ok(code)
7646}
7647fn gen_subfze(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7648 check_arg_count(args, 2)?;
7649 let mut code = 0x7c000190 | modifiers;
7650 {
7652 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7653 code |= (arg & 0x1f) << 21;
7654 }
7655 {
7657 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7658 code |= (arg & 0x1f) << 16;
7659 }
7660 Ok(code)
7661}
7662fn gen_subi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7663 check_arg_count(args, 3)?;
7664 let mut code = 0x38000000 | modifiers;
7665 {
7667 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7668 code |= (arg & 0x1f) << 21;
7669 }
7670 {
7672 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7673 code |= (arg & 0x1f) << 16;
7674 }
7675 {
7677 let arg = (-parse_signed(args, 2, -0x8000, 0x8000)?) as u32;
7678 code |= arg & 0xffff;
7679 }
7680 Ok(code)
7681}
7682fn gen_subic(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7683 check_arg_count(args, 3)?;
7684 let mut code = 0x30000000 | modifiers;
7685 {
7687 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7688 code |= (arg & 0x1f) << 21;
7689 }
7690 {
7692 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7693 code |= (arg & 0x1f) << 16;
7694 }
7695 {
7697 let arg = (-parse_signed(args, 2, -0x8000, 0x8000)?) as u32;
7698 code |= arg & 0xffff;
7699 }
7700 Ok(code)
7701}
7702fn gen_subic_(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7703 check_arg_count(args, 3)?;
7704 let mut code = 0x34000000 | modifiers;
7705 {
7707 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7708 code |= (arg & 0x1f) << 21;
7709 }
7710 {
7712 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7713 code |= (arg & 0x1f) << 16;
7714 }
7715 {
7717 let arg = (-parse_signed(args, 2, -0x8000, 0x8000)?) as u32;
7718 code |= arg & 0xffff;
7719 }
7720 Ok(code)
7721}
7722fn gen_subis(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7723 check_arg_count(args, 3)?;
7724 let mut code = 0x3c000000 | modifiers;
7725 {
7727 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7728 code |= (arg & 0x1f) << 21;
7729 }
7730 {
7732 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7733 code |= (arg & 0x1f) << 16;
7734 }
7735 {
7737 let arg = (-parse_signed(args, 2, -0x8000, 0x8000)?) as u32;
7738 code |= arg & 0xffff;
7739 }
7740 Ok(code)
7741}
7742fn gen_sync(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7743 match arg_count(args) {
7744 1 => {
7745 let mut code = 0x7c0004ac | modifiers;
7746 {
7748 let arg = parse_unsigned(args, 0, 0x0, 0x3)?;
7749 code |= (arg & 0x3) << 21;
7750 }
7751 Ok(code)
7752 }
7753 0 => {
7754 let mut code = 0x7c0004ac | modifiers;
7755 Ok(code)
7756 }
7757 value => {
7758 Err(ArgumentError::ArgCount {
7759 value,
7760 expected: 1,
7761 })
7762 }
7763 }
7764}
7765fn gen_td(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7766 check_arg_count(args, 3)?;
7767 let mut code = 0x7c000088 | modifiers;
7768 {
7770 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7771 code |= (arg & 0x1f) << 21;
7772 }
7773 {
7775 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7776 code |= (arg & 0x1f) << 16;
7777 }
7778 {
7780 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7781 code |= (arg & 0x1f) << 11;
7782 }
7783 Ok(code)
7784}
7785fn gen_tdge(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7786 check_arg_count(args, 2)?;
7787 let mut code = 0x7d800088 | modifiers;
7788 {
7790 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7791 code |= (arg & 0x1f) << 16;
7792 }
7793 {
7795 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7796 code |= (arg & 0x1f) << 11;
7797 }
7798 Ok(code)
7799}
7800fn gen_tdi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7801 check_arg_count(args, 3)?;
7802 let mut code = 0x8000000 | modifiers;
7803 {
7805 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7806 code |= (arg & 0x1f) << 21;
7807 }
7808 {
7810 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7811 code |= (arg & 0x1f) << 16;
7812 }
7813 {
7815 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
7816 code |= arg & 0xffff;
7817 }
7818 Ok(code)
7819}
7820fn gen_tdlnl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7821 check_arg_count(args, 2)?;
7822 let mut code = 0x7ca00088 | modifiers;
7823 {
7825 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7826 code |= (arg & 0x1f) << 16;
7827 }
7828 {
7830 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7831 code |= (arg & 0x1f) << 11;
7832 }
7833 Ok(code)
7834}
7835fn gen_tdlti(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7836 check_arg_count(args, 2)?;
7837 let mut code = 0xa000000 | modifiers;
7838 {
7840 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7841 code |= (arg & 0x1f) << 16;
7842 }
7843 {
7845 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7846 code |= arg & 0xffff;
7847 }
7848 Ok(code)
7849}
7850fn gen_tdnei(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7851 check_arg_count(args, 2)?;
7852 let mut code = 0xb000000 | modifiers;
7853 {
7855 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7856 code |= (arg & 0x1f) << 16;
7857 }
7858 {
7860 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7861 code |= arg & 0xffff;
7862 }
7863 Ok(code)
7864}
7865fn gen_tlbie(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7866 check_arg_count(args, 1)?;
7867 let mut code = 0x7c000264 | modifiers;
7868 {
7870 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7871 code |= (arg & 0x1f) << 11;
7872 }
7873 Ok(code)
7874}
7875fn gen_tlbsync(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7876 check_arg_count(args, 0)?;
7877 let mut code = 0x7c00046c | modifiers;
7878 Ok(code)
7879}
7880fn gen_trap(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7881 check_arg_count(args, 0)?;
7882 let mut code = 0x7fe00008 | modifiers;
7883 Ok(code)
7884}
7885fn gen_tw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7886 check_arg_count(args, 3)?;
7887 let mut code = 0x7c000008 | modifiers;
7888 {
7890 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7891 code |= (arg & 0x1f) << 21;
7892 }
7893 {
7895 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7896 code |= (arg & 0x1f) << 16;
7897 }
7898 {
7900 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
7901 code |= (arg & 0x1f) << 11;
7902 }
7903 Ok(code)
7904}
7905fn gen_tweq(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7906 check_arg_count(args, 2)?;
7907 let mut code = 0x7c800008 | modifiers;
7908 {
7910 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7911 code |= (arg & 0x1f) << 16;
7912 }
7913 {
7915 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7916 code |= (arg & 0x1f) << 11;
7917 }
7918 Ok(code)
7919}
7920fn gen_twgti(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7921 check_arg_count(args, 2)?;
7922 let mut code = 0xd000000 | modifiers;
7923 {
7925 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7926 code |= (arg & 0x1f) << 16;
7927 }
7928 {
7930 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7931 code |= arg & 0xffff;
7932 }
7933 Ok(code)
7934}
7935fn gen_twi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7936 check_arg_count(args, 3)?;
7937 let mut code = 0xc000000 | modifiers;
7938 {
7940 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7941 code |= (arg & 0x1f) << 21;
7942 }
7943 {
7945 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7946 code |= (arg & 0x1f) << 16;
7947 }
7948 {
7950 let arg = parse_signed(args, 2, -0x8000, 0x8000)? as u32;
7951 code |= arg & 0xffff;
7952 }
7953 Ok(code)
7954}
7955fn gen_twlge(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7956 check_arg_count(args, 2)?;
7957 let mut code = 0x7ca00008 | modifiers;
7958 {
7960 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7961 code |= (arg & 0x1f) << 16;
7962 }
7963 {
7965 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
7966 code |= (arg & 0x1f) << 11;
7967 }
7968 Ok(code)
7969}
7970fn gen_twllei(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7971 check_arg_count(args, 2)?;
7972 let mut code = 0xcc00000 | modifiers;
7973 {
7975 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7976 code |= (arg & 0x1f) << 16;
7977 }
7978 {
7980 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7981 code |= arg & 0xffff;
7982 }
7983 Ok(code)
7984}
7985fn gen_twui(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
7986 check_arg_count(args, 2)?;
7987 let mut code = 0xfe00000 | modifiers;
7988 {
7990 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
7991 code |= (arg & 0x1f) << 16;
7992 }
7993 {
7995 let arg = parse_signed(args, 1, -0x8000, 0x8000)? as u32;
7996 code |= arg & 0xffff;
7997 }
7998 Ok(code)
7999}
8000fn gen_vaddcuw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8001 check_arg_count(args, 3)?;
8002 let mut code = 0x10000180 | modifiers;
8003 {
8005 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8006 code |= (arg & 0x1f) << 21;
8007 }
8008 {
8010 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8011 code |= (arg & 0x1f) << 16;
8012 }
8013 {
8015 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8016 code |= (arg & 0x1f) << 11;
8017 }
8018 Ok(code)
8019}
8020fn gen_vaddfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8021 check_arg_count(args, 3)?;
8022 let mut code = 0x1000000a | modifiers;
8023 {
8025 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8026 code |= (arg & 0x1f) << 21;
8027 }
8028 {
8030 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8031 code |= (arg & 0x1f) << 16;
8032 }
8033 {
8035 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8036 code |= (arg & 0x1f) << 11;
8037 }
8038 Ok(code)
8039}
8040fn gen_vaddfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8041 check_arg_count(args, 3)?;
8042 let mut code = 0x14000010 | modifiers;
8043 {
8045 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8046 code |= (arg & 0x1f) << 21;
8047 code |= (arg >> 3) & 0xc;
8048 }
8049 {
8051 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8052 code |= (arg & 0x1f) << 16;
8053 code |= arg & 0x20;
8054 code |= (arg & 0x40) << 4;
8055 }
8056 {
8058 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8059 code |= (arg & 0x1f) << 11;
8060 code |= (arg >> 5) & 0x3;
8061 }
8062 Ok(code)
8063}
8064fn gen_vaddsbs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8065 check_arg_count(args, 3)?;
8066 let mut code = 0x10000300 | modifiers;
8067 {
8069 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8070 code |= (arg & 0x1f) << 21;
8071 }
8072 {
8074 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8075 code |= (arg & 0x1f) << 16;
8076 }
8077 {
8079 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8080 code |= (arg & 0x1f) << 11;
8081 }
8082 Ok(code)
8083}
8084fn gen_vaddshs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8085 check_arg_count(args, 3)?;
8086 let mut code = 0x10000340 | modifiers;
8087 {
8089 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8090 code |= (arg & 0x1f) << 21;
8091 }
8092 {
8094 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8095 code |= (arg & 0x1f) << 16;
8096 }
8097 {
8099 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8100 code |= (arg & 0x1f) << 11;
8101 }
8102 Ok(code)
8103}
8104fn gen_vaddsws(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8105 check_arg_count(args, 3)?;
8106 let mut code = 0x10000380 | modifiers;
8107 {
8109 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8110 code |= (arg & 0x1f) << 21;
8111 }
8112 {
8114 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8115 code |= (arg & 0x1f) << 16;
8116 }
8117 {
8119 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8120 code |= (arg & 0x1f) << 11;
8121 }
8122 Ok(code)
8123}
8124fn gen_vaddubm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8125 check_arg_count(args, 3)?;
8126 let mut code = 0x10000000 | modifiers;
8127 {
8129 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8130 code |= (arg & 0x1f) << 21;
8131 }
8132 {
8134 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8135 code |= (arg & 0x1f) << 16;
8136 }
8137 {
8139 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8140 code |= (arg & 0x1f) << 11;
8141 }
8142 Ok(code)
8143}
8144fn gen_vaddubs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8145 check_arg_count(args, 3)?;
8146 let mut code = 0x10000200 | modifiers;
8147 {
8149 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8150 code |= (arg & 0x1f) << 21;
8151 }
8152 {
8154 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8155 code |= (arg & 0x1f) << 16;
8156 }
8157 {
8159 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8160 code |= (arg & 0x1f) << 11;
8161 }
8162 Ok(code)
8163}
8164fn gen_vadduhm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8165 check_arg_count(args, 3)?;
8166 let mut code = 0x10000040 | modifiers;
8167 {
8169 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8170 code |= (arg & 0x1f) << 21;
8171 }
8172 {
8174 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8175 code |= (arg & 0x1f) << 16;
8176 }
8177 {
8179 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8180 code |= (arg & 0x1f) << 11;
8181 }
8182 Ok(code)
8183}
8184fn gen_vadduhs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8185 check_arg_count(args, 3)?;
8186 let mut code = 0x10000240 | modifiers;
8187 {
8189 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8190 code |= (arg & 0x1f) << 21;
8191 }
8192 {
8194 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8195 code |= (arg & 0x1f) << 16;
8196 }
8197 {
8199 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8200 code |= (arg & 0x1f) << 11;
8201 }
8202 Ok(code)
8203}
8204fn gen_vadduwm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8205 check_arg_count(args, 3)?;
8206 let mut code = 0x10000080 | modifiers;
8207 {
8209 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8210 code |= (arg & 0x1f) << 21;
8211 }
8212 {
8214 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8215 code |= (arg & 0x1f) << 16;
8216 }
8217 {
8219 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8220 code |= (arg & 0x1f) << 11;
8221 }
8222 Ok(code)
8223}
8224fn gen_vadduws(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8225 check_arg_count(args, 3)?;
8226 let mut code = 0x10000280 | modifiers;
8227 {
8229 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8230 code |= (arg & 0x1f) << 21;
8231 }
8232 {
8234 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8235 code |= (arg & 0x1f) << 16;
8236 }
8237 {
8239 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8240 code |= (arg & 0x1f) << 11;
8241 }
8242 Ok(code)
8243}
8244fn gen_vand(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8245 check_arg_count(args, 3)?;
8246 let mut code = 0x10000404 | modifiers;
8247 {
8249 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8250 code |= (arg & 0x1f) << 21;
8251 }
8252 {
8254 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8255 code |= (arg & 0x1f) << 16;
8256 }
8257 {
8259 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8260 code |= (arg & 0x1f) << 11;
8261 }
8262 Ok(code)
8263}
8264fn gen_vand128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8265 check_arg_count(args, 3)?;
8266 let mut code = 0x14000210 | modifiers;
8267 {
8269 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8270 code |= (arg & 0x1f) << 21;
8271 code |= (arg >> 3) & 0xc;
8272 }
8273 {
8275 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8276 code |= (arg & 0x1f) << 16;
8277 code |= arg & 0x20;
8278 code |= (arg & 0x40) << 4;
8279 }
8280 {
8282 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8283 code |= (arg & 0x1f) << 11;
8284 code |= (arg >> 5) & 0x3;
8285 }
8286 Ok(code)
8287}
8288fn gen_vandc(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8289 check_arg_count(args, 3)?;
8290 let mut code = 0x10000444 | modifiers;
8291 {
8293 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8294 code |= (arg & 0x1f) << 21;
8295 }
8296 {
8298 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8299 code |= (arg & 0x1f) << 16;
8300 }
8301 {
8303 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8304 code |= (arg & 0x1f) << 11;
8305 }
8306 Ok(code)
8307}
8308fn gen_vandc128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8309 check_arg_count(args, 3)?;
8310 let mut code = 0x14000250 | modifiers;
8311 {
8313 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8314 code |= (arg & 0x1f) << 21;
8315 code |= (arg >> 3) & 0xc;
8316 }
8317 {
8319 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8320 code |= (arg & 0x1f) << 16;
8321 code |= arg & 0x20;
8322 code |= (arg & 0x40) << 4;
8323 }
8324 {
8326 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8327 code |= (arg & 0x1f) << 11;
8328 code |= (arg >> 5) & 0x3;
8329 }
8330 Ok(code)
8331}
8332fn gen_vavgsb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8333 check_arg_count(args, 3)?;
8334 let mut code = 0x10000502 | modifiers;
8335 {
8337 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8338 code |= (arg & 0x1f) << 21;
8339 }
8340 {
8342 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8343 code |= (arg & 0x1f) << 16;
8344 }
8345 {
8347 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8348 code |= (arg & 0x1f) << 11;
8349 }
8350 Ok(code)
8351}
8352fn gen_vavgsh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8353 check_arg_count(args, 3)?;
8354 let mut code = 0x10000542 | modifiers;
8355 {
8357 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8358 code |= (arg & 0x1f) << 21;
8359 }
8360 {
8362 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8363 code |= (arg & 0x1f) << 16;
8364 }
8365 {
8367 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8368 code |= (arg & 0x1f) << 11;
8369 }
8370 Ok(code)
8371}
8372fn gen_vavgsw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8373 check_arg_count(args, 3)?;
8374 let mut code = 0x10000582 | modifiers;
8375 {
8377 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8378 code |= (arg & 0x1f) << 21;
8379 }
8380 {
8382 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8383 code |= (arg & 0x1f) << 16;
8384 }
8385 {
8387 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8388 code |= (arg & 0x1f) << 11;
8389 }
8390 Ok(code)
8391}
8392fn gen_vavgub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8393 check_arg_count(args, 3)?;
8394 let mut code = 0x10000402 | modifiers;
8395 {
8397 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8398 code |= (arg & 0x1f) << 21;
8399 }
8400 {
8402 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8403 code |= (arg & 0x1f) << 16;
8404 }
8405 {
8407 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8408 code |= (arg & 0x1f) << 11;
8409 }
8410 Ok(code)
8411}
8412fn gen_vavguh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8413 check_arg_count(args, 3)?;
8414 let mut code = 0x10000442 | modifiers;
8415 {
8417 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8418 code |= (arg & 0x1f) << 21;
8419 }
8420 {
8422 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8423 code |= (arg & 0x1f) << 16;
8424 }
8425 {
8427 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8428 code |= (arg & 0x1f) << 11;
8429 }
8430 Ok(code)
8431}
8432fn gen_vavguw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8433 check_arg_count(args, 3)?;
8434 let mut code = 0x10000482 | modifiers;
8435 {
8437 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8438 code |= (arg & 0x1f) << 21;
8439 }
8440 {
8442 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8443 code |= (arg & 0x1f) << 16;
8444 }
8445 {
8447 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8448 code |= (arg & 0x1f) << 11;
8449 }
8450 Ok(code)
8451}
8452fn gen_vcfsx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8453 check_arg_count(args, 3)?;
8454 let mut code = 0x1000034a | modifiers;
8455 {
8457 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8458 code |= (arg & 0x1f) << 21;
8459 }
8460 {
8462 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8463 code |= (arg & 0x1f) << 11;
8464 }
8465 {
8467 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8468 code |= (arg & 0x1f) << 16;
8469 }
8470 Ok(code)
8471}
8472fn gen_vcfsx128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8473 check_arg_count(args, 3)?;
8474 let mut code = 0x180002b0 | modifiers;
8475 {
8477 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8478 code |= (arg & 0x1f) << 21;
8479 code |= (arg >> 3) & 0xc;
8480 }
8481 {
8483 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8484 code |= (arg & 0x1f) << 11;
8485 code |= (arg >> 5) & 0x3;
8486 }
8487 {
8489 let arg = parse_signed(args, 2, -0x10, 0x10)? as u32;
8490 code |= (arg & 0x1f) << 16;
8491 }
8492 Ok(code)
8493}
8494fn gen_vcfux(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8495 check_arg_count(args, 3)?;
8496 let mut code = 0x1000030a | modifiers;
8497 {
8499 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8500 code |= (arg & 0x1f) << 21;
8501 }
8502 {
8504 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8505 code |= (arg & 0x1f) << 11;
8506 }
8507 {
8509 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8510 code |= (arg & 0x1f) << 16;
8511 }
8512 Ok(code)
8513}
8514fn gen_vcfux128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8515 check_arg_count(args, 3)?;
8516 let mut code = 0x180002f0 | modifiers;
8517 {
8519 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8520 code |= (arg & 0x1f) << 21;
8521 code |= (arg >> 3) & 0xc;
8522 }
8523 {
8525 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8526 code |= (arg & 0x1f) << 11;
8527 code |= (arg >> 5) & 0x3;
8528 }
8529 {
8531 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8532 code |= (arg & 0x1f) << 16;
8533 }
8534 Ok(code)
8535}
8536fn gen_vcmpbfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8537 check_arg_count(args, 3)?;
8538 let mut code = 0x100003c6 | modifiers;
8539 {
8541 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8542 code |= (arg & 0x1f) << 21;
8543 }
8544 {
8546 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8547 code |= (arg & 0x1f) << 16;
8548 }
8549 {
8551 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8552 code |= (arg & 0x1f) << 11;
8553 }
8554 Ok(code)
8555}
8556fn gen_vcmpbfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8557 check_arg_count(args, 3)?;
8558 let mut code = 0x18000180 | modifiers;
8559 {
8561 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8562 code |= (arg & 0x1f) << 21;
8563 code |= (arg >> 3) & 0xc;
8564 }
8565 {
8567 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8568 code |= (arg & 0x1f) << 16;
8569 code |= arg & 0x20;
8570 code |= (arg & 0x40) << 4;
8571 }
8572 {
8574 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8575 code |= (arg & 0x1f) << 11;
8576 code |= (arg >> 5) & 0x3;
8577 }
8578 Ok(code)
8579}
8580fn gen_vcmpeqfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8581 check_arg_count(args, 3)?;
8582 let mut code = 0x100000c6 | modifiers;
8583 {
8585 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8586 code |= (arg & 0x1f) << 21;
8587 }
8588 {
8590 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8591 code |= (arg & 0x1f) << 16;
8592 }
8593 {
8595 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8596 code |= (arg & 0x1f) << 11;
8597 }
8598 Ok(code)
8599}
8600fn gen_vcmpeqfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8601 check_arg_count(args, 3)?;
8602 let mut code = 0x18000000 | modifiers;
8603 {
8605 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8606 code |= (arg & 0x1f) << 21;
8607 code |= (arg >> 3) & 0xc;
8608 }
8609 {
8611 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8612 code |= (arg & 0x1f) << 16;
8613 code |= arg & 0x20;
8614 code |= (arg & 0x40) << 4;
8615 }
8616 {
8618 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8619 code |= (arg & 0x1f) << 11;
8620 code |= (arg >> 5) & 0x3;
8621 }
8622 Ok(code)
8623}
8624fn gen_vcmpequb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8625 check_arg_count(args, 3)?;
8626 let mut code = 0x10000006 | modifiers;
8627 {
8629 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8630 code |= (arg & 0x1f) << 21;
8631 }
8632 {
8634 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8635 code |= (arg & 0x1f) << 16;
8636 }
8637 {
8639 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8640 code |= (arg & 0x1f) << 11;
8641 }
8642 Ok(code)
8643}
8644fn gen_vcmpequh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8645 check_arg_count(args, 3)?;
8646 let mut code = 0x10000046 | modifiers;
8647 {
8649 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8650 code |= (arg & 0x1f) << 21;
8651 }
8652 {
8654 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8655 code |= (arg & 0x1f) << 16;
8656 }
8657 {
8659 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8660 code |= (arg & 0x1f) << 11;
8661 }
8662 Ok(code)
8663}
8664fn gen_vcmpequw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8665 check_arg_count(args, 3)?;
8666 let mut code = 0x10000086 | modifiers;
8667 {
8669 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8670 code |= (arg & 0x1f) << 21;
8671 }
8672 {
8674 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8675 code |= (arg & 0x1f) << 16;
8676 }
8677 {
8679 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8680 code |= (arg & 0x1f) << 11;
8681 }
8682 Ok(code)
8683}
8684fn gen_vcmpequw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8685 check_arg_count(args, 3)?;
8686 let mut code = 0x18000200 | modifiers;
8687 {
8689 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8690 code |= (arg & 0x1f) << 21;
8691 code |= (arg >> 3) & 0xc;
8692 }
8693 {
8695 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8696 code |= (arg & 0x1f) << 16;
8697 code |= arg & 0x20;
8698 code |= (arg & 0x40) << 4;
8699 }
8700 {
8702 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8703 code |= (arg & 0x1f) << 11;
8704 code |= (arg >> 5) & 0x3;
8705 }
8706 Ok(code)
8707}
8708fn gen_vcmpgefp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8709 check_arg_count(args, 3)?;
8710 let mut code = 0x100001c6 | modifiers;
8711 {
8713 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8714 code |= (arg & 0x1f) << 21;
8715 }
8716 {
8718 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8719 code |= (arg & 0x1f) << 16;
8720 }
8721 {
8723 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8724 code |= (arg & 0x1f) << 11;
8725 }
8726 Ok(code)
8727}
8728fn gen_vcmpgefp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8729 check_arg_count(args, 3)?;
8730 let mut code = 0x18000080 | modifiers;
8731 {
8733 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8734 code |= (arg & 0x1f) << 21;
8735 code |= (arg >> 3) & 0xc;
8736 }
8737 {
8739 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8740 code |= (arg & 0x1f) << 16;
8741 code |= arg & 0x20;
8742 code |= (arg & 0x40) << 4;
8743 }
8744 {
8746 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8747 code |= (arg & 0x1f) << 11;
8748 code |= (arg >> 5) & 0x3;
8749 }
8750 Ok(code)
8751}
8752fn gen_vcmpgtfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8753 check_arg_count(args, 3)?;
8754 let mut code = 0x100002c6 | modifiers;
8755 {
8757 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8758 code |= (arg & 0x1f) << 21;
8759 }
8760 {
8762 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8763 code |= (arg & 0x1f) << 16;
8764 }
8765 {
8767 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8768 code |= (arg & 0x1f) << 11;
8769 }
8770 Ok(code)
8771}
8772fn gen_vcmpgtfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8773 check_arg_count(args, 3)?;
8774 let mut code = 0x18000100 | modifiers;
8775 {
8777 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8778 code |= (arg & 0x1f) << 21;
8779 code |= (arg >> 3) & 0xc;
8780 }
8781 {
8783 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8784 code |= (arg & 0x1f) << 16;
8785 code |= arg & 0x20;
8786 code |= (arg & 0x40) << 4;
8787 }
8788 {
8790 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
8791 code |= (arg & 0x1f) << 11;
8792 code |= (arg >> 5) & 0x3;
8793 }
8794 Ok(code)
8795}
8796fn gen_vcmpgtsb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8797 check_arg_count(args, 3)?;
8798 let mut code = 0x10000306 | modifiers;
8799 {
8801 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8802 code |= (arg & 0x1f) << 21;
8803 }
8804 {
8806 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8807 code |= (arg & 0x1f) << 16;
8808 }
8809 {
8811 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8812 code |= (arg & 0x1f) << 11;
8813 }
8814 Ok(code)
8815}
8816fn gen_vcmpgtsh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8817 check_arg_count(args, 3)?;
8818 let mut code = 0x10000346 | modifiers;
8819 {
8821 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8822 code |= (arg & 0x1f) << 21;
8823 }
8824 {
8826 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8827 code |= (arg & 0x1f) << 16;
8828 }
8829 {
8831 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8832 code |= (arg & 0x1f) << 11;
8833 }
8834 Ok(code)
8835}
8836fn gen_vcmpgtsw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8837 check_arg_count(args, 3)?;
8838 let mut code = 0x10000386 | modifiers;
8839 {
8841 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8842 code |= (arg & 0x1f) << 21;
8843 }
8844 {
8846 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8847 code |= (arg & 0x1f) << 16;
8848 }
8849 {
8851 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8852 code |= (arg & 0x1f) << 11;
8853 }
8854 Ok(code)
8855}
8856fn gen_vcmpgtub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8857 check_arg_count(args, 3)?;
8858 let mut code = 0x10000206 | modifiers;
8859 {
8861 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8862 code |= (arg & 0x1f) << 21;
8863 }
8864 {
8866 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8867 code |= (arg & 0x1f) << 16;
8868 }
8869 {
8871 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8872 code |= (arg & 0x1f) << 11;
8873 }
8874 Ok(code)
8875}
8876fn gen_vcmpgtuh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8877 check_arg_count(args, 3)?;
8878 let mut code = 0x10000246 | modifiers;
8879 {
8881 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8882 code |= (arg & 0x1f) << 21;
8883 }
8884 {
8886 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8887 code |= (arg & 0x1f) << 16;
8888 }
8889 {
8891 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8892 code |= (arg & 0x1f) << 11;
8893 }
8894 Ok(code)
8895}
8896fn gen_vcmpgtuw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8897 check_arg_count(args, 3)?;
8898 let mut code = 0x10000286 | modifiers;
8899 {
8901 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8902 code |= (arg & 0x1f) << 21;
8903 }
8904 {
8906 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8907 code |= (arg & 0x1f) << 16;
8908 }
8909 {
8911 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8912 code |= (arg & 0x1f) << 11;
8913 }
8914 Ok(code)
8915}
8916fn gen_vctsxs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8917 check_arg_count(args, 3)?;
8918 let mut code = 0x100003ca | modifiers;
8919 {
8921 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8922 code |= (arg & 0x1f) << 21;
8923 }
8924 {
8926 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8927 code |= (arg & 0x1f) << 11;
8928 }
8929 {
8931 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8932 code |= (arg & 0x1f) << 16;
8933 }
8934 Ok(code)
8935}
8936fn gen_vctsxs128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8937 check_arg_count(args, 3)?;
8938 let mut code = 0x18000230 | modifiers;
8939 {
8941 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8942 code |= (arg & 0x1f) << 21;
8943 code |= (arg >> 3) & 0xc;
8944 }
8945 {
8947 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8948 code |= (arg & 0x1f) << 11;
8949 code |= (arg >> 5) & 0x3;
8950 }
8951 {
8953 let arg = parse_signed(args, 2, -0x10, 0x10)? as u32;
8954 code |= (arg & 0x1f) << 16;
8955 }
8956 Ok(code)
8957}
8958fn gen_vctuxs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8959 check_arg_count(args, 3)?;
8960 let mut code = 0x1000038a | modifiers;
8961 {
8963 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
8964 code |= (arg & 0x1f) << 21;
8965 }
8966 {
8968 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
8969 code |= (arg & 0x1f) << 11;
8970 }
8971 {
8973 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8974 code |= (arg & 0x1f) << 16;
8975 }
8976 Ok(code)
8977}
8978fn gen_vctuxs128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
8979 check_arg_count(args, 3)?;
8980 let mut code = 0x18000270 | modifiers;
8981 {
8983 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
8984 code |= (arg & 0x1f) << 21;
8985 code |= (arg >> 3) & 0xc;
8986 }
8987 {
8989 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
8990 code |= (arg & 0x1f) << 11;
8991 code |= (arg >> 5) & 0x3;
8992 }
8993 {
8995 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
8996 code |= (arg & 0x1f) << 16;
8997 }
8998 Ok(code)
8999}
9000fn gen_vexptefp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9001 check_arg_count(args, 2)?;
9002 let mut code = 0x1000018a | modifiers;
9003 {
9005 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9006 code |= (arg & 0x1f) << 21;
9007 }
9008 {
9010 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9011 code |= (arg & 0x1f) << 11;
9012 }
9013 Ok(code)
9014}
9015fn gen_vexptefp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9016 check_arg_count(args, 2)?;
9017 let mut code = 0x180006b0 | modifiers;
9018 {
9020 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9021 code |= (arg & 0x1f) << 21;
9022 code |= (arg >> 3) & 0xc;
9023 }
9024 {
9026 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9027 code |= (arg & 0x1f) << 11;
9028 code |= (arg >> 5) & 0x3;
9029 }
9030 Ok(code)
9031}
9032fn gen_vlogefp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9033 check_arg_count(args, 2)?;
9034 let mut code = 0x100001ca | modifiers;
9035 {
9037 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9038 code |= (arg & 0x1f) << 21;
9039 }
9040 {
9042 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9043 code |= (arg & 0x1f) << 11;
9044 }
9045 Ok(code)
9046}
9047fn gen_vlogefp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9048 check_arg_count(args, 2)?;
9049 let mut code = 0x180006f0 | modifiers;
9050 {
9052 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9053 code |= (arg & 0x1f) << 21;
9054 code |= (arg >> 3) & 0xc;
9055 }
9056 {
9058 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9059 code |= (arg & 0x1f) << 11;
9060 code |= (arg >> 5) & 0x3;
9061 }
9062 Ok(code)
9063}
9064fn gen_vmaddcfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9065 check_arg_count(args, 3)?;
9066 let mut code = 0x14000110 | modifiers;
9067 {
9069 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9070 code |= (arg & 0x1f) << 21;
9071 code |= (arg >> 3) & 0xc;
9072 }
9073 {
9075 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9076 code |= (arg & 0x1f) << 16;
9077 code |= arg & 0x20;
9078 code |= (arg & 0x40) << 4;
9079 }
9080 {
9082 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9083 code |= (arg & 0x1f) << 11;
9084 code |= (arg >> 5) & 0x3;
9085 }
9086 Ok(code)
9087}
9088fn gen_vmaddfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9089 check_arg_count(args, 4)?;
9090 let mut code = 0x1000002e | modifiers;
9091 {
9093 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9094 code |= (arg & 0x1f) << 21;
9095 }
9096 {
9098 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9099 code |= (arg & 0x1f) << 16;
9100 }
9101 {
9103 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9104 code |= (arg & 0x1f) << 6;
9105 }
9106 {
9108 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9109 code |= (arg & 0x1f) << 11;
9110 }
9111 Ok(code)
9112}
9113fn gen_vmaddfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9114 check_arg_count(args, 3)?;
9115 let mut code = 0x140000d0 | modifiers;
9116 {
9118 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9119 code |= (arg & 0x1f) << 21;
9120 code |= (arg >> 3) & 0xc;
9121 }
9122 {
9124 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9125 code |= (arg & 0x1f) << 16;
9126 code |= arg & 0x20;
9127 code |= (arg & 0x40) << 4;
9128 }
9129 {
9131 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9132 code |= (arg & 0x1f) << 11;
9133 code |= (arg >> 5) & 0x3;
9134 }
9135 Ok(code)
9136}
9137fn gen_vmaxfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9138 check_arg_count(args, 3)?;
9139 let mut code = 0x1000040a | modifiers;
9140 {
9142 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9143 code |= (arg & 0x1f) << 21;
9144 }
9145 {
9147 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9148 code |= (arg & 0x1f) << 16;
9149 }
9150 {
9152 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9153 code |= (arg & 0x1f) << 11;
9154 }
9155 Ok(code)
9156}
9157fn gen_vmaxfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9158 check_arg_count(args, 3)?;
9159 let mut code = 0x18000280 | modifiers;
9160 {
9162 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9163 code |= (arg & 0x1f) << 21;
9164 code |= (arg >> 3) & 0xc;
9165 }
9166 {
9168 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9169 code |= (arg & 0x1f) << 16;
9170 code |= arg & 0x20;
9171 code |= (arg & 0x40) << 4;
9172 }
9173 {
9175 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9176 code |= (arg & 0x1f) << 11;
9177 code |= (arg >> 5) & 0x3;
9178 }
9179 Ok(code)
9180}
9181fn gen_vmaxsb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9182 check_arg_count(args, 3)?;
9183 let mut code = 0x10000102 | modifiers;
9184 {
9186 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9187 code |= (arg & 0x1f) << 21;
9188 }
9189 {
9191 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9192 code |= (arg & 0x1f) << 16;
9193 }
9194 {
9196 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9197 code |= (arg & 0x1f) << 11;
9198 }
9199 Ok(code)
9200}
9201fn gen_vmaxsh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9202 check_arg_count(args, 3)?;
9203 let mut code = 0x10000142 | modifiers;
9204 {
9206 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9207 code |= (arg & 0x1f) << 21;
9208 }
9209 {
9211 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9212 code |= (arg & 0x1f) << 16;
9213 }
9214 {
9216 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9217 code |= (arg & 0x1f) << 11;
9218 }
9219 Ok(code)
9220}
9221fn gen_vmaxsw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9222 check_arg_count(args, 3)?;
9223 let mut code = 0x10000182 | modifiers;
9224 {
9226 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9227 code |= (arg & 0x1f) << 21;
9228 }
9229 {
9231 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9232 code |= (arg & 0x1f) << 16;
9233 }
9234 {
9236 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9237 code |= (arg & 0x1f) << 11;
9238 }
9239 Ok(code)
9240}
9241fn gen_vmaxub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9242 check_arg_count(args, 3)?;
9243 let mut code = 0x10000002 | modifiers;
9244 {
9246 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9247 code |= (arg & 0x1f) << 21;
9248 }
9249 {
9251 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9252 code |= (arg & 0x1f) << 16;
9253 }
9254 {
9256 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9257 code |= (arg & 0x1f) << 11;
9258 }
9259 Ok(code)
9260}
9261fn gen_vmaxuh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9262 check_arg_count(args, 3)?;
9263 let mut code = 0x10000042 | modifiers;
9264 {
9266 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9267 code |= (arg & 0x1f) << 21;
9268 }
9269 {
9271 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9272 code |= (arg & 0x1f) << 16;
9273 }
9274 {
9276 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9277 code |= (arg & 0x1f) << 11;
9278 }
9279 Ok(code)
9280}
9281fn gen_vmaxuw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9282 check_arg_count(args, 3)?;
9283 let mut code = 0x10000082 | modifiers;
9284 {
9286 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9287 code |= (arg & 0x1f) << 21;
9288 }
9289 {
9291 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9292 code |= (arg & 0x1f) << 16;
9293 }
9294 {
9296 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9297 code |= (arg & 0x1f) << 11;
9298 }
9299 Ok(code)
9300}
9301fn gen_vmhaddshs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9302 check_arg_count(args, 4)?;
9303 let mut code = 0x10000020 | modifiers;
9304 {
9306 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9307 code |= (arg & 0x1f) << 21;
9308 }
9309 {
9311 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9312 code |= (arg & 0x1f) << 16;
9313 }
9314 {
9316 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9317 code |= (arg & 0x1f) << 11;
9318 }
9319 {
9321 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9322 code |= (arg & 0x1f) << 6;
9323 }
9324 Ok(code)
9325}
9326fn gen_vmhraddshs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9327 check_arg_count(args, 4)?;
9328 let mut code = 0x10000021 | modifiers;
9329 {
9331 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9332 code |= (arg & 0x1f) << 21;
9333 }
9334 {
9336 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9337 code |= (arg & 0x1f) << 16;
9338 }
9339 {
9341 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9342 code |= (arg & 0x1f) << 11;
9343 }
9344 {
9346 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9347 code |= (arg & 0x1f) << 6;
9348 }
9349 Ok(code)
9350}
9351fn gen_vminfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9352 check_arg_count(args, 3)?;
9353 let mut code = 0x1000044a | modifiers;
9354 {
9356 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9357 code |= (arg & 0x1f) << 21;
9358 }
9359 {
9361 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9362 code |= (arg & 0x1f) << 16;
9363 }
9364 {
9366 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9367 code |= (arg & 0x1f) << 11;
9368 }
9369 Ok(code)
9370}
9371fn gen_vminfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9372 check_arg_count(args, 3)?;
9373 let mut code = 0x180002c0 | modifiers;
9374 {
9376 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9377 code |= (arg & 0x1f) << 21;
9378 code |= (arg >> 3) & 0xc;
9379 }
9380 {
9382 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9383 code |= (arg & 0x1f) << 16;
9384 code |= arg & 0x20;
9385 code |= (arg & 0x40) << 4;
9386 }
9387 {
9389 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9390 code |= (arg & 0x1f) << 11;
9391 code |= (arg >> 5) & 0x3;
9392 }
9393 Ok(code)
9394}
9395fn gen_vminsb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9396 check_arg_count(args, 3)?;
9397 let mut code = 0x10000302 | modifiers;
9398 {
9400 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9401 code |= (arg & 0x1f) << 21;
9402 }
9403 {
9405 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9406 code |= (arg & 0x1f) << 16;
9407 }
9408 {
9410 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9411 code |= (arg & 0x1f) << 11;
9412 }
9413 Ok(code)
9414}
9415fn gen_vminsh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9416 check_arg_count(args, 3)?;
9417 let mut code = 0x10000342 | modifiers;
9418 {
9420 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9421 code |= (arg & 0x1f) << 21;
9422 }
9423 {
9425 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9426 code |= (arg & 0x1f) << 16;
9427 }
9428 {
9430 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9431 code |= (arg & 0x1f) << 11;
9432 }
9433 Ok(code)
9434}
9435fn gen_vminsw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9436 check_arg_count(args, 3)?;
9437 let mut code = 0x10000382 | modifiers;
9438 {
9440 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9441 code |= (arg & 0x1f) << 21;
9442 }
9443 {
9445 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9446 code |= (arg & 0x1f) << 16;
9447 }
9448 {
9450 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9451 code |= (arg & 0x1f) << 11;
9452 }
9453 Ok(code)
9454}
9455fn gen_vminub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9456 check_arg_count(args, 3)?;
9457 let mut code = 0x10000202 | modifiers;
9458 {
9460 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9461 code |= (arg & 0x1f) << 21;
9462 }
9463 {
9465 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9466 code |= (arg & 0x1f) << 16;
9467 }
9468 {
9470 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9471 code |= (arg & 0x1f) << 11;
9472 }
9473 Ok(code)
9474}
9475fn gen_vminuh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9476 check_arg_count(args, 3)?;
9477 let mut code = 0x10000242 | modifiers;
9478 {
9480 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9481 code |= (arg & 0x1f) << 21;
9482 }
9483 {
9485 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9486 code |= (arg & 0x1f) << 16;
9487 }
9488 {
9490 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9491 code |= (arg & 0x1f) << 11;
9492 }
9493 Ok(code)
9494}
9495fn gen_vminuw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9496 check_arg_count(args, 3)?;
9497 let mut code = 0x10000282 | modifiers;
9498 {
9500 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9501 code |= (arg & 0x1f) << 21;
9502 }
9503 {
9505 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9506 code |= (arg & 0x1f) << 16;
9507 }
9508 {
9510 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9511 code |= (arg & 0x1f) << 11;
9512 }
9513 Ok(code)
9514}
9515fn gen_vmladduhm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9516 check_arg_count(args, 4)?;
9517 let mut code = 0x10000022 | modifiers;
9518 {
9520 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9521 code |= (arg & 0x1f) << 21;
9522 }
9523 {
9525 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9526 code |= (arg & 0x1f) << 16;
9527 }
9528 {
9530 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9531 code |= (arg & 0x1f) << 11;
9532 }
9533 {
9535 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9536 code |= (arg & 0x1f) << 6;
9537 }
9538 Ok(code)
9539}
9540fn gen_vmr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9541 check_arg_count(args, 2)?;
9542 let mut code = 0x10000484 | modifiers;
9543 {
9545 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9546 code |= (arg & 0x1f) << 21;
9547 }
9548 {
9550 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9551 code |= (arg & 0x1f) << 16;
9552 }
9553 {
9555 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9556 code |= (arg & 0x1f) << 11;
9557 }
9558 Ok(code)
9559}
9560fn gen_vmrghb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9561 check_arg_count(args, 3)?;
9562 let mut code = 0x1000000c | modifiers;
9563 {
9565 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9566 code |= (arg & 0x1f) << 21;
9567 }
9568 {
9570 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9571 code |= (arg & 0x1f) << 16;
9572 }
9573 {
9575 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9576 code |= (arg & 0x1f) << 11;
9577 }
9578 Ok(code)
9579}
9580fn gen_vmrghh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9581 check_arg_count(args, 3)?;
9582 let mut code = 0x1000004c | modifiers;
9583 {
9585 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9586 code |= (arg & 0x1f) << 21;
9587 }
9588 {
9590 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9591 code |= (arg & 0x1f) << 16;
9592 }
9593 {
9595 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9596 code |= (arg & 0x1f) << 11;
9597 }
9598 Ok(code)
9599}
9600fn gen_vmrghw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9601 check_arg_count(args, 3)?;
9602 let mut code = 0x1000008c | modifiers;
9603 {
9605 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9606 code |= (arg & 0x1f) << 21;
9607 }
9608 {
9610 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9611 code |= (arg & 0x1f) << 16;
9612 }
9613 {
9615 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9616 code |= (arg & 0x1f) << 11;
9617 }
9618 Ok(code)
9619}
9620fn gen_vmrghw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9621 check_arg_count(args, 3)?;
9622 let mut code = 0x18000300 | modifiers;
9623 {
9625 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9626 code |= (arg & 0x1f) << 21;
9627 code |= (arg >> 3) & 0xc;
9628 }
9629 {
9631 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9632 code |= (arg & 0x1f) << 16;
9633 code |= arg & 0x20;
9634 code |= (arg & 0x40) << 4;
9635 }
9636 {
9638 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9639 code |= (arg & 0x1f) << 11;
9640 code |= (arg >> 5) & 0x3;
9641 }
9642 Ok(code)
9643}
9644fn gen_vmrglb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9645 check_arg_count(args, 3)?;
9646 let mut code = 0x1000010c | modifiers;
9647 {
9649 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9650 code |= (arg & 0x1f) << 21;
9651 }
9652 {
9654 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9655 code |= (arg & 0x1f) << 16;
9656 }
9657 {
9659 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9660 code |= (arg & 0x1f) << 11;
9661 }
9662 Ok(code)
9663}
9664fn gen_vmrglh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9665 check_arg_count(args, 3)?;
9666 let mut code = 0x1000014c | modifiers;
9667 {
9669 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9670 code |= (arg & 0x1f) << 21;
9671 }
9672 {
9674 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9675 code |= (arg & 0x1f) << 16;
9676 }
9677 {
9679 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9680 code |= (arg & 0x1f) << 11;
9681 }
9682 Ok(code)
9683}
9684fn gen_vmrglw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9685 check_arg_count(args, 3)?;
9686 let mut code = 0x1000018c | modifiers;
9687 {
9689 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9690 code |= (arg & 0x1f) << 21;
9691 }
9692 {
9694 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9695 code |= (arg & 0x1f) << 16;
9696 }
9697 {
9699 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9700 code |= (arg & 0x1f) << 11;
9701 }
9702 Ok(code)
9703}
9704fn gen_vmrglw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9705 check_arg_count(args, 3)?;
9706 let mut code = 0x18000340 | modifiers;
9707 {
9709 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9710 code |= (arg & 0x1f) << 21;
9711 code |= (arg >> 3) & 0xc;
9712 }
9713 {
9715 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9716 code |= (arg & 0x1f) << 16;
9717 code |= arg & 0x20;
9718 code |= (arg & 0x40) << 4;
9719 }
9720 {
9722 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9723 code |= (arg & 0x1f) << 11;
9724 code |= (arg >> 5) & 0x3;
9725 }
9726 Ok(code)
9727}
9728fn gen_vmsum3fp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9729 check_arg_count(args, 3)?;
9730 let mut code = 0x14000190 | modifiers;
9731 {
9733 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9734 code |= (arg & 0x1f) << 21;
9735 code |= (arg >> 3) & 0xc;
9736 }
9737 {
9739 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9740 code |= (arg & 0x1f) << 16;
9741 code |= arg & 0x20;
9742 code |= (arg & 0x40) << 4;
9743 }
9744 {
9746 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9747 code |= (arg & 0x1f) << 11;
9748 code |= (arg >> 5) & 0x3;
9749 }
9750 Ok(code)
9751}
9752fn gen_vmsum4fp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9753 check_arg_count(args, 3)?;
9754 let mut code = 0x140001d0 | modifiers;
9755 {
9757 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
9758 code |= (arg & 0x1f) << 21;
9759 code |= (arg >> 3) & 0xc;
9760 }
9761 {
9763 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
9764 code |= (arg & 0x1f) << 16;
9765 code |= arg & 0x20;
9766 code |= (arg & 0x40) << 4;
9767 }
9768 {
9770 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
9771 code |= (arg & 0x1f) << 11;
9772 code |= (arg >> 5) & 0x3;
9773 }
9774 Ok(code)
9775}
9776fn gen_vmsummbm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9777 check_arg_count(args, 4)?;
9778 let mut code = 0x10000025 | modifiers;
9779 {
9781 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9782 code |= (arg & 0x1f) << 21;
9783 }
9784 {
9786 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9787 code |= (arg & 0x1f) << 16;
9788 }
9789 {
9791 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9792 code |= (arg & 0x1f) << 11;
9793 }
9794 {
9796 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9797 code |= (arg & 0x1f) << 6;
9798 }
9799 Ok(code)
9800}
9801fn gen_vmsumshm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9802 check_arg_count(args, 4)?;
9803 let mut code = 0x10000028 | modifiers;
9804 {
9806 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9807 code |= (arg & 0x1f) << 21;
9808 }
9809 {
9811 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9812 code |= (arg & 0x1f) << 16;
9813 }
9814 {
9816 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9817 code |= (arg & 0x1f) << 11;
9818 }
9819 {
9821 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9822 code |= (arg & 0x1f) << 6;
9823 }
9824 Ok(code)
9825}
9826fn gen_vmsumshs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9827 check_arg_count(args, 4)?;
9828 let mut code = 0x10000029 | modifiers;
9829 {
9831 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9832 code |= (arg & 0x1f) << 21;
9833 }
9834 {
9836 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9837 code |= (arg & 0x1f) << 16;
9838 }
9839 {
9841 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9842 code |= (arg & 0x1f) << 11;
9843 }
9844 {
9846 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9847 code |= (arg & 0x1f) << 6;
9848 }
9849 Ok(code)
9850}
9851fn gen_vmsumubm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9852 check_arg_count(args, 4)?;
9853 let mut code = 0x10000024 | modifiers;
9854 {
9856 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9857 code |= (arg & 0x1f) << 21;
9858 }
9859 {
9861 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9862 code |= (arg & 0x1f) << 16;
9863 }
9864 {
9866 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9867 code |= (arg & 0x1f) << 11;
9868 }
9869 {
9871 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9872 code |= (arg & 0x1f) << 6;
9873 }
9874 Ok(code)
9875}
9876fn gen_vmsumuhm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9877 check_arg_count(args, 4)?;
9878 let mut code = 0x10000026 | modifiers;
9879 {
9881 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9882 code |= (arg & 0x1f) << 21;
9883 }
9884 {
9886 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9887 code |= (arg & 0x1f) << 16;
9888 }
9889 {
9891 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9892 code |= (arg & 0x1f) << 11;
9893 }
9894 {
9896 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9897 code |= (arg & 0x1f) << 6;
9898 }
9899 Ok(code)
9900}
9901fn gen_vmsumuhs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9902 check_arg_count(args, 4)?;
9903 let mut code = 0x10000027 | modifiers;
9904 {
9906 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9907 code |= (arg & 0x1f) << 21;
9908 }
9909 {
9911 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9912 code |= (arg & 0x1f) << 16;
9913 }
9914 {
9916 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9917 code |= (arg & 0x1f) << 11;
9918 }
9919 {
9921 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
9922 code |= (arg & 0x1f) << 6;
9923 }
9924 Ok(code)
9925}
9926fn gen_vmulesb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9927 check_arg_count(args, 3)?;
9928 let mut code = 0x10000308 | modifiers;
9929 {
9931 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9932 code |= (arg & 0x1f) << 21;
9933 }
9934 {
9936 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9937 code |= (arg & 0x1f) << 16;
9938 }
9939 {
9941 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9942 code |= (arg & 0x1f) << 11;
9943 }
9944 Ok(code)
9945}
9946fn gen_vmulesh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9947 check_arg_count(args, 3)?;
9948 let mut code = 0x10000348 | modifiers;
9949 {
9951 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9952 code |= (arg & 0x1f) << 21;
9953 }
9954 {
9956 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9957 code |= (arg & 0x1f) << 16;
9958 }
9959 {
9961 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9962 code |= (arg & 0x1f) << 11;
9963 }
9964 Ok(code)
9965}
9966fn gen_vmuleub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9967 check_arg_count(args, 3)?;
9968 let mut code = 0x10000208 | modifiers;
9969 {
9971 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9972 code |= (arg & 0x1f) << 21;
9973 }
9974 {
9976 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9977 code |= (arg & 0x1f) << 16;
9978 }
9979 {
9981 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
9982 code |= (arg & 0x1f) << 11;
9983 }
9984 Ok(code)
9985}
9986fn gen_vmuleuh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
9987 check_arg_count(args, 3)?;
9988 let mut code = 0x10000248 | modifiers;
9989 {
9991 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
9992 code |= (arg & 0x1f) << 21;
9993 }
9994 {
9996 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
9997 code |= (arg & 0x1f) << 16;
9998 }
9999 {
10001 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10002 code |= (arg & 0x1f) << 11;
10003 }
10004 Ok(code)
10005}
10006fn gen_vmulfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10007 check_arg_count(args, 3)?;
10008 let mut code = 0x14000090 | modifiers;
10009 {
10011 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10012 code |= (arg & 0x1f) << 21;
10013 code |= (arg >> 3) & 0xc;
10014 }
10015 {
10017 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10018 code |= (arg & 0x1f) << 16;
10019 code |= arg & 0x20;
10020 code |= (arg & 0x40) << 4;
10021 }
10022 {
10024 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10025 code |= (arg & 0x1f) << 11;
10026 code |= (arg >> 5) & 0x3;
10027 }
10028 Ok(code)
10029}
10030fn gen_vmulosb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10031 check_arg_count(args, 3)?;
10032 let mut code = 0x10000108 | modifiers;
10033 {
10035 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10036 code |= (arg & 0x1f) << 21;
10037 }
10038 {
10040 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10041 code |= (arg & 0x1f) << 16;
10042 }
10043 {
10045 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10046 code |= (arg & 0x1f) << 11;
10047 }
10048 Ok(code)
10049}
10050fn gen_vmulosh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10051 check_arg_count(args, 3)?;
10052 let mut code = 0x10000148 | modifiers;
10053 {
10055 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10056 code |= (arg & 0x1f) << 21;
10057 }
10058 {
10060 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10061 code |= (arg & 0x1f) << 16;
10062 }
10063 {
10065 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10066 code |= (arg & 0x1f) << 11;
10067 }
10068 Ok(code)
10069}
10070fn gen_vmuloub(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10071 check_arg_count(args, 3)?;
10072 let mut code = 0x10000008 | modifiers;
10073 {
10075 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10076 code |= (arg & 0x1f) << 21;
10077 }
10078 {
10080 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10081 code |= (arg & 0x1f) << 16;
10082 }
10083 {
10085 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10086 code |= (arg & 0x1f) << 11;
10087 }
10088 Ok(code)
10089}
10090fn gen_vmulouh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10091 check_arg_count(args, 3)?;
10092 let mut code = 0x10000048 | modifiers;
10093 {
10095 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10096 code |= (arg & 0x1f) << 21;
10097 }
10098 {
10100 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10101 code |= (arg & 0x1f) << 16;
10102 }
10103 {
10105 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10106 code |= (arg & 0x1f) << 11;
10107 }
10108 Ok(code)
10109}
10110fn gen_vnmsubfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10111 check_arg_count(args, 4)?;
10112 let mut code = 0x1000002f | modifiers;
10113 {
10115 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10116 code |= (arg & 0x1f) << 21;
10117 }
10118 {
10120 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10121 code |= (arg & 0x1f) << 16;
10122 }
10123 {
10125 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10126 code |= (arg & 0x1f) << 6;
10127 }
10128 {
10130 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
10131 code |= (arg & 0x1f) << 11;
10132 }
10133 Ok(code)
10134}
10135fn gen_vnmsubfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10136 check_arg_count(args, 3)?;
10137 let mut code = 0x14000150 | modifiers;
10138 {
10140 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10141 code |= (arg & 0x1f) << 21;
10142 code |= (arg >> 3) & 0xc;
10143 }
10144 {
10146 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10147 code |= (arg & 0x1f) << 16;
10148 code |= arg & 0x20;
10149 code |= (arg & 0x40) << 4;
10150 }
10151 {
10153 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10154 code |= (arg & 0x1f) << 11;
10155 code |= (arg >> 5) & 0x3;
10156 }
10157 Ok(code)
10158}
10159fn gen_vnor(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10160 check_arg_count(args, 3)?;
10161 let mut code = 0x10000504 | modifiers;
10162 {
10164 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10165 code |= (arg & 0x1f) << 21;
10166 }
10167 {
10169 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10170 code |= (arg & 0x1f) << 16;
10171 }
10172 {
10174 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10175 code |= (arg & 0x1f) << 11;
10176 }
10177 Ok(code)
10178}
10179fn gen_vnor128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10180 check_arg_count(args, 3)?;
10181 let mut code = 0x14000290 | modifiers;
10182 {
10184 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10185 code |= (arg & 0x1f) << 21;
10186 code |= (arg >> 3) & 0xc;
10187 }
10188 {
10190 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10191 code |= (arg & 0x1f) << 16;
10192 code |= arg & 0x20;
10193 code |= (arg & 0x40) << 4;
10194 }
10195 {
10197 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10198 code |= (arg & 0x1f) << 11;
10199 code |= (arg >> 5) & 0x3;
10200 }
10201 Ok(code)
10202}
10203fn gen_vnot(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10204 check_arg_count(args, 2)?;
10205 let mut code = 0x10000504 | modifiers;
10206 {
10208 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10209 code |= (arg & 0x1f) << 21;
10210 }
10211 {
10213 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10214 code |= (arg & 0x1f) << 16;
10215 }
10216 {
10218 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10219 code |= (arg & 0x1f) << 11;
10220 }
10221 Ok(code)
10222}
10223fn gen_vor(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10224 check_arg_count(args, 3)?;
10225 let mut code = 0x10000484 | modifiers;
10226 {
10228 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10229 code |= (arg & 0x1f) << 21;
10230 }
10231 {
10233 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10234 code |= (arg & 0x1f) << 16;
10235 }
10236 {
10238 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10239 code |= (arg & 0x1f) << 11;
10240 }
10241 Ok(code)
10242}
10243fn gen_vor128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10244 check_arg_count(args, 3)?;
10245 let mut code = 0x140002d0 | modifiers;
10246 {
10248 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10249 code |= (arg & 0x1f) << 21;
10250 code |= (arg >> 3) & 0xc;
10251 }
10252 {
10254 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10255 code |= (arg & 0x1f) << 16;
10256 code |= arg & 0x20;
10257 code |= (arg & 0x40) << 4;
10258 }
10259 {
10261 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10262 code |= (arg & 0x1f) << 11;
10263 code |= (arg >> 5) & 0x3;
10264 }
10265 Ok(code)
10266}
10267fn gen_vperm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10268 check_arg_count(args, 4)?;
10269 let mut code = 0x1000002b | modifiers;
10270 {
10272 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10273 code |= (arg & 0x1f) << 21;
10274 }
10275 {
10277 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10278 code |= (arg & 0x1f) << 16;
10279 }
10280 {
10282 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10283 code |= (arg & 0x1f) << 11;
10284 }
10285 {
10287 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
10288 code |= (arg & 0x1f) << 6;
10289 }
10290 Ok(code)
10291}
10292fn gen_vperm128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10293 check_arg_count(args, 4)?;
10294 let mut code = 0x14000000 | modifiers;
10295 {
10297 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10298 code |= (arg & 0x1f) << 21;
10299 code |= (arg >> 3) & 0xc;
10300 }
10301 {
10303 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10304 code |= (arg & 0x1f) << 16;
10305 code |= arg & 0x20;
10306 code |= (arg & 0x40) << 4;
10307 }
10308 {
10310 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10311 code |= (arg & 0x1f) << 11;
10312 code |= (arg >> 5) & 0x3;
10313 }
10314 {
10316 let arg = parse_unsigned(args, 3, 0x0, 0x7)?;
10317 code |= (arg & 0x7) << 6;
10318 }
10319 Ok(code)
10320}
10321fn gen_vpermwi128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10322 check_arg_count(args, 3)?;
10323 let mut code = 0x18000210 | modifiers;
10324 {
10326 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10327 code |= (arg & 0x1f) << 21;
10328 code |= (arg >> 3) & 0xc;
10329 }
10330 {
10332 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10333 code |= (arg & 0x1f) << 11;
10334 code |= (arg >> 5) & 0x3;
10335 }
10336 {
10338 let arg = parse_unsigned(args, 2, 0x0, 0xff)?;
10339 code |= (arg & 0x1f) << 16;
10340 code |= (arg & 0xe0) << 1;
10341 }
10342 Ok(code)
10343}
10344fn gen_vpkd3d128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10345 check_arg_count(args, 5)?;
10346 let mut code = 0x18000610 | modifiers;
10347 {
10349 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10350 code |= (arg & 0x1f) << 21;
10351 code |= (arg >> 3) & 0xc;
10352 }
10353 {
10355 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10356 code |= (arg & 0x1f) << 11;
10357 code |= (arg >> 5) & 0x3;
10358 }
10359 {
10361 let arg = parse_unsigned(args, 2, 0x0, 0x7)?;
10362 code |= (arg & 0x7) << 18;
10363 }
10364 {
10366 let arg = parse_unsigned(args, 3, 0x0, 0x3)?;
10367 code |= (arg & 0x3) << 16;
10368 }
10369 {
10371 let arg = parse_unsigned(args, 4, 0x0, 0x3)?;
10372 code |= (arg & 0x3) << 6;
10373 }
10374 Ok(code)
10375}
10376fn gen_vpkpx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10377 check_arg_count(args, 3)?;
10378 let mut code = 0x1000030e | modifiers;
10379 {
10381 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10382 code |= (arg & 0x1f) << 21;
10383 }
10384 {
10386 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10387 code |= (arg & 0x1f) << 16;
10388 }
10389 {
10391 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10392 code |= (arg & 0x1f) << 11;
10393 }
10394 Ok(code)
10395}
10396fn gen_vpkshss(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10397 check_arg_count(args, 3)?;
10398 let mut code = 0x1000018e | modifiers;
10399 {
10401 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10402 code |= (arg & 0x1f) << 21;
10403 }
10404 {
10406 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10407 code |= (arg & 0x1f) << 16;
10408 }
10409 {
10411 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10412 code |= (arg & 0x1f) << 11;
10413 }
10414 Ok(code)
10415}
10416fn gen_vpkshss128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10417 check_arg_count(args, 3)?;
10418 let mut code = 0x14000200 | modifiers;
10419 {
10421 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10422 code |= (arg & 0x1f) << 21;
10423 code |= (arg >> 3) & 0xc;
10424 }
10425 {
10427 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10428 code |= (arg & 0x1f) << 16;
10429 code |= arg & 0x20;
10430 code |= (arg & 0x40) << 4;
10431 }
10432 {
10434 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10435 code |= (arg & 0x1f) << 11;
10436 code |= (arg >> 5) & 0x3;
10437 }
10438 Ok(code)
10439}
10440fn gen_vpkshus(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10441 check_arg_count(args, 3)?;
10442 let mut code = 0x1000010e | modifiers;
10443 {
10445 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10446 code |= (arg & 0x1f) << 21;
10447 }
10448 {
10450 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10451 code |= (arg & 0x1f) << 16;
10452 }
10453 {
10455 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10456 code |= (arg & 0x1f) << 11;
10457 }
10458 Ok(code)
10459}
10460fn gen_vpkshus128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10461 check_arg_count(args, 3)?;
10462 let mut code = 0x14000240 | modifiers;
10463 {
10465 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10466 code |= (arg & 0x1f) << 21;
10467 code |= (arg >> 3) & 0xc;
10468 }
10469 {
10471 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10472 code |= (arg & 0x1f) << 16;
10473 code |= arg & 0x20;
10474 code |= (arg & 0x40) << 4;
10475 }
10476 {
10478 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10479 code |= (arg & 0x1f) << 11;
10480 code |= (arg >> 5) & 0x3;
10481 }
10482 Ok(code)
10483}
10484fn gen_vpkswss(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10485 check_arg_count(args, 3)?;
10486 let mut code = 0x100001ce | modifiers;
10487 {
10489 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10490 code |= (arg & 0x1f) << 21;
10491 }
10492 {
10494 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10495 code |= (arg & 0x1f) << 16;
10496 }
10497 {
10499 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10500 code |= (arg & 0x1f) << 11;
10501 }
10502 Ok(code)
10503}
10504fn gen_vpkswss128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10505 check_arg_count(args, 3)?;
10506 let mut code = 0x14000280 | modifiers;
10507 {
10509 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10510 code |= (arg & 0x1f) << 21;
10511 code |= (arg >> 3) & 0xc;
10512 }
10513 {
10515 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10516 code |= (arg & 0x1f) << 16;
10517 code |= arg & 0x20;
10518 code |= (arg & 0x40) << 4;
10519 }
10520 {
10522 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10523 code |= (arg & 0x1f) << 11;
10524 code |= (arg >> 5) & 0x3;
10525 }
10526 Ok(code)
10527}
10528fn gen_vpkswus(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10529 check_arg_count(args, 3)?;
10530 let mut code = 0x1000014e | modifiers;
10531 {
10533 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10534 code |= (arg & 0x1f) << 21;
10535 }
10536 {
10538 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10539 code |= (arg & 0x1f) << 16;
10540 }
10541 {
10543 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10544 code |= (arg & 0x1f) << 11;
10545 }
10546 Ok(code)
10547}
10548fn gen_vpkswus128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10549 check_arg_count(args, 3)?;
10550 let mut code = 0x140002c0 | modifiers;
10551 {
10553 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10554 code |= (arg & 0x1f) << 21;
10555 code |= (arg >> 3) & 0xc;
10556 }
10557 {
10559 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10560 code |= (arg & 0x1f) << 16;
10561 code |= arg & 0x20;
10562 code |= (arg & 0x40) << 4;
10563 }
10564 {
10566 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10567 code |= (arg & 0x1f) << 11;
10568 code |= (arg >> 5) & 0x3;
10569 }
10570 Ok(code)
10571}
10572fn gen_vpkuhum(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10573 check_arg_count(args, 3)?;
10574 let mut code = 0x1000000e | modifiers;
10575 {
10577 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10578 code |= (arg & 0x1f) << 21;
10579 }
10580 {
10582 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10583 code |= (arg & 0x1f) << 16;
10584 }
10585 {
10587 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10588 code |= (arg & 0x1f) << 11;
10589 }
10590 Ok(code)
10591}
10592fn gen_vpkuhum128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10593 check_arg_count(args, 3)?;
10594 let mut code = 0x14000300 | modifiers;
10595 {
10597 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10598 code |= (arg & 0x1f) << 21;
10599 code |= (arg >> 3) & 0xc;
10600 }
10601 {
10603 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10604 code |= (arg & 0x1f) << 16;
10605 code |= arg & 0x20;
10606 code |= (arg & 0x40) << 4;
10607 }
10608 {
10610 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10611 code |= (arg & 0x1f) << 11;
10612 code |= (arg >> 5) & 0x3;
10613 }
10614 Ok(code)
10615}
10616fn gen_vpkuhus(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10617 check_arg_count(args, 3)?;
10618 let mut code = 0x1000008e | modifiers;
10619 {
10621 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10622 code |= (arg & 0x1f) << 21;
10623 }
10624 {
10626 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10627 code |= (arg & 0x1f) << 16;
10628 }
10629 {
10631 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10632 code |= (arg & 0x1f) << 11;
10633 }
10634 Ok(code)
10635}
10636fn gen_vpkuhus128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10637 check_arg_count(args, 3)?;
10638 let mut code = 0x14000340 | modifiers;
10639 {
10641 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10642 code |= (arg & 0x1f) << 21;
10643 code |= (arg >> 3) & 0xc;
10644 }
10645 {
10647 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10648 code |= (arg & 0x1f) << 16;
10649 code |= arg & 0x20;
10650 code |= (arg & 0x40) << 4;
10651 }
10652 {
10654 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10655 code |= (arg & 0x1f) << 11;
10656 code |= (arg >> 5) & 0x3;
10657 }
10658 Ok(code)
10659}
10660fn gen_vpkuwum(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10661 check_arg_count(args, 3)?;
10662 let mut code = 0x1000004e | modifiers;
10663 {
10665 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10666 code |= (arg & 0x1f) << 21;
10667 }
10668 {
10670 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10671 code |= (arg & 0x1f) << 16;
10672 }
10673 {
10675 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10676 code |= (arg & 0x1f) << 11;
10677 }
10678 Ok(code)
10679}
10680fn gen_vpkuwum128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10681 check_arg_count(args, 3)?;
10682 let mut code = 0x14000380 | modifiers;
10683 {
10685 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10686 code |= (arg & 0x1f) << 21;
10687 code |= (arg >> 3) & 0xc;
10688 }
10689 {
10691 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10692 code |= (arg & 0x1f) << 16;
10693 code |= arg & 0x20;
10694 code |= (arg & 0x40) << 4;
10695 }
10696 {
10698 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10699 code |= (arg & 0x1f) << 11;
10700 code |= (arg >> 5) & 0x3;
10701 }
10702 Ok(code)
10703}
10704fn gen_vpkuwus(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10705 check_arg_count(args, 3)?;
10706 let mut code = 0x100000ce | modifiers;
10707 {
10709 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10710 code |= (arg & 0x1f) << 21;
10711 }
10712 {
10714 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10715 code |= (arg & 0x1f) << 16;
10716 }
10717 {
10719 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10720 code |= (arg & 0x1f) << 11;
10721 }
10722 Ok(code)
10723}
10724fn gen_vpkuwus128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10725 check_arg_count(args, 3)?;
10726 let mut code = 0x140003c0 | modifiers;
10727 {
10729 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10730 code |= (arg & 0x1f) << 21;
10731 code |= (arg >> 3) & 0xc;
10732 }
10733 {
10735 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10736 code |= (arg & 0x1f) << 16;
10737 code |= arg & 0x20;
10738 code |= (arg & 0x40) << 4;
10739 }
10740 {
10742 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
10743 code |= (arg & 0x1f) << 11;
10744 code |= (arg >> 5) & 0x3;
10745 }
10746 Ok(code)
10747}
10748fn gen_vrefp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10749 check_arg_count(args, 2)?;
10750 let mut code = 0x1000010a | modifiers;
10751 {
10753 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10754 code |= (arg & 0x1f) << 21;
10755 }
10756 {
10758 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10759 code |= (arg & 0x1f) << 11;
10760 }
10761 Ok(code)
10762}
10763fn gen_vrefp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10764 check_arg_count(args, 2)?;
10765 let mut code = 0x18000630 | modifiers;
10766 {
10768 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10769 code |= (arg & 0x1f) << 21;
10770 code |= (arg >> 3) & 0xc;
10771 }
10772 {
10774 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10775 code |= (arg & 0x1f) << 11;
10776 code |= (arg >> 5) & 0x3;
10777 }
10778 Ok(code)
10779}
10780fn gen_vrfim(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10781 check_arg_count(args, 2)?;
10782 let mut code = 0x100002ca | modifiers;
10783 {
10785 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10786 code |= (arg & 0x1f) << 21;
10787 }
10788 {
10790 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10791 code |= (arg & 0x1f) << 11;
10792 }
10793 Ok(code)
10794}
10795fn gen_vrfim128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10796 check_arg_count(args, 2)?;
10797 let mut code = 0x18000330 | modifiers;
10798 {
10800 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10801 code |= (arg & 0x1f) << 21;
10802 code |= (arg >> 3) & 0xc;
10803 }
10804 {
10806 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10807 code |= (arg & 0x1f) << 11;
10808 code |= (arg >> 5) & 0x3;
10809 }
10810 Ok(code)
10811}
10812fn gen_vrfin(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10813 check_arg_count(args, 2)?;
10814 let mut code = 0x1000020a | modifiers;
10815 {
10817 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10818 code |= (arg & 0x1f) << 21;
10819 }
10820 {
10822 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10823 code |= (arg & 0x1f) << 11;
10824 }
10825 Ok(code)
10826}
10827fn gen_vrfin128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10828 check_arg_count(args, 2)?;
10829 let mut code = 0x18000370 | modifiers;
10830 {
10832 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10833 code |= (arg & 0x1f) << 21;
10834 code |= (arg >> 3) & 0xc;
10835 }
10836 {
10838 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10839 code |= (arg & 0x1f) << 11;
10840 code |= (arg >> 5) & 0x3;
10841 }
10842 Ok(code)
10843}
10844fn gen_vrfip(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10845 check_arg_count(args, 2)?;
10846 let mut code = 0x1000028a | modifiers;
10847 {
10849 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10850 code |= (arg & 0x1f) << 21;
10851 }
10852 {
10854 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10855 code |= (arg & 0x1f) << 11;
10856 }
10857 Ok(code)
10858}
10859fn gen_vrfip128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10860 check_arg_count(args, 2)?;
10861 let mut code = 0x180003b0 | modifiers;
10862 {
10864 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10865 code |= (arg & 0x1f) << 21;
10866 code |= (arg >> 3) & 0xc;
10867 }
10868 {
10870 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10871 code |= (arg & 0x1f) << 11;
10872 code |= (arg >> 5) & 0x3;
10873 }
10874 Ok(code)
10875}
10876fn gen_vrfiz(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10877 check_arg_count(args, 2)?;
10878 let mut code = 0x1000024a | modifiers;
10879 {
10881 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10882 code |= (arg & 0x1f) << 21;
10883 }
10884 {
10886 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10887 code |= (arg & 0x1f) << 11;
10888 }
10889 Ok(code)
10890}
10891fn gen_vrfiz128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10892 check_arg_count(args, 2)?;
10893 let mut code = 0x180003f0 | modifiers;
10894 {
10896 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10897 code |= (arg & 0x1f) << 21;
10898 code |= (arg >> 3) & 0xc;
10899 }
10900 {
10902 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10903 code |= (arg & 0x1f) << 11;
10904 code |= (arg >> 5) & 0x3;
10905 }
10906 Ok(code)
10907}
10908fn gen_vrlb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10909 check_arg_count(args, 3)?;
10910 let mut code = 0x10000004 | modifiers;
10911 {
10913 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10914 code |= (arg & 0x1f) << 21;
10915 }
10916 {
10918 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10919 code |= (arg & 0x1f) << 16;
10920 }
10921 {
10923 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10924 code |= (arg & 0x1f) << 11;
10925 }
10926 Ok(code)
10927}
10928fn gen_vrlh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10929 check_arg_count(args, 3)?;
10930 let mut code = 0x10000044 | modifiers;
10931 {
10933 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10934 code |= (arg & 0x1f) << 21;
10935 }
10936 {
10938 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10939 code |= (arg & 0x1f) << 16;
10940 }
10941 {
10943 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10944 code |= (arg & 0x1f) << 11;
10945 }
10946 Ok(code)
10947}
10948fn gen_vrlimi128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10949 check_arg_count(args, 4)?;
10950 let mut code = 0x18000710 | modifiers;
10951 {
10953 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
10954 code |= (arg & 0x1f) << 21;
10955 code |= (arg >> 3) & 0xc;
10956 }
10957 {
10959 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
10960 code |= (arg & 0x1f) << 11;
10961 code |= (arg >> 5) & 0x3;
10962 }
10963 {
10965 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10966 code |= (arg & 0x1f) << 16;
10967 }
10968 {
10970 let arg = parse_unsigned(args, 3, 0x0, 0x3)?;
10971 code |= (arg & 0x3) << 6;
10972 }
10973 Ok(code)
10974}
10975fn gen_vrlw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10976 check_arg_count(args, 3)?;
10977 let mut code = 0x10000084 | modifiers;
10978 {
10980 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
10981 code |= (arg & 0x1f) << 21;
10982 }
10983 {
10985 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
10986 code |= (arg & 0x1f) << 16;
10987 }
10988 {
10990 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
10991 code |= (arg & 0x1f) << 11;
10992 }
10993 Ok(code)
10994}
10995fn gen_vrlw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
10996 check_arg_count(args, 3)?;
10997 let mut code = 0x18000050 | modifiers;
10998 {
11000 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11001 code |= (arg & 0x1f) << 21;
11002 code |= (arg >> 3) & 0xc;
11003 }
11004 {
11006 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11007 code |= (arg & 0x1f) << 16;
11008 code |= arg & 0x20;
11009 code |= (arg & 0x40) << 4;
11010 }
11011 {
11013 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11014 code |= (arg & 0x1f) << 11;
11015 code |= (arg >> 5) & 0x3;
11016 }
11017 Ok(code)
11018}
11019fn gen_vrsqrtefp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11020 check_arg_count(args, 2)?;
11021 let mut code = 0x1000014a | modifiers;
11022 {
11024 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11025 code |= (arg & 0x1f) << 21;
11026 }
11027 {
11029 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11030 code |= (arg & 0x1f) << 11;
11031 }
11032 Ok(code)
11033}
11034fn gen_vrsqrtefp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11035 check_arg_count(args, 2)?;
11036 let mut code = 0x18000670 | modifiers;
11037 {
11039 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11040 code |= (arg & 0x1f) << 21;
11041 code |= (arg >> 3) & 0xc;
11042 }
11043 {
11045 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11046 code |= (arg & 0x1f) << 11;
11047 code |= (arg >> 5) & 0x3;
11048 }
11049 Ok(code)
11050}
11051fn gen_vsel(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11052 check_arg_count(args, 4)?;
11053 let mut code = 0x1000002a | modifiers;
11054 {
11056 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11057 code |= (arg & 0x1f) << 21;
11058 }
11059 {
11061 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11062 code |= (arg & 0x1f) << 16;
11063 }
11064 {
11066 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11067 code |= (arg & 0x1f) << 11;
11068 }
11069 {
11071 let arg = parse_unsigned(args, 3, 0x0, 0x1f)?;
11072 code |= (arg & 0x1f) << 6;
11073 }
11074 Ok(code)
11075}
11076fn gen_vsel128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11077 check_arg_count(args, 3)?;
11078 let mut code = 0x14000350 | modifiers;
11079 {
11081 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11082 code |= (arg & 0x1f) << 21;
11083 code |= (arg >> 3) & 0xc;
11084 }
11085 {
11087 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11088 code |= (arg & 0x1f) << 16;
11089 code |= arg & 0x20;
11090 code |= (arg & 0x40) << 4;
11091 }
11092 {
11094 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11095 code |= (arg & 0x1f) << 11;
11096 code |= (arg >> 5) & 0x3;
11097 }
11098 Ok(code)
11099}
11100fn gen_vsl(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11101 check_arg_count(args, 3)?;
11102 let mut code = 0x100001c4 | modifiers;
11103 {
11105 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11106 code |= (arg & 0x1f) << 21;
11107 }
11108 {
11110 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11111 code |= (arg & 0x1f) << 16;
11112 }
11113 {
11115 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11116 code |= (arg & 0x1f) << 11;
11117 }
11118 Ok(code)
11119}
11120fn gen_vslb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11121 check_arg_count(args, 3)?;
11122 let mut code = 0x10000104 | modifiers;
11123 {
11125 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11126 code |= (arg & 0x1f) << 21;
11127 }
11128 {
11130 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11131 code |= (arg & 0x1f) << 16;
11132 }
11133 {
11135 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11136 code |= (arg & 0x1f) << 11;
11137 }
11138 Ok(code)
11139}
11140fn gen_vsldoi(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11141 check_arg_count(args, 4)?;
11142 let mut code = 0x1000002c | modifiers;
11143 {
11145 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11146 code |= (arg & 0x1f) << 21;
11147 }
11148 {
11150 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11151 code |= (arg & 0x1f) << 16;
11152 }
11153 {
11155 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11156 code |= (arg & 0x1f) << 11;
11157 }
11158 {
11160 let arg = parse_unsigned(args, 3, 0x0, 0xf)?;
11161 code |= (arg & 0xf) << 6;
11162 }
11163 Ok(code)
11164}
11165fn gen_vsldoi128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11166 check_arg_count(args, 4)?;
11167 let mut code = 0x10000010 | modifiers;
11168 {
11170 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11171 code |= (arg & 0x1f) << 21;
11172 code |= (arg >> 3) & 0xc;
11173 }
11174 {
11176 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11177 code |= (arg & 0x1f) << 16;
11178 code |= arg & 0x20;
11179 code |= (arg & 0x40) << 4;
11180 }
11181 {
11183 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11184 code |= (arg & 0x1f) << 11;
11185 code |= (arg >> 5) & 0x3;
11186 }
11187 {
11189 let arg = parse_unsigned(args, 3, 0x0, 0xf)?;
11190 code |= (arg & 0xf) << 6;
11191 }
11192 Ok(code)
11193}
11194fn gen_vslh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11195 check_arg_count(args, 3)?;
11196 let mut code = 0x10000144 | modifiers;
11197 {
11199 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11200 code |= (arg & 0x1f) << 21;
11201 }
11202 {
11204 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11205 code |= (arg & 0x1f) << 16;
11206 }
11207 {
11209 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11210 code |= (arg & 0x1f) << 11;
11211 }
11212 Ok(code)
11213}
11214fn gen_vslo(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11215 check_arg_count(args, 3)?;
11216 let mut code = 0x1000040c | modifiers;
11217 {
11219 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11220 code |= (arg & 0x1f) << 21;
11221 }
11222 {
11224 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11225 code |= (arg & 0x1f) << 16;
11226 }
11227 {
11229 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11230 code |= (arg & 0x1f) << 11;
11231 }
11232 Ok(code)
11233}
11234fn gen_vslo128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11235 check_arg_count(args, 3)?;
11236 let mut code = 0x14000390 | modifiers;
11237 {
11239 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11240 code |= (arg & 0x1f) << 21;
11241 code |= (arg >> 3) & 0xc;
11242 }
11243 {
11245 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11246 code |= (arg & 0x1f) << 16;
11247 code |= arg & 0x20;
11248 code |= (arg & 0x40) << 4;
11249 }
11250 {
11252 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11253 code |= (arg & 0x1f) << 11;
11254 code |= (arg >> 5) & 0x3;
11255 }
11256 Ok(code)
11257}
11258fn gen_vslw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11259 check_arg_count(args, 3)?;
11260 let mut code = 0x10000184 | modifiers;
11261 {
11263 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11264 code |= (arg & 0x1f) << 21;
11265 }
11266 {
11268 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11269 code |= (arg & 0x1f) << 16;
11270 }
11271 {
11273 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11274 code |= (arg & 0x1f) << 11;
11275 }
11276 Ok(code)
11277}
11278fn gen_vslw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11279 check_arg_count(args, 3)?;
11280 let mut code = 0x180000d0 | modifiers;
11281 {
11283 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11284 code |= (arg & 0x1f) << 21;
11285 code |= (arg >> 3) & 0xc;
11286 }
11287 {
11289 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11290 code |= (arg & 0x1f) << 16;
11291 code |= arg & 0x20;
11292 code |= (arg & 0x40) << 4;
11293 }
11294 {
11296 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11297 code |= (arg & 0x1f) << 11;
11298 code |= (arg >> 5) & 0x3;
11299 }
11300 Ok(code)
11301}
11302fn gen_vspltb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11303 check_arg_count(args, 3)?;
11304 let mut code = 0x1000020c | modifiers;
11305 {
11307 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11308 code |= (arg & 0x1f) << 21;
11309 }
11310 {
11312 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11313 code |= (arg & 0x1f) << 11;
11314 }
11315 {
11317 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11318 code |= (arg & 0x1f) << 16;
11319 }
11320 Ok(code)
11321}
11322fn gen_vsplth(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11323 check_arg_count(args, 3)?;
11324 let mut code = 0x1000024c | modifiers;
11325 {
11327 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11328 code |= (arg & 0x1f) << 21;
11329 }
11330 {
11332 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11333 code |= (arg & 0x1f) << 11;
11334 }
11335 {
11337 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11338 code |= (arg & 0x1f) << 16;
11339 }
11340 Ok(code)
11341}
11342fn gen_vspltisb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11343 check_arg_count(args, 2)?;
11344 let mut code = 0x1000030c | modifiers;
11345 {
11347 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11348 code |= (arg & 0x1f) << 21;
11349 }
11350 {
11352 let arg = parse_signed(args, 1, -0x10, 0x10)? as u32;
11353 code |= (arg & 0x1f) << 16;
11354 }
11355 Ok(code)
11356}
11357fn gen_vspltish(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11358 check_arg_count(args, 2)?;
11359 let mut code = 0x1000034c | modifiers;
11360 {
11362 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11363 code |= (arg & 0x1f) << 21;
11364 }
11365 {
11367 let arg = parse_signed(args, 1, -0x10, 0x10)? as u32;
11368 code |= (arg & 0x1f) << 16;
11369 }
11370 Ok(code)
11371}
11372fn gen_vspltisw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11373 check_arg_count(args, 2)?;
11374 let mut code = 0x1000038c | modifiers;
11375 {
11377 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11378 code |= (arg & 0x1f) << 21;
11379 }
11380 {
11382 let arg = parse_signed(args, 1, -0x10, 0x10)? as u32;
11383 code |= (arg & 0x1f) << 16;
11384 }
11385 Ok(code)
11386}
11387fn gen_vspltisw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11388 check_arg_count(args, 3)?;
11389 let mut code = 0x18000770 | modifiers;
11390 {
11392 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11393 code |= (arg & 0x1f) << 21;
11394 code |= (arg >> 3) & 0xc;
11395 }
11396 {
11398 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11399 code |= (arg & 0x1f) << 11;
11400 code |= (arg >> 5) & 0x3;
11401 }
11402 {
11404 let arg = parse_signed(args, 2, -0x10, 0x10)? as u32;
11405 code |= (arg & 0x1f) << 16;
11406 }
11407 Ok(code)
11408}
11409fn gen_vspltw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11410 check_arg_count(args, 3)?;
11411 let mut code = 0x1000028c | modifiers;
11412 {
11414 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11415 code |= (arg & 0x1f) << 21;
11416 }
11417 {
11419 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11420 code |= (arg & 0x1f) << 11;
11421 }
11422 {
11424 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11425 code |= (arg & 0x1f) << 16;
11426 }
11427 Ok(code)
11428}
11429fn gen_vspltw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11430 check_arg_count(args, 3)?;
11431 let mut code = 0x18000730 | modifiers;
11432 {
11434 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11435 code |= (arg & 0x1f) << 21;
11436 code |= (arg >> 3) & 0xc;
11437 }
11438 {
11440 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11441 code |= (arg & 0x1f) << 11;
11442 code |= (arg >> 5) & 0x3;
11443 }
11444 {
11446 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11447 code |= (arg & 0x1f) << 16;
11448 }
11449 Ok(code)
11450}
11451fn gen_vsr(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11452 check_arg_count(args, 3)?;
11453 let mut code = 0x100002c4 | modifiers;
11454 {
11456 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11457 code |= (arg & 0x1f) << 21;
11458 }
11459 {
11461 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11462 code |= (arg & 0x1f) << 16;
11463 }
11464 {
11466 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11467 code |= (arg & 0x1f) << 11;
11468 }
11469 Ok(code)
11470}
11471fn gen_vsrab(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11472 check_arg_count(args, 3)?;
11473 let mut code = 0x10000304 | modifiers;
11474 {
11476 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11477 code |= (arg & 0x1f) << 21;
11478 }
11479 {
11481 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11482 code |= (arg & 0x1f) << 16;
11483 }
11484 {
11486 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11487 code |= (arg & 0x1f) << 11;
11488 }
11489 Ok(code)
11490}
11491fn gen_vsrah(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11492 check_arg_count(args, 3)?;
11493 let mut code = 0x10000344 | modifiers;
11494 {
11496 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11497 code |= (arg & 0x1f) << 21;
11498 }
11499 {
11501 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11502 code |= (arg & 0x1f) << 16;
11503 }
11504 {
11506 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11507 code |= (arg & 0x1f) << 11;
11508 }
11509 Ok(code)
11510}
11511fn gen_vsraw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11512 check_arg_count(args, 3)?;
11513 let mut code = 0x10000384 | modifiers;
11514 {
11516 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11517 code |= (arg & 0x1f) << 21;
11518 }
11519 {
11521 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11522 code |= (arg & 0x1f) << 16;
11523 }
11524 {
11526 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11527 code |= (arg & 0x1f) << 11;
11528 }
11529 Ok(code)
11530}
11531fn gen_vsraw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11532 check_arg_count(args, 3)?;
11533 let mut code = 0x18000150 | modifiers;
11534 {
11536 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11537 code |= (arg & 0x1f) << 21;
11538 code |= (arg >> 3) & 0xc;
11539 }
11540 {
11542 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11543 code |= (arg & 0x1f) << 16;
11544 code |= arg & 0x20;
11545 code |= (arg & 0x40) << 4;
11546 }
11547 {
11549 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11550 code |= (arg & 0x1f) << 11;
11551 code |= (arg >> 5) & 0x3;
11552 }
11553 Ok(code)
11554}
11555fn gen_vsrb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11556 check_arg_count(args, 3)?;
11557 let mut code = 0x10000204 | modifiers;
11558 {
11560 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11561 code |= (arg & 0x1f) << 21;
11562 }
11563 {
11565 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11566 code |= (arg & 0x1f) << 16;
11567 }
11568 {
11570 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11571 code |= (arg & 0x1f) << 11;
11572 }
11573 Ok(code)
11574}
11575fn gen_vsrh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11576 check_arg_count(args, 3)?;
11577 let mut code = 0x10000244 | modifiers;
11578 {
11580 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11581 code |= (arg & 0x1f) << 21;
11582 }
11583 {
11585 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11586 code |= (arg & 0x1f) << 16;
11587 }
11588 {
11590 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11591 code |= (arg & 0x1f) << 11;
11592 }
11593 Ok(code)
11594}
11595fn gen_vsro(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11596 check_arg_count(args, 3)?;
11597 let mut code = 0x1000044c | modifiers;
11598 {
11600 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11601 code |= (arg & 0x1f) << 21;
11602 }
11603 {
11605 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11606 code |= (arg & 0x1f) << 16;
11607 }
11608 {
11610 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11611 code |= (arg & 0x1f) << 11;
11612 }
11613 Ok(code)
11614}
11615fn gen_vsro128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11616 check_arg_count(args, 3)?;
11617 let mut code = 0x140003d0 | modifiers;
11618 {
11620 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11621 code |= (arg & 0x1f) << 21;
11622 code |= (arg >> 3) & 0xc;
11623 }
11624 {
11626 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11627 code |= (arg & 0x1f) << 16;
11628 code |= arg & 0x20;
11629 code |= (arg & 0x40) << 4;
11630 }
11631 {
11633 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11634 code |= (arg & 0x1f) << 11;
11635 code |= (arg >> 5) & 0x3;
11636 }
11637 Ok(code)
11638}
11639fn gen_vsrw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11640 check_arg_count(args, 3)?;
11641 let mut code = 0x10000284 | modifiers;
11642 {
11644 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11645 code |= (arg & 0x1f) << 21;
11646 }
11647 {
11649 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11650 code |= (arg & 0x1f) << 16;
11651 }
11652 {
11654 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11655 code |= (arg & 0x1f) << 11;
11656 }
11657 Ok(code)
11658}
11659fn gen_vsrw128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11660 check_arg_count(args, 3)?;
11661 let mut code = 0x180001d0 | modifiers;
11662 {
11664 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11665 code |= (arg & 0x1f) << 21;
11666 code |= (arg >> 3) & 0xc;
11667 }
11668 {
11670 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11671 code |= (arg & 0x1f) << 16;
11672 code |= arg & 0x20;
11673 code |= (arg & 0x40) << 4;
11674 }
11675 {
11677 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11678 code |= (arg & 0x1f) << 11;
11679 code |= (arg >> 5) & 0x3;
11680 }
11681 Ok(code)
11682}
11683fn gen_vsubcuw(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11684 check_arg_count(args, 3)?;
11685 let mut code = 0x10000580 | modifiers;
11686 {
11688 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11689 code |= (arg & 0x1f) << 21;
11690 }
11691 {
11693 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11694 code |= (arg & 0x1f) << 16;
11695 }
11696 {
11698 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11699 code |= (arg & 0x1f) << 11;
11700 }
11701 Ok(code)
11702}
11703fn gen_vsubfp(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11704 check_arg_count(args, 3)?;
11705 let mut code = 0x1000004a | modifiers;
11706 {
11708 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11709 code |= (arg & 0x1f) << 21;
11710 }
11711 {
11713 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11714 code |= (arg & 0x1f) << 16;
11715 }
11716 {
11718 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11719 code |= (arg & 0x1f) << 11;
11720 }
11721 Ok(code)
11722}
11723fn gen_vsubfp128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11724 check_arg_count(args, 3)?;
11725 let mut code = 0x14000050 | modifiers;
11726 {
11728 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
11729 code |= (arg & 0x1f) << 21;
11730 code |= (arg >> 3) & 0xc;
11731 }
11732 {
11734 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
11735 code |= (arg & 0x1f) << 16;
11736 code |= arg & 0x20;
11737 code |= (arg & 0x40) << 4;
11738 }
11739 {
11741 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
11742 code |= (arg & 0x1f) << 11;
11743 code |= (arg >> 5) & 0x3;
11744 }
11745 Ok(code)
11746}
11747fn gen_vsubsbs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11748 check_arg_count(args, 3)?;
11749 let mut code = 0x10000700 | modifiers;
11750 {
11752 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11753 code |= (arg & 0x1f) << 21;
11754 }
11755 {
11757 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11758 code |= (arg & 0x1f) << 16;
11759 }
11760 {
11762 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11763 code |= (arg & 0x1f) << 11;
11764 }
11765 Ok(code)
11766}
11767fn gen_vsubshs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11768 check_arg_count(args, 3)?;
11769 let mut code = 0x10000740 | modifiers;
11770 {
11772 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11773 code |= (arg & 0x1f) << 21;
11774 }
11775 {
11777 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11778 code |= (arg & 0x1f) << 16;
11779 }
11780 {
11782 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11783 code |= (arg & 0x1f) << 11;
11784 }
11785 Ok(code)
11786}
11787fn gen_vsubsws(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11788 check_arg_count(args, 3)?;
11789 let mut code = 0x10000780 | modifiers;
11790 {
11792 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11793 code |= (arg & 0x1f) << 21;
11794 }
11795 {
11797 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11798 code |= (arg & 0x1f) << 16;
11799 }
11800 {
11802 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11803 code |= (arg & 0x1f) << 11;
11804 }
11805 Ok(code)
11806}
11807fn gen_vsububm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11808 check_arg_count(args, 3)?;
11809 let mut code = 0x10000400 | modifiers;
11810 {
11812 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11813 code |= (arg & 0x1f) << 21;
11814 }
11815 {
11817 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11818 code |= (arg & 0x1f) << 16;
11819 }
11820 {
11822 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11823 code |= (arg & 0x1f) << 11;
11824 }
11825 Ok(code)
11826}
11827fn gen_vsububs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11828 check_arg_count(args, 3)?;
11829 let mut code = 0x10000600 | modifiers;
11830 {
11832 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11833 code |= (arg & 0x1f) << 21;
11834 }
11835 {
11837 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11838 code |= (arg & 0x1f) << 16;
11839 }
11840 {
11842 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11843 code |= (arg & 0x1f) << 11;
11844 }
11845 Ok(code)
11846}
11847fn gen_vsubuhm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11848 check_arg_count(args, 3)?;
11849 let mut code = 0x10000440 | modifiers;
11850 {
11852 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11853 code |= (arg & 0x1f) << 21;
11854 }
11855 {
11857 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11858 code |= (arg & 0x1f) << 16;
11859 }
11860 {
11862 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11863 code |= (arg & 0x1f) << 11;
11864 }
11865 Ok(code)
11866}
11867fn gen_vsubuhs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11868 check_arg_count(args, 3)?;
11869 let mut code = 0x10000640 | modifiers;
11870 {
11872 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11873 code |= (arg & 0x1f) << 21;
11874 }
11875 {
11877 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11878 code |= (arg & 0x1f) << 16;
11879 }
11880 {
11882 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11883 code |= (arg & 0x1f) << 11;
11884 }
11885 Ok(code)
11886}
11887fn gen_vsubuwm(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11888 check_arg_count(args, 3)?;
11889 let mut code = 0x10000480 | modifiers;
11890 {
11892 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11893 code |= (arg & 0x1f) << 21;
11894 }
11895 {
11897 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11898 code |= (arg & 0x1f) << 16;
11899 }
11900 {
11902 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11903 code |= (arg & 0x1f) << 11;
11904 }
11905 Ok(code)
11906}
11907fn gen_vsubuws(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11908 check_arg_count(args, 3)?;
11909 let mut code = 0x10000680 | modifiers;
11910 {
11912 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11913 code |= (arg & 0x1f) << 21;
11914 }
11915 {
11917 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11918 code |= (arg & 0x1f) << 16;
11919 }
11920 {
11922 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11923 code |= (arg & 0x1f) << 11;
11924 }
11925 Ok(code)
11926}
11927fn gen_vsum2sws(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11928 check_arg_count(args, 3)?;
11929 let mut code = 0x10000688 | modifiers;
11930 {
11932 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11933 code |= (arg & 0x1f) << 21;
11934 }
11935 {
11937 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11938 code |= (arg & 0x1f) << 16;
11939 }
11940 {
11942 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11943 code |= (arg & 0x1f) << 11;
11944 }
11945 Ok(code)
11946}
11947fn gen_vsum4sbs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11948 check_arg_count(args, 3)?;
11949 let mut code = 0x10000708 | modifiers;
11950 {
11952 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11953 code |= (arg & 0x1f) << 21;
11954 }
11955 {
11957 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11958 code |= (arg & 0x1f) << 16;
11959 }
11960 {
11962 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11963 code |= (arg & 0x1f) << 11;
11964 }
11965 Ok(code)
11966}
11967fn gen_vsum4shs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11968 check_arg_count(args, 3)?;
11969 let mut code = 0x10000648 | modifiers;
11970 {
11972 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11973 code |= (arg & 0x1f) << 21;
11974 }
11975 {
11977 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11978 code |= (arg & 0x1f) << 16;
11979 }
11980 {
11982 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
11983 code |= (arg & 0x1f) << 11;
11984 }
11985 Ok(code)
11986}
11987fn gen_vsum4ubs(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
11988 check_arg_count(args, 3)?;
11989 let mut code = 0x10000608 | modifiers;
11990 {
11992 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
11993 code |= (arg & 0x1f) << 21;
11994 }
11995 {
11997 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
11998 code |= (arg & 0x1f) << 16;
11999 }
12000 {
12002 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
12003 code |= (arg & 0x1f) << 11;
12004 }
12005 Ok(code)
12006}
12007fn gen_vsumsws(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12008 check_arg_count(args, 3)?;
12009 let mut code = 0x10000788 | modifiers;
12010 {
12012 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12013 code |= (arg & 0x1f) << 21;
12014 }
12015 {
12017 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12018 code |= (arg & 0x1f) << 16;
12019 }
12020 {
12022 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
12023 code |= (arg & 0x1f) << 11;
12024 }
12025 Ok(code)
12026}
12027fn gen_vupkd3d128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12028 check_arg_count(args, 3)?;
12029 let mut code = 0x180007f0 | modifiers;
12030 {
12032 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
12033 code |= (arg & 0x1f) << 21;
12034 code |= (arg >> 3) & 0xc;
12035 }
12036 {
12038 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
12039 code |= (arg & 0x1f) << 11;
12040 code |= (arg >> 5) & 0x3;
12041 }
12042 {
12044 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
12045 code |= (arg & 0x1f) << 16;
12046 }
12047 Ok(code)
12048}
12049fn gen_vupkhpx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12050 check_arg_count(args, 2)?;
12051 let mut code = 0x1000034e | modifiers;
12052 {
12054 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12055 code |= (arg & 0x1f) << 21;
12056 }
12057 {
12059 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12060 code |= (arg & 0x1f) << 11;
12061 }
12062 Ok(code)
12063}
12064fn gen_vupkhsb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12065 check_arg_count(args, 2)?;
12066 let mut code = 0x1000020e | modifiers;
12067 {
12069 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12070 code |= (arg & 0x1f) << 21;
12071 }
12072 {
12074 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12075 code |= (arg & 0x1f) << 11;
12076 }
12077 Ok(code)
12078}
12079fn gen_vupkhsb128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12080 check_arg_count(args, 2)?;
12081 let mut code = 0x18000380 | modifiers;
12082 {
12084 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
12085 code |= (arg & 0x1f) << 21;
12086 code |= (arg >> 3) & 0xc;
12087 }
12088 {
12090 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
12091 code |= (arg & 0x1f) << 11;
12092 code |= (arg >> 5) & 0x3;
12093 }
12094 Ok(code)
12095}
12096fn gen_vupkhsh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12097 check_arg_count(args, 2)?;
12098 let mut code = 0x1000024e | modifiers;
12099 {
12101 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12102 code |= (arg & 0x1f) << 21;
12103 }
12104 {
12106 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12107 code |= (arg & 0x1f) << 11;
12108 }
12109 Ok(code)
12110}
12111fn gen_vupkhsh128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12112 check_arg_count(args, 2)?;
12113 let mut code = 0x180007a0 | modifiers;
12114 {
12116 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
12117 code |= (arg & 0x1f) << 21;
12118 code |= (arg >> 3) & 0xc;
12119 }
12120 {
12122 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
12123 code |= (arg & 0x1f) << 11;
12124 code |= (arg >> 5) & 0x3;
12125 }
12126 Ok(code)
12127}
12128fn gen_vupklpx(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12129 check_arg_count(args, 2)?;
12130 let mut code = 0x100003ce | modifiers;
12131 {
12133 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12134 code |= (arg & 0x1f) << 21;
12135 }
12136 {
12138 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12139 code |= (arg & 0x1f) << 11;
12140 }
12141 Ok(code)
12142}
12143fn gen_vupklsb(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12144 check_arg_count(args, 2)?;
12145 let mut code = 0x1000028e | modifiers;
12146 {
12148 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12149 code |= (arg & 0x1f) << 21;
12150 }
12151 {
12153 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12154 code |= (arg & 0x1f) << 11;
12155 }
12156 Ok(code)
12157}
12158fn gen_vupklsb128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12159 check_arg_count(args, 2)?;
12160 let mut code = 0x180003c0 | modifiers;
12161 {
12163 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
12164 code |= (arg & 0x1f) << 21;
12165 code |= (arg >> 3) & 0xc;
12166 }
12167 {
12169 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
12170 code |= (arg & 0x1f) << 11;
12171 code |= (arg >> 5) & 0x3;
12172 }
12173 Ok(code)
12174}
12175fn gen_vupklsh(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12176 check_arg_count(args, 2)?;
12177 let mut code = 0x100002ce | modifiers;
12178 {
12180 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12181 code |= (arg & 0x1f) << 21;
12182 }
12183 {
12185 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12186 code |= (arg & 0x1f) << 11;
12187 }
12188 Ok(code)
12189}
12190fn gen_vupklsh128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12191 check_arg_count(args, 2)?;
12192 let mut code = 0x180007e0 | modifiers;
12193 {
12195 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
12196 code |= (arg & 0x1f) << 21;
12197 code |= (arg >> 3) & 0xc;
12198 }
12199 {
12201 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
12202 code |= (arg & 0x1f) << 11;
12203 code |= (arg >> 5) & 0x3;
12204 }
12205 Ok(code)
12206}
12207fn gen_vxor(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12208 check_arg_count(args, 3)?;
12209 let mut code = 0x100004c4 | modifiers;
12210 {
12212 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12213 code |= (arg & 0x1f) << 21;
12214 }
12215 {
12217 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12218 code |= (arg & 0x1f) << 16;
12219 }
12220 {
12222 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
12223 code |= (arg & 0x1f) << 11;
12224 }
12225 Ok(code)
12226}
12227fn gen_vxor128(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12228 check_arg_count(args, 3)?;
12229 let mut code = 0x14000310 | modifiers;
12230 {
12232 let arg = parse_unsigned(args, 0, 0x0, 0x7f)?;
12233 code |= (arg & 0x1f) << 21;
12234 code |= (arg >> 3) & 0xc;
12235 }
12236 {
12238 let arg = parse_unsigned(args, 1, 0x0, 0x7f)?;
12239 code |= (arg & 0x1f) << 16;
12240 code |= arg & 0x20;
12241 code |= (arg & 0x40) << 4;
12242 }
12243 {
12245 let arg = parse_unsigned(args, 2, 0x0, 0x7f)?;
12246 code |= (arg & 0x1f) << 11;
12247 code |= (arg >> 5) & 0x3;
12248 }
12249 Ok(code)
12250}
12251fn gen_xor(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12252 check_arg_count(args, 3)?;
12253 let mut code = 0x7c000278 | modifiers;
12254 {
12256 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12257 code |= (arg & 0x1f) << 16;
12258 }
12259 {
12261 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12262 code |= (arg & 0x1f) << 21;
12263 }
12264 {
12266 let arg = parse_unsigned(args, 2, 0x0, 0x1f)?;
12267 code |= (arg & 0x1f) << 11;
12268 }
12269 Ok(code)
12270}
12271fn gen_xori(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12272 check_arg_count(args, 3)?;
12273 let mut code = 0x68000000 | modifiers;
12274 {
12276 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12277 code |= (arg & 0x1f) << 16;
12278 }
12279 {
12281 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12282 code |= (arg & 0x1f) << 21;
12283 }
12284 {
12286 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
12287 code |= arg & 0xffff;
12288 }
12289 Ok(code)
12290}
12291fn gen_xoris(args: &Arguments, modifiers: u32) -> Result<u32, ArgumentError> {
12292 check_arg_count(args, 3)?;
12293 let mut code = 0x6c000000 | modifiers;
12294 {
12296 let arg = parse_unsigned(args, 0, 0x0, 0x1f)?;
12297 code |= (arg & 0x1f) << 16;
12298 }
12299 {
12301 let arg = parse_unsigned(args, 1, 0x0, 0x1f)?;
12302 code |= (arg & 0x1f) << 21;
12303 }
12304 {
12306 let arg = parse_unsigned(args, 2, 0x0, 0xffff)?;
12307 code |= arg & 0xffff;
12308 }
12309 Ok(code)
12310}
12311type MnemonicFn = fn(&Arguments, u32) -> Result<u32, ArgumentError>;
12312static MNEMONIC_MAP: phf::Map<&'static str, (MnemonicFn, u32)> = ::phf::Map {
12313 key: 16287231350648472473,
12314 disps: &[
12315 (0, 75),
12316 (0, 26),
12317 (0, 30),
12318 (0, 103),
12319 (0, 376),
12320 (0, 631),
12321 (0, 191),
12322 (0, 5),
12323 (0, 3),
12324 (0, 299),
12325 (0, 35),
12326 (0, 3),
12327 (0, 7),
12328 (0, 5),
12329 (0, 610),
12330 (0, 8),
12331 (0, 978),
12332 (0, 82),
12333 (0, 37),
12334 (0, 5),
12335 (0, 2),
12336 (0, 146),
12337 (0, 151),
12338 (0, 18),
12339 (0, 18),
12340 (0, 26),
12341 (0, 31),
12342 (0, 144),
12343 (0, 135),
12344 (0, 514),
12345 (0, 5),
12346 (0, 64),
12347 (0, 170),
12348 (0, 889),
12349 (0, 81),
12350 (0, 177),
12351 (0, 4),
12352 (0, 3),
12353 (0, 273),
12354 (0, 186),
12355 (0, 313),
12356 (0, 650),
12357 (0, 2),
12358 (0, 833),
12359 (0, 40),
12360 (1, 14),
12361 (0, 191),
12362 (0, 95),
12363 (0, 971),
12364 (2, 532),
12365 (0, 48),
12366 (0, 277),
12367 (1, 294),
12368 (1, 123),
12369 (0, 0),
12370 (0, 169),
12371 (0, 5),
12372 (0, 4),
12373 (0, 24),
12374 (0, 0),
12375 (0, 13),
12376 (0, 23),
12377 (0, 0),
12378 (0, 0),
12379 (0, 91),
12380 (0, 6),
12381 (0, 699),
12382 (0, 683),
12383 (0, 823),
12384 (0, 4),
12385 (0, 53),
12386 (0, 3),
12387 (2, 565),
12388 (0, 143),
12389 (0, 1014),
12390 (0, 1),
12391 (0, 189),
12392 (0, 748),
12393 (3, 749),
12394 (0, 125),
12395 (0, 1),
12396 (0, 323),
12397 (3, 295),
12398 (0, 22),
12399 (1, 614),
12400 (1, 1037),
12401 (1, 702),
12402 (0, 26),
12403 (0, 12),
12404 (0, 13),
12405 (0, 29),
12406 (0, 733),
12407 (0, 1),
12408 (2, 221),
12409 (0, 219),
12410 (0, 56),
12411 (0, 1),
12412 (0, 121),
12413 (0, 36),
12414 (0, 0),
12415 (0, 656),
12416 (0, 674),
12417 (0, 897),
12418 (0, 461),
12419 (0, 1),
12420 (0, 8),
12421 (0, 23),
12422 (0, 76),
12423 (0, 695),
12424 (0, 23),
12425 (0, 1),
12426 (1, 682),
12427 (0, 329),
12428 (0, 39),
12429 (0, 1),
12430 (0, 606),
12431 (0, 512),
12432 (0, 0),
12433 (1, 0),
12434 (0, 40),
12435 (2, 243),
12436 (0, 68),
12437 (0, 3),
12438 (0, 985),
12439 (9, 415),
12440 (0, 288),
12441 (0, 238),
12442 (0, 17),
12443 (3, 490),
12444 (0, 975),
12445 (0, 43),
12446 (0, 898),
12447 (2, 37),
12448 (0, 830),
12449 (0, 723),
12450 (2, 545),
12451 (0, 13),
12452 (0, 9),
12453 (0, 354),
12454 (3, 785),
12455 (1, 783),
12456 (0, 21),
12457 (1, 786),
12458 (2, 897),
12459 (0, 32),
12460 (0, 214),
12461 (0, 471),
12462 (0, 1),
12463 (0, 2),
12464 (7, 1041),
12465 (3, 573),
12466 (1, 570),
12467 (0, 299),
12468 (0, 446),
12469 (0, 1),
12470 (0, 2),
12471 (0, 141),
12472 (0, 0),
12473 (0, 5),
12474 (0, 13),
12475 (0, 4),
12476 (1, 77),
12477 (10, 489),
12478 (9, 1022),
12479 (1, 482),
12480 (0, 3),
12481 (9, 805),
12482 (0, 10),
12483 (0, 295),
12484 (0, 2),
12485 (15, 624),
12486 (1, 938),
12487 (0, 0),
12488 (1, 47),
12489 (0, 16),
12490 (3, 416),
12491 (0, 0),
12492 (0, 50),
12493 (0, 102),
12494 (2, 906),
12495 (0, 74),
12496 (0, 625),
12497 (0, 31),
12498 (0, 514),
12499 (0, 198),
12500 (0, 826),
12501 (0, 44),
12502 (0, 24),
12503 (0, 0),
12504 (0, 0),
12505 (0, 284),
12506 (1, 622),
12507 (0, 1),
12508 (0, 822),
12509 (3, 62),
12510 (3, 437),
12511 (28, 789),
12512 (0, 675),
12513 (12, 200),
12514 (0, 8),
12515 (0, 8),
12516 (0, 1),
12517 (0, 742),
12518 (4, 151),
12519 (0, 0),
12520 (4, 180),
12521 (0, 9),
12522 (0, 7),
12523 (0, 69),
12524 (23, 704),
12525 ],
12526 entries: &[
12527 ("dstst", (gen_dstst, 0x0)),
12528 ("rotld", (gen_rotld, 0x0)),
12529 ("vrfin128", (gen_vrfin128, 0x0)),
12530 ("bdzla", (gen_bdz, 0x3)),
12531 ("bnectr", (gen_bnectr, 0x0)),
12532 ("blelrl+", (gen_blelr, 0x200001)),
12533 ("vcmpbfp.", (gen_vcmpbfp, 0x400)),
12534 ("bdnztlr+", (gen_bdnztlr, 0x200000)),
12535 ("vperm128", (gen_vperm128, 0x0)),
12536 ("beqa+", (gen_beq, 0x200002)),
12537 ("ldux", (gen_ldux, 0x0)),
12538 ("neg.", (gen_neg, 0x1)),
12539 ("ps_merge00", (gen_ps_merge00, 0x0)),
12540 ("tdlti", (gen_tdlti, 0x0)),
12541 ("ps_nmsub", (gen_ps_nmsub, 0x0)),
12542 ("psq_lux", (gen_psq_lux, 0x0)),
12543 ("lswi", (gen_lswi, 0x0)),
12544 ("vminsh", (gen_vminsh, 0x0)),
12545 ("bgtlr", (gen_bgtlr, 0x0)),
12546 ("mtvscr", (gen_mtvscr, 0x0)),
12547 ("fmadd.", (gen_fmadd, 0x1)),
12548 ("ldu", (gen_ldu, 0x0)),
12549 ("lhzux", (gen_lhzux, 0x0)),
12550 ("crmove", (gen_crmove, 0x0)),
12551 ("ps_muls1", (gen_ps_muls1, 0x0)),
12552 ("addme.", (gen_addme, 0x1)),
12553 ("bnel-", (gen_bne, 0x200001)),
12554 ("ps_sel.", (gen_ps_sel, 0x1)),
12555 ("dcbst", (gen_dcbst, 0x0)),
12556 ("dssall", (gen_dssall, 0x0)),
12557 ("mfsr", (gen_mfsr, 0x0)),
12558 ("vsubuws", (gen_vsubuws, 0x0)),
12559 ("fsqrts.", (gen_fsqrts, 0x1)),
12560 ("bgta+", (gen_bgt, 0x200002)),
12561 ("vrlimi128", (gen_vrlimi128, 0x0)),
12562 ("fctid.", (gen_fctid, 0x1)),
12563 ("dcbf", (gen_dcbf, 0x0)),
12564 ("cmpldi", (gen_cmpldi, 0x0)),
12565 ("bctr", (gen_bctr, 0x0)),
12566 ("vmulfp128", (gen_vmulfp128, 0x0)),
12567 ("bdnztla", (gen_bdnzt, 0x3)),
12568 ("bcl-", (gen_bc, 0x200001)),
12569 ("bgea+", (gen_bge, 0x200002)),
12570 ("bgel-", (gen_bge, 0x200001)),
12571 ("twllei", (gen_twllei, 0x0)),
12572 ("mtsrd", (gen_mtsrd, 0x0)),
12573 ("vmulosb", (gen_vmulosb, 0x0)),
12574 ("addme", (gen_addme, 0x0)),
12575 ("divd.", (gen_divd, 0x1)),
12576 ("lhz", (gen_lhz, 0x0)),
12577 ("vmhaddshs", (gen_vmhaddshs, 0x0)),
12578 ("creqv", (gen_creqv, 0x0)),
12579 ("vsldoi", (gen_vsldoi, 0x0)),
12580 ("bgtctr+", (gen_bgtctr, 0x200000)),
12581 ("bdnzfl+", (gen_bdnzf, 0x200001)),
12582 ("stvx", (gen_stvx, 0x0)),
12583 ("stdcx.", (gen_stdcx_, 0x0)),
12584 ("vmladduhm", (gen_vmladduhm, 0x0)),
12585 ("beqctr", (gen_beqctr, 0x0)),
12586 ("stfiwx", (gen_stfiwx, 0x0)),
12587 ("addco", (gen_addc, 0x400)),
12588 ("ps_msub.", (gen_ps_msub, 0x1)),
12589 ("vcmpgtuh", (gen_vcmpgtuh, 0x0)),
12590 ("subfze.", (gen_subfze, 0x1)),
12591 ("ps_merge10.", (gen_ps_merge10, 0x1)),
12592 ("ps_rsqrte", (gen_ps_rsqrte, 0x0)),
12593 ("fdivs", (gen_fdivs, 0x0)),
12594 ("bgta", (gen_bgt, 0x2)),
12595 ("divwuo.", (gen_divwu, 0x401)),
12596 ("subic", (gen_subic, 0x0)),
12597 ("lwzu", (gen_lwzu, 0x0)),
12598 ("fadd", (gen_fadd, 0x0)),
12599 ("lwax", (gen_lwax, 0x0)),
12600 ("fabs", (gen_fabs, 0x0)),
12601 ("beq+", (gen_beq, 0x200000)),
12602 ("bdnzla+", (gen_bdnz, 0x200003)),
12603 ("vmaxuw", (gen_vmaxuw, 0x0)),
12604 ("lvlx128", (gen_lvlx128, 0x0)),
12605 ("fsubs", (gen_fsubs, 0x0)),
12606 ("vmaxsw", (gen_vmaxsw, 0x0)),
12607 ("vmsumubm", (gen_vmsumubm, 0x0)),
12608 ("fcfid", (gen_fcfid, 0x0)),
12609 ("bnela+", (gen_bne, 0x200003)),
12610 ("addis", (gen_addis, 0x0)),
12611 ("vmulosh", (gen_vmulosh, 0x0)),
12612 ("bdztlrl+", (gen_bdztlr, 0x200001)),
12613 ("ps_madds1", (gen_ps_madds1, 0x0)),
12614 ("bdzlr", (gen_bdzlr, 0x0)),
12615 ("vmaddfp", (gen_vmaddfp, 0x0)),
12616 ("vcmpequb.", (gen_vcmpequb, 0x400)),
12617 ("bgel+", (gen_bge, 0x200001)),
12618 ("bnelr", (gen_bnelr, 0x0)),
12619 ("stwx", (gen_stwx, 0x0)),
12620 ("lbzx", (gen_lbzx, 0x0)),
12621 ("vmulesb", (gen_vmulesb, 0x0)),
12622 ("bdza", (gen_bdz, 0x2)),
12623 ("lvewx128", (gen_lvewx128, 0x0)),
12624 ("psq_lx", (gen_psq_lx, 0x0)),
12625 ("psq_stu", (gen_psq_stu, 0x0)),
12626 ("vsububm", (gen_vsububm, 0x0)),
12627 ("srawi.", (gen_srawi, 0x1)),
12628 ("subfic", (gen_subfic, 0x0)),
12629 ("vcfsx", (gen_vcfsx, 0x0)),
12630 ("ps_mul", (gen_ps_mul, 0x0)),
12631 ("rldimi", (gen_rldimi, 0x0)),
12632 ("stwux", (gen_stwux, 0x0)),
12633 ("fres", (gen_fres, 0x0)),
12634 ("vsel", (gen_vsel, 0x0)),
12635 ("bdzta+", (gen_bdzt, 0x200002)),
12636 ("vrsqrtefp", (gen_vrsqrtefp, 0x0)),
12637 ("dcbz", (gen_dcbz, 0x0)),
12638 ("vspltisw", (gen_vspltisw, 0x0)),
12639 ("vcmpequh.", (gen_vcmpequh, 0x400)),
12640 ("ps_mr.", (gen_ps_mr, 0x1)),
12641 ("rlwnm", (gen_rlwnm, 0x0)),
12642 ("rldicr", (gen_rldicr, 0x0)),
12643 ("vmaxsh", (gen_vmaxsh, 0x0)),
12644 ("bgectr", (gen_bgectr, 0x0)),
12645 ("subfco", (gen_subfc, 0x400)),
12646 ("stvx128", (gen_stvx128, 0x0)),
12647 ("fdiv", (gen_fdiv, 0x0)),
12648 ("fsqrts", (gen_fsqrts, 0x0)),
12649 ("rldicr.", (gen_rldicr, 0x1)),
12650 ("vsum4ubs", (gen_vsum4ubs, 0x0)),
12651 ("bge-", (gen_bge, 0x200000)),
12652 ("ps_abs.", (gen_ps_abs, 0x1)),
12653 ("lvewx", (gen_lvewx, 0x0)),
12654 ("lhzx", (gen_lhzx, 0x0)),
12655 ("cmpl", (gen_cmpl, 0x0)),
12656 ("bnsa-", (gen_bns, 0x200002)),
12657 ("mtfsf.", (gen_mtfsf, 0x1)),
12658 ("blelr+", (gen_blelr, 0x200000)),
12659 ("bltlr", (gen_bltlr, 0x0)),
12660 ("bdnzfa+", (gen_bdnzf, 0x200002)),
12661 ("vcmpequw128.", (gen_vcmpequw128, 0x40)),
12662 ("vcmpgtfp128.", (gen_vcmpgtfp128, 0x40)),
12663 ("bgtctr", (gen_bgtctr, 0x0)),
12664 ("bsol-", (gen_bso, 0x200001)),
12665 ("nand", (gen_nand, 0x0)),
12666 ("or.", (gen_or, 0x1)),
12667 ("beqctrl", (gen_beqctr, 0x1)),
12668 ("std", (gen_std, 0x0)),
12669 ("dcbtst", (gen_dcbtst, 0x0)),
12670 ("mfsprg", (gen_mfsprg, 0x0)),
12671 ("beqlr", (gen_beqlr, 0x0)),
12672 ("bltla", (gen_blt, 0x3)),
12673 ("vcmpequb", (gen_vcmpequb, 0x0)),
12674 ("lfsx", (gen_lfsx, 0x0)),
12675 ("fsub.", (gen_fsub, 0x1)),
12676 ("vsubsbs", (gen_vsubsbs, 0x0)),
12677 ("bdnzta+", (gen_bdnzt, 0x200002)),
12678 ("cntlzd", (gen_cntlzd, 0x0)),
12679 ("lvlx", (gen_lvlx, 0x0)),
12680 ("bgea-", (gen_bge, 0x200002)),
12681 ("vsubuwm", (gen_vsubuwm, 0x0)),
12682 ("bgtlrl", (gen_bgtlr, 0x1)),
12683 ("bca+", (gen_bc, 0x200002)),
12684 ("mulldo", (gen_mulld, 0x400)),
12685 ("bgtla", (gen_bgt, 0x3)),
12686 ("ps_msub", (gen_ps_msub, 0x0)),
12687 ("divw", (gen_divw, 0x0)),
12688 ("bnsl+", (gen_bns, 0x200001)),
12689 ("eqv", (gen_eqv, 0x0)),
12690 ("and.", (gen_and, 0x1)),
12691 ("dcbt", (gen_dcbt, 0x0)),
12692 ("vmaxuh", (gen_vmaxuh, 0x0)),
12693 ("bdnztla-", (gen_bdnzt, 0x200003)),
12694 ("bdzlrl", (gen_bdzlr, 0x1)),
12695 ("bgela-", (gen_bge, 0x200003)),
12696 ("lis", (gen_lis, 0x0)),
12697 ("bdztlr+", (gen_bdztlr, 0x200000)),
12698 ("vsubfp", (gen_vsubfp, 0x0)),
12699 ("bdnzla", (gen_bdnz, 0x3)),
12700 ("vminuh", (gen_vminuh, 0x0)),
12701 ("ps_neg", (gen_ps_neg, 0x0)),
12702 ("vpkuwus", (gen_vpkuwus, 0x0)),
12703 ("bdnza-", (gen_bdnz, 0x200002)),
12704 ("tdge", (gen_tdge, 0x0)),
12705 ("subfc.", (gen_subfc, 0x1)),
12706 ("ps_sub.", (gen_ps_sub, 0x1)),
12707 ("frsp", (gen_frsp, 0x0)),
12708 ("stdux", (gen_stdux, 0x0)),
12709 ("bdnztlr", (gen_bdnztlr, 0x0)),
12710 ("vsplth", (gen_vsplth, 0x0)),
12711 ("vminfp128", (gen_vminfp128, 0x0)),
12712 ("mfsrin", (gen_mfsrin, 0x0)),
12713 ("twlge", (gen_twlge, 0x0)),
12714 ("bgtctrl", (gen_bgtctr, 0x1)),
12715 ("sradi", (gen_sradi, 0x0)),
12716 ("vupkhsh128", (gen_vupkhsh128, 0x0)),
12717 ("fnmadd.", (gen_fnmadd, 0x1)),
12718 ("mtibatl", (gen_mtibatl, 0x0)),
12719 ("bnsla-", (gen_bns, 0x200003)),
12720 ("vaddfp128", (gen_vaddfp128, 0x0)),
12721 ("ps_abs", (gen_ps_abs, 0x0)),
12722 ("tweq", (gen_tweq, 0x0)),
12723 ("mfmsr", (gen_mfmsr, 0x0)),
12724 ("vsubuhm", (gen_vsubuhm, 0x0)),
12725 ("vmulesh", (gen_vmulesh, 0x0)),
12726 ("bdnz-", (gen_bdnz, 0x200000)),
12727 ("bdnzfla+", (gen_bdnzf, 0x200003)),
12728 ("bdzflrl+", (gen_bdzflr, 0x200001)),
12729 ("mtcrf", (gen_mtcrf, 0x0)),
12730 ("mfsrr1", (gen_mfsrr1, 0x0)),
12731 ("fadds", (gen_fadds, 0x0)),
12732 ("addco.", (gen_addc, 0x401)),
12733 ("divdo.", (gen_divd, 0x401)),
12734 ("fmsubs.", (gen_fmsubs, 0x1)),
12735 ("psq_stux", (gen_psq_stux, 0x0)),
12736 ("lvx", (gen_lvx, 0x0)),
12737 ("lhau", (gen_lhau, 0x0)),
12738 ("rlwimi.", (gen_rlwimi, 0x1)),
12739 ("bnectrl", (gen_bnectr, 0x1)),
12740 ("rlwinm", (gen_rlwinm, 0x0)),
12741 ("bdzfa-", (gen_bdzf, 0x200002)),
12742 ("mr.", (gen_mr, 0x1)),
12743 ("eieio", (gen_eieio, 0x0)),
12744 ("vmrglw", (gen_vmrglw, 0x0)),
12745 ("vmsum4fp128", (gen_vmsum4fp128, 0x0)),
12746 ("clrlslwi", (gen_clrlslwi, 0x0)),
12747 ("fmsub", (gen_fmsub, 0x0)),
12748 ("vmaxfp", (gen_vmaxfp, 0x0)),
12749 ("addmeo", (gen_addme, 0x400)),
12750 ("b", (gen_b, 0x0)),
12751 ("bdzt+", (gen_bdzt, 0x200000)),
12752 ("vminuw", (gen_vminuw, 0x0)),
12753 ("subis", (gen_subis, 0x0)),
12754 ("vmrghw128", (gen_vmrghw128, 0x0)),
12755 ("lvrx", (gen_lvrx, 0x0)),
12756 ("lwa", (gen_lwa, 0x0)),
12757 ("ps_madds1.", (gen_ps_madds1, 0x1)),
12758 ("rfi", (gen_rfi, 0x0)),
12759 ("vsro", (gen_vsro, 0x0)),
12760 ("bctrl", (gen_bctr, 0x1)),
12761 ("stswi", (gen_stswi, 0x0)),
12762 ("bnsl-", (gen_bns, 0x200001)),
12763 ("bdzfla", (gen_bdzf, 0x3)),
12764 ("rldcr", (gen_rldcr, 0x0)),
12765 ("bltlrl", (gen_bltlr, 0x1)),
12766 ("cmplwi", (gen_cmplwi, 0x0)),
12767 ("ps_add.", (gen_ps_add, 0x1)),
12768 ("clrlwi", (gen_clrlwi, 0x0)),
12769 ("crnor", (gen_crnor, 0x0)),
12770 ("blel+", (gen_ble, 0x200001)),
12771 ("tdnei", (gen_tdnei, 0x0)),
12772 ("cmpw", (gen_cmpw, 0x0)),
12773 ("divw.", (gen_divw, 0x1)),
12774 ("blela+", (gen_ble, 0x200003)),
12775 ("bsoa", (gen_bso, 0x2)),
12776 ("vpkuhus128", (gen_vpkuhus128, 0x0)),
12777 ("mfdbatu", (gen_mfdbatu, 0x0)),
12778 ("srwi", (gen_srwi, 0x0)),
12779 ("mtxer", (gen_mtxer, 0x0)),
12780 ("mtsrr0", (gen_mtsrr0, 0x0)),
12781 ("mullw", (gen_mullw, 0x0)),
12782 ("mfctr", (gen_mfctr, 0x0)),
12783 ("bdzfla+", (gen_bdzf, 0x200003)),
12784 ("lvsl", (gen_lvsl, 0x0)),
12785 ("bltl", (gen_blt, 0x1)),
12786 ("subfe.", (gen_subfe, 0x1)),
12787 ("mulhdu", (gen_mulhdu, 0x0)),
12788 ("fcmpu", (gen_fcmpu, 0x0)),
12789 ("blea", (gen_ble, 0x2)),
12790 ("bdnzf+", (gen_bdnzf, 0x200000)),
12791 ("vctsxs", (gen_vctsxs, 0x0)),
12792 ("subfzeo.", (gen_subfze, 0x401)),
12793 ("bdztlrl", (gen_bdztlr, 0x1)),
12794 ("vcmpgtsh", (gen_vcmpgtsh, 0x0)),
12795 ("stfdx", (gen_stfdx, 0x0)),
12796 ("add", (gen_add, 0x0)),
12797 ("bnsa+", (gen_bns, 0x200002)),
12798 ("ps_sub", (gen_ps_sub, 0x0)),
12799 ("bdnzflr+", (gen_bdnzflr, 0x200000)),
12800 ("bdza+", (gen_bdz, 0x200002)),
12801 ("blectr+", (gen_blectr, 0x200000)),
12802 ("vcfux128", (gen_vcfux128, 0x0)),
12803 ("bdzta-", (gen_bdzt, 0x200002)),
12804 ("lbz", (gen_lbz, 0x0)),
12805 ("beql-", (gen_beq, 0x200001)),
12806 ("bdzl+", (gen_bdz, 0x200001)),
12807 ("fnmadds.", (gen_fnmadds, 0x1)),
12808 ("crand", (gen_crand, 0x0)),
12809 ("lmw", (gen_lmw, 0x0)),
12810 ("beqla", (gen_beq, 0x3)),
12811 ("beqlr+", (gen_beqlr, 0x200000)),
12812 ("bdnzfa-", (gen_bdnzf, 0x200002)),
12813 ("vmulouh", (gen_vmulouh, 0x0)),
12814 ("bdzfl", (gen_bdzf, 0x1)),
12815 ("bdnzfl", (gen_bdnzf, 0x1)),
12816 ("bsoa+", (gen_bso, 0x200002)),
12817 ("bge+", (gen_bge, 0x200000)),
12818 ("vpkshus128", (gen_vpkshus128, 0x0)),
12819 ("bltctr+", (gen_bltctr, 0x200000)),
12820 ("vcmpeqfp128", (gen_vcmpeqfp128, 0x0)),
12821 ("stdx", (gen_stdx, 0x0)),
12822 ("fneg", (gen_fneg, 0x0)),
12823 ("subic.", (gen_subic_, 0x0)),
12824 ("vupklsh", (gen_vupklsh, 0x0)),
12825 ("vmsumuhm", (gen_vmsumuhm, 0x0)),
12826 ("mtdsisr", (gen_mtdsisr, 0x0)),
12827 ("mulhw", (gen_mulhw, 0x0)),
12828 ("vcmpgtuw", (gen_vcmpgtuw, 0x0)),
12829 ("ps_mr", (gen_ps_mr, 0x0)),
12830 ("bgtla-", (gen_bgt, 0x200003)),
12831 ("subfeo.", (gen_subfe, 0x401)),
12832 ("twgti", (gen_twgti, 0x0)),
12833 ("blrl", (gen_blr, 0x1)),
12834 ("vpermwi128", (gen_vpermwi128, 0x0)),
12835 ("extlwi.", (gen_extlwi, 0x1)),
12836 ("vcmpgtsb", (gen_vcmpgtsb, 0x0)),
12837 ("rlwnm.", (gen_rlwnm, 0x1)),
12838 ("vslw128", (gen_vslw128, 0x0)),
12839 ("rldcr.", (gen_rldcr, 0x1)),
12840 ("vpkswus128", (gen_vpkswus128, 0x0)),
12841 ("addeo", (gen_adde, 0x400)),
12842 ("bnsctrl", (gen_bnsctr, 0x1)),
12843 ("beqa", (gen_beq, 0x2)),
12844 ("bc+", (gen_bc, 0x200000)),
12845 ("lvrxl", (gen_lvrxl, 0x0)),
12846 ("vsubshs", (gen_vsubshs, 0x0)),
12847 ("bnel", (gen_bne, 0x1)),
12848 ("mttbu", (gen_mttbu, 0x0)),
12849 ("tlbie", (gen_tlbie, 0x0)),
12850 ("bso+", (gen_bso, 0x200000)),
12851 ("mtsrr1", (gen_mtsrr1, 0x0)),
12852 ("mtsprg", (gen_mtsprg, 0x0)),
12853 ("fsqrt", (gen_fsqrt, 0x0)),
12854 ("mftb", (gen_mftb, 0x0)),
12855 ("bdzt", (gen_bdzt, 0x0)),
12856 ("addze", (gen_addze, 0x0)),
12857 ("stvewx", (gen_stvewx, 0x0)),
12858 ("rlwimi", (gen_rlwimi, 0x0)),
12859 ("mfibatl", (gen_mfibatl, 0x0)),
12860 ("bdzf-", (gen_bdzf, 0x200000)),
12861 ("vctsxs128", (gen_vctsxs128, 0x0)),
12862 ("vrfin", (gen_vrfin, 0x0)),
12863 ("cmplw", (gen_cmplw, 0x0)),
12864 ("twui", (gen_twui, 0x0)),
12865 ("xori", (gen_xori, 0x0)),
12866 ("lwzux", (gen_lwzux, 0x0)),
12867 ("bdnzfla", (gen_bdnzf, 0x3)),
12868 ("bgtl", (gen_bgt, 0x1)),
12869 ("fadds.", (gen_fadds, 0x1)),
12870 ("vsrah", (gen_vsrah, 0x0)),
12871 ("ps_nmadd", (gen_ps_nmadd, 0x0)),
12872 ("ps_merge01", (gen_ps_merge01, 0x0)),
12873 ("lwsync", (gen_lwsync, 0x0)),
12874 ("oris", (gen_oris, 0x0)),
12875 ("icbi.", (gen_icbi, 0x1)),
12876 ("lvsr", (gen_lvsr, 0x0)),
12877 ("vcmpgtsw.", (gen_vcmpgtsw, 0x400)),
12878 ("srw", (gen_srw, 0x0)),
12879 ("cntlzw", (gen_cntlzw, 0x0)),
12880 ("bgectr+", (gen_bgectr, 0x200000)),
12881 ("mtfsb1", (gen_mtfsb1, 0x0)),
12882 ("vspltw128", (gen_vspltw128, 0x0)),
12883 ("bnela-", (gen_bne, 0x200003)),
12884 ("vspltisw128", (gen_vspltisw128, 0x0)),
12885 ("vupkhsb", (gen_vupkhsb, 0x0)),
12886 ("vsr", (gen_vsr, 0x0)),
12887 ("vmrghh", (gen_vmrghh, 0x0)),
12888 ("mtdbatl", (gen_mtdbatl, 0x0)),
12889 ("sthu", (gen_sthu, 0x0)),
12890 ("ps_res", (gen_ps_res, 0x0)),
12891 ("vxor128", (gen_vxor128, 0x0)),
12892 ("vcmpgefp.", (gen_vcmpgefp, 0x400)),
12893 ("sld", (gen_sld, 0x0)),
12894 ("bdnzta-", (gen_bdnzt, 0x200002)),
12895 ("ps_madd", (gen_ps_madd, 0x0)),
12896 ("icbi", (gen_icbi, 0x0)),
12897 ("vaddshs", (gen_vaddshs, 0x0)),
12898 ("bne-", (gen_bne, 0x200000)),
12899 ("bdnz", (gen_bdnz, 0x0)),
12900 ("sync", (gen_sync, 0x0)),
12901 ("mtsrdin", (gen_mtsrdin, 0x0)),
12902 ("bca-", (gen_bc, 0x200002)),
12903 ("bdztl", (gen_bdzt, 0x1)),
12904 ("extsh", (gen_extsh, 0x0)),
12905 ("extlwi", (gen_extlwi, 0x0)),
12906 ("beqla-", (gen_beq, 0x200003)),
12907 ("divwo", (gen_divw, 0x400)),
12908 ("vmrglw128", (gen_vmrglw128, 0x0)),
12909 ("vupklpx", (gen_vupklpx, 0x0)),
12910 ("ble+", (gen_ble, 0x200000)),
12911 ("dcbz_l", (gen_dcbz_l, 0x0)),
12912 ("stfs", (gen_stfs, 0x0)),
12913 ("mulhwu", (gen_mulhwu, 0x0)),
12914 ("fcfid.", (gen_fcfid, 0x1)),
12915 ("vpkshss", (gen_vpkshss, 0x0)),
12916 ("mtfsf", (gen_mtfsf, 0x0)),
12917 ("fnabs", (gen_fnabs, 0x0)),
12918 ("vspltisb", (gen_vspltisb, 0x0)),
12919 ("andis.", (gen_andis_, 0x0)),
12920 ("vcmpbfp128.", (gen_vcmpbfp128, 0x40)),
12921 ("extsw.", (gen_extsw, 0x1)),
12922 ("crnand", (gen_crnand, 0x0)),
12923 ("mtdec", (gen_mtdec, 0x0)),
12924 ("stvlx128", (gen_stvlx128, 0x0)),
12925 ("vnor128", (gen_vnor128, 0x0)),
12926 ("fnmsub", (gen_fnmsub, 0x0)),
12927 ("dcbi", (gen_dcbi, 0x0)),
12928 ("vminsb", (gen_vminsb, 0x0)),
12929 ("bdnzflrl", (gen_bdnzflr, 0x1)),
12930 ("ble-", (gen_ble, 0x200000)),
12931 ("subfe", (gen_subfe, 0x0)),
12932 ("addic", (gen_addic, 0x0)),
12933 ("cmpld", (gen_cmpld, 0x0)),
12934 ("vexptefp128", (gen_vexptefp128, 0x0)),
12935 ("fmsub.", (gen_fmsub, 0x1)),
12936 ("mtfsfi", (gen_mtfsfi, 0x0)),
12937 ("bnea-", (gen_bne, 0x200002)),
12938 ("ps_merge00.", (gen_ps_merge00, 0x1)),
12939 ("stfsu", (gen_stfsu, 0x0)),
12940 ("beqlrl+", (gen_beqlr, 0x200001)),
12941 ("beql", (gen_beq, 0x1)),
12942 ("slwi.", (gen_slwi, 0x1)),
12943 ("mtfsb0", (gen_mtfsb0, 0x0)),
12944 ("ps_merge11.", (gen_ps_merge11, 0x1)),
12945 ("vcmpgtfp128", (gen_vcmpgtfp128, 0x0)),
12946 ("vctuxs128", (gen_vctuxs128, 0x0)),
12947 ("mcrfs", (gen_mcrfs, 0x0)),
12948 ("bnsctrl+", (gen_bnsctr, 0x200001)),
12949 ("addo", (gen_add, 0x400)),
12950 ("ptesync", (gen_ptesync, 0x0)),
12951 ("bdnztla+", (gen_bdnzt, 0x200003)),
12952 ("sthx", (gen_sthx, 0x0)),
12953 ("bgelrl+", (gen_bgelr, 0x200001)),
12954 ("fctid", (gen_fctid, 0x0)),
12955 ("extsw", (gen_extsw, 0x0)),
12956 ("trap", (gen_trap, 0x0)),
12957 ("vlogefp", (gen_vlogefp, 0x0)),
12958 ("fcmpo", (gen_fcmpo, 0x0)),
12959 ("fnmsubs.", (gen_fnmsubs, 0x1)),
12960 ("vrefp", (gen_vrefp, 0x0)),
12961 ("bdzfa+", (gen_bdzf, 0x200002)),
12962 ("add.", (gen_add, 0x1)),
12963 ("vsubcuw", (gen_vsubcuw, 0x0)),
12964 ("fctiw.", (gen_fctiw, 0x1)),
12965 ("srad.", (gen_srad, 0x1)),
12966 ("lvxl", (gen_lvxl, 0x0)),
12967 ("stfsx", (gen_stfsx, 0x0)),
12968 ("rldic", (gen_rldic, 0x0)),
12969 ("vand", (gen_vand, 0x0)),
12970 ("vupklsh128", (gen_vupklsh128, 0x0)),
12971 ("lfsu", (gen_lfsu, 0x0)),
12972 ("fsub", (gen_fsub, 0x0)),
12973 ("frsp.", (gen_frsp, 0x1)),
12974 ("bgectrl", (gen_bgectr, 0x1)),
12975 ("bdzflr", (gen_bdzflr, 0x0)),
12976 ("bca", (gen_bc, 0x2)),
12977 ("bdz+", (gen_bdz, 0x200000)),
12978 ("vpkuwum128", (gen_vpkuwum128, 0x0)),
12979 ("mtdbatu", (gen_mtdbatu, 0x0)),
12980 ("bdztl+", (gen_bdzt, 0x200001)),
12981 ("subfeo", (gen_subfe, 0x400)),
12982 ("bgelr", (gen_bgelr, 0x0)),
12983 ("vupklsb128", (gen_vupklsb128, 0x0)),
12984 ("lwaux", (gen_lwaux, 0x0)),
12985 ("tw", (gen_tw, 0x0)),
12986 ("stdu", (gen_stdu, 0x0)),
12987 ("bltlrl+", (gen_bltlr, 0x200001)),
12988 ("fadd.", (gen_fadd, 0x1)),
12989 ("divwo.", (gen_divw, 0x401)),
12990 ("cmpdi", (gen_cmpdi, 0x0)),
12991 ("psq_lu", (gen_psq_lu, 0x0)),
12992 ("mfspr", (gen_mfspr, 0x0)),
12993 ("bgtctrl+", (gen_bgtctr, 0x200001)),
12994 ("fnmsubs", (gen_fnmsubs, 0x0)),
12995 ("ps_mul.", (gen_ps_mul, 0x1)),
12996 ("bgectrl+", (gen_bgectr, 0x200001)),
12997 ("rldic.", (gen_rldic, 0x1)),
12998 ("ps_merge11", (gen_ps_merge11, 0x0)),
12999 ("bdnzl+", (gen_bdnz, 0x200001)),
13000 ("mfsrr0", (gen_mfsrr0, 0x0)),
13001 ("crorc", (gen_crorc, 0x0)),
13002 ("vcmpgtuh.", (gen_vcmpgtuh, 0x400)),
13003 ("dstt", (gen_dst, 0x2000000)),
13004 ("fnmsub.", (gen_fnmsub, 0x1)),
13005 ("bclr+", (gen_bclr, 0x200000)),
13006 ("stwbrx", (gen_stwbrx, 0x0)),
13007 ("vspltw", (gen_vspltw, 0x0)),
13008 ("vcmpgtsw", (gen_vcmpgtsw, 0x0)),
13009 ("subf", (gen_subf, 0x0)),
13010 ("addc", (gen_addc, 0x0)),
13011 ("lvsl128", (gen_lvsl128, 0x0)),
13012 ("bgt", (gen_bgt, 0x0)),
13013 ("subfmeo.", (gen_subfme, 0x401)),
13014 ("bltctrl+", (gen_bltctr, 0x200001)),
13015 ("vcmpgtsb.", (gen_vcmpgtsb, 0x400)),
13016 ("fnabs.", (gen_fnabs, 0x1)),
13017 ("subfo", (gen_subf, 0x400)),
13018 ("fabs.", (gen_fabs, 0x1)),
13019 ("bgelr+", (gen_bgelr, 0x200000)),
13020 ("bsola", (gen_bso, 0x3)),
13021 ("bcctr+", (gen_bcctr, 0x200000)),
13022 ("bne", (gen_bne, 0x0)),
13023 ("bgtlrl+", (gen_bgtlr, 0x200001)),
13024 ("fneg.", (gen_fneg, 0x1)),
13025 ("ecowx", (gen_ecowx, 0x0)),
13026 ("lfdx", (gen_lfdx, 0x0)),
13027 ("vcmpgtuw.", (gen_vcmpgtuw, 0x400)),
13028 ("bdzlrl+", (gen_bdzlr, 0x200001)),
13029 ("rldicl", (gen_rldicl, 0x0)),
13030 ("bnelrl+", (gen_bnelr, 0x200001)),
13031 ("bns+", (gen_bns, 0x200000)),
13032 ("fctidz", (gen_fctidz, 0x0)),
13033 ("vmrghw", (gen_vmrghw, 0x0)),
13034 ("bsoctrl", (gen_bsoctr, 0x1)),
13035 ("bcctrl", (gen_bcctr, 0x1)),
13036 ("bgela+", (gen_bge, 0x200003)),
13037 ("bdnzta", (gen_bdnzt, 0x2)),
13038 ("fmadds", (gen_fmadds, 0x0)),
13039 ("fmuls", (gen_fmuls, 0x0)),
13040 ("bdztl-", (gen_bdzt, 0x200001)),
13041 ("bdnza+", (gen_bdnz, 0x200002)),
13042 ("bnslrl", (gen_bnslr, 0x1)),
13043 ("bcla", (gen_bc, 0x3)),
13044 ("mfibatu", (gen_mfibatu, 0x0)),
13045 ("mtear", (gen_mtear, 0x0)),
13046 ("vsrw128", (gen_vsrw128, 0x0)),
13047 ("beq", (gen_beq, 0x0)),
13048 ("lvlxl", (gen_lvlxl, 0x0)),
13049 ("mullw.", (gen_mullw, 0x1)),
13050 ("bdzlr+", (gen_bdzlr, 0x200000)),
13051 ("bcl+", (gen_bc, 0x200001)),
13052 ("bla", (gen_b, 0x3)),
13053 ("vupkd3d128", (gen_vupkd3d128, 0x0)),
13054 ("tdlnl", (gen_tdlnl, 0x0)),
13055 ("vspltish", (gen_vspltish, 0x0)),
13056 ("lfd", (gen_lfd, 0x0)),
13057 ("ps_div.", (gen_ps_div, 0x1)),
13058 ("lfsux", (gen_lfsux, 0x0)),
13059 ("divduo.", (gen_divdu, 0x401)),
13060 ("addeo.", (gen_adde, 0x401)),
13061 ("rotlwi", (gen_rotlwi, 0x0)),
13062 ("ps_sel", (gen_ps_sel, 0x0)),
13063 ("stvehx", (gen_stvehx, 0x0)),
13064 ("clrrwi", (gen_clrrwi, 0x0)),
13065 ("nego.", (gen_neg, 0x401)),
13066 ("twi", (gen_twi, 0x0)),
13067 ("bdnztl-", (gen_bdnzt, 0x200001)),
13068 ("vsrw", (gen_vsrw, 0x0)),
13069 ("fnmadd", (gen_fnmadd, 0x0)),
13070 ("vperm", (gen_vperm, 0x0)),
13071 ("vaddfp", (gen_vaddfp, 0x0)),
13072 ("mffs", (gen_mffs, 0x0)),
13073 ("mflr", (gen_mflr, 0x0)),
13074 ("bdzla+", (gen_bdz, 0x200003)),
13075 ("crset", (gen_crset, 0x0)),
13076 ("bsolrl", (gen_bsolr, 0x1)),
13077 ("bdzla-", (gen_bdz, 0x200003)),
13078 ("mulhd", (gen_mulhd, 0x0)),
13079 ("blt+", (gen_blt, 0x200000)),
13080 ("cntlzd.", (gen_cntlzd, 0x1)),
13081 ("addic.", (gen_addic_, 0x0)),
13082 ("bsoctr", (gen_bsoctr, 0x0)),
13083 ("vmaxfp128", (gen_vmaxfp128, 0x0)),
13084 ("vpkshss128", (gen_vpkshss128, 0x0)),
13085 ("vmrglb", (gen_vmrglb, 0x0)),
13086 ("bdzl-", (gen_bdz, 0x200001)),
13087 ("xor.", (gen_xor, 0x1)),
13088 ("vrfiz", (gen_vrfiz, 0x0)),
13089 ("slbia", (gen_slbia, 0x0)),
13090 ("stvlxl", (gen_stvlxl, 0x0)),
13091 ("mtctr", (gen_mtctr, 0x0)),
13092 ("dss", (gen_dss, 0x0)),
13093 ("mullwo", (gen_mullw, 0x400)),
13094 ("stvlxl128", (gen_stvlxl128, 0x0)),
13095 ("vcmpgtub.", (gen_vcmpgtub, 0x400)),
13096 ("bso", (gen_bso, 0x0)),
13097 ("stbu", (gen_stbu, 0x0)),
13098 ("bdnzlr+", (gen_bdnzlr, 0x200000)),
13099 ("vupkhpx", (gen_vupkhpx, 0x0)),
13100 ("bdztla-", (gen_bdzt, 0x200003)),
13101 ("vsrb", (gen_vsrb, 0x0)),
13102 ("bdnzt", (gen_bdnzt, 0x0)),
13103 ("rotrwi", (gen_rotrwi, 0x0)),
13104 ("divwu", (gen_divwu, 0x0)),
13105 ("vcmpequw", (gen_vcmpequw, 0x0)),
13106 ("bc", (gen_bc, 0x0)),
13107 ("mtmsrd", (gen_mtmsrd, 0x0)),
13108 ("bsola+", (gen_bso, 0x200003)),
13109 ("mtfsfi.", (gen_mtfsfi, 0x1)),
13110 ("rldimi.", (gen_rldimi, 0x1)),
13111 ("bcctrl+", (gen_bcctr, 0x200001)),
13112 ("bnelrl", (gen_bnelr, 0x1)),
13113 ("bclr", (gen_bclr, 0x0)),
13114 ("psq_l", (gen_psq_l, 0x0)),
13115 ("nand.", (gen_nand, 0x1)),
13116 ("bdzflr+", (gen_bdzflr, 0x200000)),
13117 ("clrrwi.", (gen_clrrwi, 0x1)),
13118 ("mulhd.", (gen_mulhd, 0x1)),
13119 ("clrlslwi.", (gen_clrlslwi, 0x1)),
13120 ("vnor", (gen_vnor, 0x0)),
13121 ("bltlr+", (gen_bltlr, 0x200000)),
13122 ("vadduwm", (gen_vadduwm, 0x0)),
13123 ("ps_rsqrte.", (gen_ps_rsqrte, 0x1)),
13124 ("srw.", (gen_srw, 0x1)),
13125 ("vcmpbfp", (gen_vcmpbfp, 0x0)),
13126 ("subfmeo", (gen_subfme, 0x400)),
13127 ("bdnztlrl", (gen_bdnztlr, 0x1)),
13128 ("bdnza", (gen_bdnz, 0x2)),
13129 ("or", (gen_or, 0x0)),
13130 ("rotld.", (gen_rotld, 0x1)),
13131 ("bgtl+", (gen_bgt, 0x200001)),
13132 ("lvrxl128", (gen_lvrxl128, 0x0)),
13133 ("bsoctrl+", (gen_bsoctr, 0x200001)),
13134 ("addzeo.", (gen_addze, 0x401)),
13135 ("beqlrl", (gen_beqlr, 0x1)),
13136 ("bgta-", (gen_bgt, 0x200002)),
13137 ("mtmsr", (gen_mtmsr, 0x0)),
13138 ("fmul", (gen_fmul, 0x0)),
13139 ("ldarx", (gen_ldarx, 0x0)),
13140 ("vaddsws", (gen_vaddsws, 0x0)),
13141 ("adde.", (gen_adde, 0x1)),
13142 ("mfcr", (gen_mfcr, 0x0)),
13143 ("divduo", (gen_divdu, 0x400)),
13144 ("vpkpx", (gen_vpkpx, 0x0)),
13145 ("mfdsisr", (gen_mfdsisr, 0x0)),
13146 ("blea+", (gen_ble, 0x200002)),
13147 ("mfdbatl", (gen_mfdbatl, 0x0)),
13148 ("mulli", (gen_mulli, 0x0)),
13149 ("blea-", (gen_ble, 0x200002)),
13150 ("cror", (gen_cror, 0x0)),
13151 ("bgea", (gen_bge, 0x2)),
13152 ("vrfiz128", (gen_vrfiz128, 0x0)),
13153 ("bdzt-", (gen_bdzt, 0x200000)),
13154 ("sraw", (gen_sraw, 0x0)),
13155 ("vpkshus", (gen_vpkshus, 0x0)),
13156 ("vsel128", (gen_vsel128, 0x0)),
13157 ("vnmsubfp", (gen_vnmsubfp, 0x0)),
13158 ("vrlb", (gen_vrlb, 0x0)),
13159 ("tlbsync", (gen_tlbsync, 0x0)),
13160 ("sradi.", (gen_sradi, 0x1)),
13161 ("vmaxub", (gen_vmaxub, 0x0)),
13162 ("fdiv.", (gen_fdiv, 0x1)),
13163 ("vslw", (gen_vslw, 0x0)),
13164 ("subfme", (gen_subfme, 0x0)),
13165 ("mfear", (gen_mfear, 0x0)),
13166 ("rldicl.", (gen_rldicl, 0x1)),
13167 ("beqctrl+", (gen_beqctr, 0x200001)),
13168 ("vminsw", (gen_vminsw, 0x0)),
13169 ("ps_cmpo0", (gen_ps_cmpo0, 0x0)),
13170 ("vrlw", (gen_vrlw, 0x0)),
13171 ("mtsrin", (gen_mtsrin, 0x0)),
13172 ("fsubs.", (gen_fsubs, 0x1)),
13173 ("rldcl", (gen_rldcl, 0x0)),
13174 ("bdnztl", (gen_bdnzt, 0x1)),
13175 ("fctidz.", (gen_fctidz, 0x1)),
13176 ("ps_sum0", (gen_ps_sum0, 0x0)),
13177 ("frsqrte.", (gen_frsqrte, 0x1)),
13178 ("bsolr+", (gen_bsolr, 0x200000)),
13179 ("vaddsbs", (gen_vaddsbs, 0x0)),
13180 ("bnela", (gen_bne, 0x3)),
13181 ("rotlwi.", (gen_rotlwi, 0x1)),
13182 ("vsum4sbs", (gen_vsum4sbs, 0x0)),
13183 ("vmuloub", (gen_vmuloub, 0x0)),
13184 ("vpkswus", (gen_vpkswus, 0x0)),
13185 ("bgtl-", (gen_bgt, 0x200001)),
13186 ("vcmpgefp", (gen_vcmpgefp, 0x0)),
13187 ("dcbzl", (gen_dcbzl, 0x0)),
13188 ("mulld.", (gen_mulld, 0x1)),
13189 ("slbie", (gen_slbie, 0x0)),
13190 ("subfo.", (gen_subf, 0x401)),
13191 ("bnsl", (gen_bns, 0x1)),
13192 ("stbx", (gen_stbx, 0x0)),
13193 ("mulldo.", (gen_mulld, 0x401)),
13194 ("vrfim128", (gen_vrfim128, 0x0)),
13195 ("vcmpgefp128.", (gen_vcmpgefp128, 0x40)),
13196 ("mfvscr", (gen_mfvscr, 0x0)),
13197 ("mfdar", (gen_mfdar, 0x0)),
13198 ("vsro128", (gen_vsro128, 0x0)),
13199 ("mulld", (gen_mulld, 0x0)),
13200 ("vandc", (gen_vandc, 0x0)),
13201 ("bdzta", (gen_bdzt, 0x2)),
13202 ("stwu", (gen_stwu, 0x0)),
13203 ("addc.", (gen_addc, 0x1)),
13204 ("tdi", (gen_tdi, 0x0)),
13205 ("ps_muls1.", (gen_ps_muls1, 0x1)),
13206 ("bgt-", (gen_bgt, 0x200000)),
13207 ("vaddcuw", (gen_vaddcuw, 0x0)),
13208 ("lvebx", (gen_lvebx, 0x0)),
13209 ("vadduws", (gen_vadduws, 0x0)),
13210 ("bdnzflr", (gen_bdnzflr, 0x0)),
13211 ("vminfp", (gen_vminfp, 0x0)),
13212 ("lbzux", (gen_lbzux, 0x0)),
13213 ("vcmpeqfp128.", (gen_vcmpeqfp128, 0x40)),
13214 ("blectr", (gen_blectr, 0x0)),
13215 ("addmeo.", (gen_addme, 0x401)),
13216 ("vmsumuhs", (gen_vmsumuhs, 0x0)),
13217 ("vavguh", (gen_vavguh, 0x0)),
13218 ("vrefp128", (gen_vrefp128, 0x0)),
13219 ("rotrwi.", (gen_rotrwi, 0x1)),
13220 ("bsol", (gen_bso, 0x1)),
13221 ("orc", (gen_orc, 0x0)),
13222 ("vslo", (gen_vslo, 0x0)),
13223 ("vsrh", (gen_vsrh, 0x0)),
13224 ("vslb", (gen_vslb, 0x0)),
13225 ("addi", (gen_addi, 0x0)),
13226 ("lhzu", (gen_lhzu, 0x0)),
13227 ("eqv.", (gen_eqv, 0x1)),
13228 ("fctiwz", (gen_fctiwz, 0x0)),
13229 ("vsraw128", (gen_vsraw128, 0x0)),
13230 ("cmpli", (gen_cmpli, 0x0)),
13231 ("vrlw128", (gen_vrlw128, 0x0)),
13232 ("ps_madd.", (gen_ps_madd, 0x1)),
13233 ("bnel+", (gen_bne, 0x200001)),
13234 ("ps_madds0.", (gen_ps_madds0, 0x1)),
13235 ("vcfux", (gen_vcfux, 0x0)),
13236 ("bns", (gen_bns, 0x0)),
13237 ("bgt+", (gen_bgt, 0x200000)),
13238 ("extrwi.", (gen_extrwi, 0x1)),
13239 ("bnslrl+", (gen_bnslr, 0x200001)),
13240 ("lfdu", (gen_lfdu, 0x0)),
13241 ("vrfip128", (gen_vrfip128, 0x0)),
13242 ("vmsum3fp128", (gen_vmsum3fp128, 0x0)),
13243 ("bnsla", (gen_bns, 0x3)),
13244 ("vandc128", (gen_vandc128, 0x0)),
13245 ("lha", (gen_lha, 0x0)),
13246 ("stvxl", (gen_stvxl, 0x0)),
13247 ("bgelrl", (gen_bgelr, 0x1)),
13248 ("ps_res.", (gen_ps_res, 0x1)),
13249 ("bcla-", (gen_bc, 0x200003)),
13250 ("bdz-", (gen_bdz, 0x200000)),
13251 ("lbzu", (gen_lbzu, 0x0)),
13252 ("lwzx", (gen_lwzx, 0x0)),
13253 ("bdzfa", (gen_bdzf, 0x2)),
13254 ("vsl", (gen_vsl, 0x0)),
13255 ("vslo128", (gen_vslo128, 0x0)),
13256 ("bsolrl+", (gen_bsolr, 0x200001)),
13257 ("ps_nmsub.", (gen_ps_nmsub, 0x1)),
13258 ("bgtla+", (gen_bgt, 0x200003)),
13259 ("subfzeo", (gen_subfze, 0x400)),
13260 ("bsolr", (gen_bsolr, 0x0)),
13261 ("ps_div", (gen_ps_div, 0x0)),
13262 ("cmpi", (gen_cmpi, 0x0)),
13263 ("srd.", (gen_srd, 0x1)),
13264 ("vpkd3d128", (gen_vpkd3d128, 0x0)),
13265 ("crnot", (gen_crnot, 0x0)),
13266 ("blela-", (gen_ble, 0x200003)),
13267 ("vavgsw", (gen_vavgsw, 0x0)),
13268 ("addze.", (gen_addze, 0x1)),
13269 ("psq_st", (gen_psq_st, 0x0)),
13270 ("bdzflrl", (gen_bdzflr, 0x1)),
13271 ("stvrx", (gen_stvrx, 0x0)),
13272 ("xor", (gen_xor, 0x0)),
13273 ("bnea+", (gen_bne, 0x200002)),
13274 ("bdnzf-", (gen_bdnzf, 0x200000)),
13275 ("addzeo", (gen_addze, 0x400)),
13276 ("divdu", (gen_divdu, 0x0)),
13277 ("blr", (gen_blr, 0x0)),
13278 ("lvrx128", (gen_lvrx128, 0x0)),
13279 ("srwi.", (gen_srwi, 0x1)),
13280 ("bdnzt+", (gen_bdnzt, 0x200000)),
13281 ("andc", (gen_andc, 0x0)),
13282 ("vminub", (gen_vminub, 0x0)),
13283 ("vnot", (gen_vnot, 0x0)),
13284 ("mulhdu.", (gen_mulhdu, 0x1)),
13285 ("bnectr+", (gen_bnectr, 0x200000)),
13286 ("vsum4shs", (gen_vsum4shs, 0x0)),
13287 ("bdz", (gen_bdz, 0x0)),
13288 ("bdztla+", (gen_bdzt, 0x200003)),
13289 ("vsldoi128", (gen_vsldoi128, 0x0)),
13290 ("nor", (gen_nor, 0x0)),
13291 ("blelrl", (gen_blelr, 0x1)),
13292 ("lvlxl128", (gen_lvlxl128, 0x0)),
13293 ("stvrxl", (gen_stvrxl, 0x0)),
13294 ("isync", (gen_isync, 0x0)),
13295 ("ps_cmpu1", (gen_ps_cmpu1, 0x0)),
13296 ("mtspr", (gen_mtspr, 0x0)),
13297 ("mttbl", (gen_mttbl, 0x0)),
13298 ("vsububs", (gen_vsububs, 0x0)),
13299 ("bdnzfla-", (gen_bdnzf, 0x200003)),
13300 ("crclr", (gen_crclr, 0x0)),
13301 ("crandc", (gen_crandc, 0x0)),
13302 ("extsb.", (gen_extsb, 0x1)),
13303 ("mfsdr1", (gen_mfsdr1, 0x0)),
13304 ("ps_sum1.", (gen_ps_sum1, 0x1)),
13305 ("bcla+", (gen_bc, 0x200003)),
13306 ("lvx128", (gen_lvx128, 0x0)),
13307 ("bdzl", (gen_bdz, 0x1)),
13308 ("sthbrx", (gen_sthbrx, 0x0)),
13309 ("vavgub", (gen_vavgub, 0x0)),
13310 ("bgtlr+", (gen_bgtlr, 0x200000)),
13311 ("mullwo.", (gen_mullw, 0x401)),
13312 ("bdnzlrl", (gen_bdnzlr, 0x1)),
13313 ("rldcl.", (gen_rldcl, 0x1)),
13314 ("bsoa-", (gen_bso, 0x200002)),
13315 ("blt-", (gen_blt, 0x200000)),
13316 ("vrfim", (gen_vrfim, 0x0)),
13317 ("ps_merge01.", (gen_ps_merge01, 0x1)),
13318 ("lvehx", (gen_lvehx, 0x0)),
13319 ("blela", (gen_ble, 0x3)),
13320 ("vsubsws", (gen_vsubsws, 0x0)),
13321 ("vadduhm", (gen_vadduhm, 0x0)),
13322 ("fmuls.", (gen_fmuls, 0x1)),
13323 ("andi.", (gen_andi_, 0x0)),
13324 ("bdnzlr", (gen_bdnzlr, 0x0)),
13325 ("lhax", (gen_lhax, 0x0)),
13326 ("vor128", (gen_vor128, 0x0)),
13327 ("stswx", (gen_stswx, 0x0)),
13328 ("vmaddcfp128", (gen_vmaddcfp128, 0x0)),
13329 ("mr", (gen_mr, 0x0)),
13330 ("vavgsb", (gen_vavgsb, 0x0)),
13331 ("nop", (gen_nop, 0x0)),
13332 ("stfd", (gen_stfd, 0x0)),
13333 ("vmaddfp128", (gen_vmaddfp128, 0x0)),
13334 ("stfdu", (gen_stfdu, 0x0)),
13335 ("nego", (gen_neg, 0x400)),
13336 ("mtsdr1", (gen_mtsdr1, 0x0)),
13337 ("blta-", (gen_blt, 0x200002)),
13338 ("ps_neg.", (gen_ps_neg, 0x1)),
13339 ("andc.", (gen_andc, 0x1)),
13340 ("subi", (gen_subi, 0x0)),
13341 ("bsola-", (gen_bso, 0x200003)),
13342 ("vmhraddshs", (gen_vmhraddshs, 0x0)),
13343 ("ldx", (gen_ldx, 0x0)),
13344 ("bcctr", (gen_bcctr, 0x0)),
13345 ("vcmpgtfp", (gen_vcmpgtfp, 0x0)),
13346 ("addo.", (gen_add, 0x401)),
13347 ("vmsumshm", (gen_vmsumshm, 0x0)),
13348 ("bltl+", (gen_blt, 0x200001)),
13349 ("vupkhsh", (gen_vupkhsh, 0x0)),
13350 ("bltctr", (gen_bltctr, 0x0)),
13351 ("fmr.", (gen_fmr, 0x1)),
13352 ("vmsummbm", (gen_vmsummbm, 0x0)),
13353 ("vmr", (gen_vmr, 0x0)),
13354 ("bdnzf", (gen_bdnzf, 0x0)),
13355 ("bdnztl+", (gen_bdnzt, 0x200001)),
13356 ("frsqrte", (gen_frsqrte, 0x0)),
13357 ("vslh", (gen_vslh, 0x0)),
13358 ("rotlw", (gen_rotlw, 0x0)),
13359 ("rotlw.", (gen_rotlw, 0x1)),
13360 ("mffs.", (gen_mffs, 0x1)),
13361 ("srad", (gen_srad, 0x0)),
13362 ("ps_madds0", (gen_ps_madds0, 0x0)),
13363 ("bdzfl-", (gen_bdzf, 0x200001)),
13364 ("slwi", (gen_slwi, 0x0)),
13365 ("lfdux", (gen_lfdux, 0x0)),
13366 ("xoris", (gen_xoris, 0x0)),
13367 ("sld.", (gen_sld, 0x1)),
13368 ("bdnztlrl+", (gen_bdnztlr, 0x200001)),
13369 ("fdivs.", (gen_fdivs, 0x1)),
13370 ("divwu.", (gen_divwu, 0x1)),
13371 ("vcmpequw128", (gen_vcmpequw128, 0x0)),
13372 ("rfid", (gen_rfid, 0x0)),
13373 ("bclrl", (gen_bclr, 0x1)),
13374 ("vsubfp128", (gen_vsubfp128, 0x0)),
13375 ("mulhwu.", (gen_mulhwu, 0x1)),
13376 ("bns-", (gen_bns, 0x200000)),
13377 ("blectrl+", (gen_blectr, 0x200001)),
13378 ("bdzfla-", (gen_bdzf, 0x200003)),
13379 ("blelr", (gen_blelr, 0x0)),
13380 ("stvlx", (gen_stvlx, 0x0)),
13381 ("ps_nabs.", (gen_ps_nabs, 0x1)),
13382 ("stwcx.", (gen_stwcx_, 0x0)),
13383 ("vpkuwus128", (gen_vpkuwus128, 0x0)),
13384 ("nor.", (gen_nor, 0x1)),
13385 ("blel", (gen_ble, 0x1)),
13386 ("slw.", (gen_slw, 0x1)),
13387 ("stvewx128", (gen_stvewx128, 0x0)),
13388 ("bgela", (gen_bge, 0x3)),
13389 ("ba", (gen_b, 0x2)),
13390 ("ps_muls0", (gen_ps_muls0, 0x0)),
13391 ("vmuleuh", (gen_vmuleuh, 0x0)),
13392 ("subfze", (gen_subfze, 0x0)),
13393 ("vcmpgtsh.", (gen_vcmpgtsh, 0x400)),
13394 ("bnelr+", (gen_bnelr, 0x200000)),
13395 ("mulhw.", (gen_mulhw, 0x1)),
13396 ("bsol+", (gen_bso, 0x200001)),
13397 ("fmadd", (gen_fmadd, 0x0)),
13398 ("bdnzlrl+", (gen_bdnzlr, 0x200001)),
13399 ("vspltb", (gen_vspltb, 0x0)),
13400 ("bdnzfa", (gen_bdnzf, 0x2)),
13401 ("beqa-", (gen_beq, 0x200002)),
13402 ("vsubuhs", (gen_vsubuhs, 0x0)),
13403 ("stb", (gen_stb, 0x0)),
13404 ("vadduhs", (gen_vadduhs, 0x0)),
13405 ("lhaux", (gen_lhaux, 0x0)),
13406 ("bgel", (gen_bge, 0x1)),
13407 ("vrfip", (gen_vrfip, 0x0)),
13408 ("vrsqrtefp128", (gen_vrsqrtefp128, 0x0)),
13409 ("beq-", (gen_beq, 0x200000)),
13410 ("stvrxl128", (gen_stvrxl128, 0x0)),
13411 ("bge", (gen_bge, 0x0)),
13412 ("bdzf", (gen_bdzf, 0x0)),
13413 ("vpkuhus", (gen_vpkuhus, 0x0)),
13414 ("dststt", (gen_dstst, 0x2000000)),
13415 ("bltla+", (gen_blt, 0x200003)),
13416 ("bdnzl-", (gen_bdnz, 0x200001)),
13417 ("ori", (gen_ori, 0x0)),
13418 ("vpkswss", (gen_vpkswss, 0x0)),
13419 ("bdzf+", (gen_bdzf, 0x200000)),
13420 ("bnectrl+", (gen_bnectr, 0x200001)),
13421 ("divd", (gen_divd, 0x0)),
13422 ("blectrl", (gen_blectr, 0x1)),
13423 ("subfco.", (gen_subfc, 0x401)),
13424 ("vcmpgtfp.", (gen_vcmpgtfp, 0x400)),
13425 ("ps_add", (gen_ps_add, 0x0)),
13426 ("vavgsh", (gen_vavgsh, 0x0)),
13427 ("bdnzfl-", (gen_bdnzf, 0x200001)),
13428 ("stvebx", (gen_stvebx, 0x0)),
13429 ("ps_cmpo1", (gen_ps_cmpo1, 0x0)),
13430 ("subfc", (gen_subfc, 0x0)),
13431 ("bnslr", (gen_bnslr, 0x0)),
13432 ("bdztlr", (gen_bdztlr, 0x0)),
13433 ("bdzfl+", (gen_bdzf, 0x200001)),
13434 ("bltl-", (gen_blt, 0x200001)),
13435 ("bltla-", (gen_blt, 0x200003)),
13436 ("mtibatu", (gen_mtibatu, 0x0)),
13437 ("ps_cmpu0", (gen_ps_cmpu0, 0x0)),
13438 ("crxor", (gen_crxor, 0x0)),
13439 ("fmsubs", (gen_fmsubs, 0x0)),
13440 ("bltctrl", (gen_bltctr, 0x1)),
13441 ("vcmpeqfp", (gen_vcmpeqfp, 0x0)),
13442 ("vpkuhum", (gen_vpkuhum, 0x0)),
13443 ("vsrab", (gen_vsrab, 0x0)),
13444 ("lvxl128", (gen_lvxl128, 0x0)),
13445 ("adde", (gen_adde, 0x0)),
13446 ("vcfsx128", (gen_vcfsx128, 0x0)),
13447 ("vcmpgtub", (gen_vcmpgtub, 0x0)),
13448 ("vaddubs", (gen_vaddubs, 0x0)),
13449 ("cmpd", (gen_cmpd, 0x0)),
13450 ("blta", (gen_blt, 0x2)),
13451 ("bc-", (gen_bc, 0x200000)),
13452 ("vupklsb", (gen_vupklsb, 0x0)),
13453 ("vor", (gen_vor, 0x0)),
13454 ("lwz", (gen_lwz, 0x0)),
13455 ("neg", (gen_neg, 0x0)),
13456 ("fsqrt.", (gen_fsqrt, 0x1)),
13457 ("extsh.", (gen_extsh, 0x1)),
13458 ("orc.", (gen_orc, 0x1)),
13459 ("vpkuwum", (gen_vpkuwum, 0x0)),
13460 ("srd", (gen_srd, 0x0)),
13461 ("extsb", (gen_extsb, 0x0)),
13462 ("vcmpgefp128", (gen_vcmpgefp128, 0x0)),
13463 ("sraw.", (gen_sraw, 0x1)),
13464 ("bl", (gen_b, 0x1)),
13465 ("bnsctr+", (gen_bnsctr, 0x200000)),
13466 ("mtfsb1.", (gen_mtfsb1, 0x1)),
13467 ("vcmpequh", (gen_vcmpequh, 0x0)),
13468 ("bdnzt-", (gen_bdnzt, 0x200000)),
13469 ("vpkswss128", (gen_vpkswss128, 0x0)),
13470 ("fmr", (gen_fmr, 0x0)),
13471 ("subfme.", (gen_subfme, 0x1)),
13472 ("bcl", (gen_bc, 0x1)),
13473 ("clrlwi.", (gen_clrlwi, 0x1)),
13474 ("mfxer", (gen_mfxer, 0x0)),
13475 ("ld", (gen_ld, 0x0)),
13476 ("td", (gen_td, 0x0)),
13477 ("ble", (gen_ble, 0x0)),
13478 ("blt", (gen_blt, 0x0)),
13479 ("and", (gen_and, 0x0)),
13480 ("mtlr", (gen_mtlr, 0x0)),
13481 ("vxor", (gen_vxor, 0x0)),
13482 ("fsel", (gen_fsel, 0x0)),
13483 ("mfdec", (gen_mfdec, 0x0)),
13484 ("ps_merge10", (gen_ps_merge10, 0x0)),
13485 ("vsraw", (gen_vsraw, 0x0)),
13486 ("bdnz+", (gen_bdnz, 0x200000)),
13487 ("lswx", (gen_lswx, 0x0)),
13488 ("vsum2sws", (gen_vsum2sws, 0x0)),
13489 ("bsoctr+", (gen_bsoctr, 0x200000)),
13490 ("bnslr+", (gen_bnslr, 0x200000)),
13491 ("ps_nabs", (gen_ps_nabs, 0x0)),
13492 ("lwarx", (gen_lwarx, 0x0)),
13493 ("vaddubm", (gen_vaddubm, 0x0)),
13494 ("lhbrx", (gen_lhbrx, 0x0)),
13495 ("stvrx128", (gen_stvrx128, 0x0)),
13496 ("stvxl128", (gen_stvxl128, 0x0)),
13497 ("divdu.", (gen_divdu, 0x1)),
13498 ("bso-", (gen_bso, 0x200000)),
13499 ("bclrl+", (gen_bclr, 0x200001)),
13500 ("fres.", (gen_fres, 0x1)),
13501 ("divwuo", (gen_divwu, 0x400)),
13502 ("bdnzl", (gen_bdnz, 0x1)),
13503 ("beqctr+", (gen_beqctr, 0x200000)),
13504 ("stmw", (gen_stmw, 0x0)),
13505 ("cmp", (gen_cmp, 0x0)),
13506 ("vpkuhum128", (gen_vpkuhum128, 0x0)),
13507 ("bdnzflrl+", (gen_bdnzflr, 0x200001)),
13508 ("vcmpbfp128", (gen_vcmpbfp128, 0x0)),
13509 ("vsumsws", (gen_vsumsws, 0x0)),
13510 ("extrwi", (gen_extrwi, 0x0)),
13511 ("li", (gen_li, 0x0)),
13512 ("ps_sum0.", (gen_ps_sum0, 0x1)),
13513 ("stw", (gen_stw, 0x0)),
13514 ("vcmpeqfp.", (gen_vcmpeqfp, 0x400)),
13515 ("sc", (gen_sc, 0x0)),
13516 ("mtfsb0.", (gen_mtfsb0, 0x1)),
13517 ("vctuxs", (gen_vctuxs, 0x0)),
13518 ("subf.", (gen_subf, 0x1)),
13519 ("mcrf", (gen_mcrf, 0x0)),
13520 ("blel-", (gen_ble, 0x200001)),
13521 ("lfs", (gen_lfs, 0x0)),
13522 ("mfocrf", (gen_mfocrf, 0x0)),
13523 ("sthux", (gen_sthux, 0x0)),
13524 ("lvsr128", (gen_lvsr128, 0x0)),
13525 ("beqla+", (gen_beq, 0x200003)),
13526 ("fmadds.", (gen_fmadds, 0x1)),
13527 ("vexptefp", (gen_vexptefp, 0x0)),
13528 ("stbux", (gen_stbux, 0x0)),
13529 ("ps_nmadd.", (gen_ps_nmadd, 0x1)),
13530 ("mcrxr", (gen_mcrxr, 0x0)),
13531 ("bdnzla-", (gen_bdnz, 0x200003)),
13532 ("bnea", (gen_bne, 0x2)),
13533 ("ps_muls0.", (gen_ps_muls0, 0x1)),
13534 ("cntlzw.", (gen_cntlzw, 0x1)),
13535 ("mtsr", (gen_mtsr, 0x0)),
13536 ("vlogefp128", (gen_vlogefp128, 0x0)),
13537 ("vcmpequw.", (gen_vcmpequw, 0x400)),
13538 ("bnsa", (gen_bns, 0x2)),
13539 ("blta+", (gen_blt, 0x200002)),
13540 ("divdo", (gen_divd, 0x400)),
13541 ("vavguw", (gen_vavguw, 0x0)),
13542 ("vmaxsb", (gen_vmaxsb, 0x0)),
13543 ("vand128", (gen_vand128, 0x0)),
13544 ("vnmsubfp128", (gen_vnmsubfp128, 0x0)),
13545 ("fctiwz.", (gen_fctiwz, 0x1)),
13546 ("vrlh", (gen_vrlh, 0x0)),
13547 ("stfdux", (gen_stfdux, 0x0)),
13548 ("vupkhsb128", (gen_vupkhsb128, 0x0)),
13549 ("vmrglh", (gen_vmrglh, 0x0)),
13550 ("bdztla", (gen_bdzt, 0x3)),
13551 ("bnsctr", (gen_bnsctr, 0x0)),
13552 ("fnmadds", (gen_fnmadds, 0x0)),
13553 ("slw", (gen_slw, 0x0)),
13554 ("stfsux", (gen_stfsux, 0x0)),
13555 ("cmpwi", (gen_cmpwi, 0x0)),
13556 ("rlwinm.", (gen_rlwinm, 0x1)),
13557 ("beql+", (gen_beq, 0x200001)),
13558 ("fmul.", (gen_fmul, 0x1)),
13559 ("bdza-", (gen_bdz, 0x200002)),
13560 ("fsel.", (gen_fsel, 0x1)),
13561 ("mtdar", (gen_mtdar, 0x0)),
13562 ("lwbrx", (gen_lwbrx, 0x0)),
13563 ("eciwx", (gen_eciwx, 0x0)),
13564 ("vmrghb", (gen_vmrghb, 0x0)),
13565 ("psq_stx", (gen_psq_stx, 0x0)),
13566 ("vmsumshs", (gen_vmsumshs, 0x0)),
13567 ("bne+", (gen_bne, 0x200000)),
13568 ("bnsla+", (gen_bns, 0x200003)),
13569 ("sth", (gen_sth, 0x0)),
13570 ("fctiw", (gen_fctiw, 0x0)),
13571 ("dst", (gen_dst, 0x0)),
13572 ("vmuleub", (gen_vmuleub, 0x0)),
13573 ("srawi", (gen_srawi, 0x0)),
13574 ("ps_sum1", (gen_ps_sum1, 0x0)),
13575 ],
13576};
13577pub fn assemble(mnemonic: &str, args: &Arguments) -> Result<u32, ArgumentError> {
13578 if let Some(&(fn_ptr, modifiers)) = MNEMONIC_MAP.get(mnemonic) {
13579 fn_ptr(args, modifiers)
13580 } else {
13581 Err(ArgumentError::UnknownMnemonic)
13582 }
13583}