Limit access end-of-struct warning a bit
[tinycc.git] / tests / asmtest.S
blob55787054a94a6eef4289716140a58ecbfaa2b38c
1 # gas comment with ``gnu'' style quotes
3 /* some directive tests */
5    .byte 0xff
6    .byte 1, 2, 3
7    .short 1, 2, 3
8    .word 1, 2, 3
9    .long 1, 2, 3
10    .int 1, 2, 3
11    .align 8
12    .byte 1
13 /* .align 16, 0x90 gas is too clever for us with 0x90 fill */
14    .balign 4, 0x92
15    .align 16, 0x91 /* 0x91 tests the non-clever behaviour */
16    .skip 3
17    .skip 15, 0x90
18    .string "hello\0world"
19 /* Macro expansion should work like with C, the #n shouldn't be parsed
20    as asm line comment */
21 #define __stringify(n) #n
22 #define stringify(n) __stringify(n)
23    .skip 8,0x90
24    .asciz stringify(BLA)
25    .skip 8,0x90
27 # 28 "asmtest.S"        # a line directive (and a line comment)
28         movl %eax, %ebx # some more asm comment
29 /* some label tests */
30 L1:
31         movl %eax, %ebx
32         mov 0x10000, %eax
33 L2:
34         movl $L2 - L1, %ecx
35 var1:
36         nop ; nop ; nop ; nop
38         mov var1, %eax
40 /* instruction tests */
41 movl %eax, %ebx
42 mov 0x10000, %eax
43 mov 0x10000, %ax
44 mov 0x10000, %al
45 mov %al, 0x10000
46                 
47 mov $1, %edx
48 mov $1, %dx
49 mov $1, %cl
50 movb $2, 0x100(%ebx,%edx,2)
51 movw $2, 0x100(%ebx,%edx,2)
52 movl $2, 0x100(%ebx,%edx,2)
53 movl %eax, 0x100(%ebx,%edx,2)
54 movl 0x100(%ebx,%edx,2), %edx
55 movw %ax, 0x100(%ebx,%edx,2)
57 movw $0x1122,%si
58 movl $0x112233,%edx
59 movl $0x80000000, %esi
60 movl $-0x7fffffff, %edi
61 #ifdef __x86_64__
62 mov $0x11223344,%rbx
63 movq $0x11223344,%rbx
64 mov $0x1122334455,%rbx
65 movq $0x1122334455,%rbx
66 movl $0x11334455,(%rbx)
67 #endif
69 mov %eax, 0x12(,%edx,2)
70         
71 #ifdef __i386__
72 mov %cr3, %edx
73 mov %ecx, %cr3
74 movl %cr3, %eax
75 movl %tr3, %eax
76 movl %db3, %ebx
77 movl %dr6, %eax
78 #else
79 mov %cr3, %rdx
80 mov %rcx, %cr3
81 movq %cr3, %rax
82 movq %db3, %rbx
83 movq %dr6, %rax
84 mov %cr8, %rsi
85 mov %rdi, %cr8
86 #endif
87 movl %fs, %ecx
88 movl %ebx, %fs
90 #ifdef __x86_64__
91 movq %r8, %r9
92 movq %r10, %r11
93 movq %r12, %r13
94 movq %r14, %r15
95 movq %rax, %r9
96 movq %r15, %rsi
97 inc %r9b
98 dec %r10w
99 not %r11d
100 negq %r12
101 decb %r13b
102 incw %r14w
103 notl %r15d
104 #endif
106      movsbl 0x1000, %eax
107      movsbw 0x1000, %ax
108      movswl 0x1000, %eax
110      movzbl 0x1000, %eax
111      movzbw 0x1000, %ax
112      movzwl 0x1000, %eax
113             
114      movzb 0x1000, %eax
115      movzb 0x1000, %ax
116                 
117      mov $0x12345678,%eax
119 #ifdef __x86_64__
120      movzb 0x1000, %rax
121      movzbq 0x1000, %rbx
122      movsbq 0x1000, %rdx
123      movzwq 0x1000, %rdi
124      movswq 0x1000, %rdx
125      movslq %eax, %rcx
126      mov $0x12345678,%rax
127      mov $0x12345678,%rdx
128      mov $0x12345678,%r10
129      mov $0x123456789abcdef0,%rax
130      mov $0x123456789abcdef0,%rcx
131      mov $0x123456789abcdef0,%r11
132 #endif
133         
134 #ifdef __i386__
135   pushl %eax
136   push %eax
137   push %cs
138 #else
139   pushq %rax
140   push %rax
141 #endif
142   pushw %ax
143   push %gs
144   push $1
145   push $100
146   push 0x42(%eax)
147   pop 0x43(%esi)
148                                                 
149 #ifdef __i386__
150   popl %eax
151   pop %eax
152   pop %ds
153 #else
154   popq %rax
155   pop %rax
156 #endif
157   popw %ax
158   pop %fs
159           
160   xchg %eax, %ecx
161   xchg %edx, %eax
162   xchg %bx, 0x10000
163   xchg 0x10000, %ebx
164   xchg 0x10000, %dl
166   in $100, %al               
167   in $100, %ax               
168   in $100, %eax
169   in %dx, %al
170   in %dx, %ax               
171   in %dx, %eax
172   inb %dx
173   inw %dx               
174   inl %dx
176   out %al, $100                       
177   out %ax, $100                       
178   out %eax, $100                       
180   /* NOTE: gas is bugged here, so size must be added */
181   outb %al, %dx                       
182   outw %ax, %dx                       
183   outl %eax, %dx                       
185   leal 0x1000(%ebx), %ecx
186   lea 0x1000(%ebx), %ecx
188 #ifdef __i386__
189   les 0x2000, %eax
190   lds 0x2000, %ebx
191   lss 0x2000, %edx
192 #endif
193   lfs 0x2000, %ecx
194   lgs 0x2000, %edx
196 addl $0x123, %eax
197 add $0x123, %ebx
198 add $-16, %ecx
199 add $-0x123, %esi
200 add $1, %bx
201 add $1, %ebx
202 add $-1, %bx
203 add $-1, %ebx
204 add $127, %bx
205 addl $127, %ebx
206 addl $-128, %ebx
207 addl $-128, %ebx
208 addl $-129, %ebx
209 addl $128, %ebx
210 addl $255, %ebx
211 addl $256, %ebx
212 andb $0xf, %ah
213 andb $-15, %cl
214 xorb $127, %dh
215 cmpb $42, (%eax)
216 addl $0x123, 0x100
217 addl $0x123, 0x100(%ebx)
218 addl $0x123, 0x100(%ebx,%edx,2)
219 addl $0x123, 0x100(%esp)
220 addl $0x123, (3*8)(%esp)
221 addl $0x123, (%ebp)
222 addl $0x123, (%esp)
223 cmpl $0x123, (%esp)
225 #ifdef __x86_64__
226 xor %bl,%ah
227 xor %bl,%r8b
228 xor %r9b,%bl
229 xor %sil,%cl
230 add %eax,(%r8d)
231 add %ebx,(%r9)
232 add %edx,(%r10d,%r11d)
233 add %ecx,(%r12,%r13)
234 add %esi,(%r14,%r15,4)
235 add %edi,0x1000(%rbx,%r12,8)
236 add %r11,0x1000(%ebp,%r9d,8)
237 movb $12, %ah
238 movb $13, %bpl
239 movb $14, %dil
240 movb $15, %r12b
241 #endif
243 add %eax, (%ebx)
244 add (%ebx), %eax
245                 
246 or %dx, (%ebx)
247 or (%ebx), %si
248         
249 add %cl, (%ebx)
250 add (%ebx), %dl
252     inc %edx
253     incl 0x10000
254     incb 0x10000
255     dec %dx
256   
257   test $1, %al
258   test $1, %cl
260   testl $1, 0x1000
261   testb $1, 0x1000
262   testw $1, 0x1000
263   test %eax, %ebx
264   test %eax, 0x1000
265   test 0x1000, %edx
267     not %edx
268     notw 0x10000
269     notl 0x10000
270     notb 0x10000
272     neg %edx
273     negw 0x10000
274     negl 0x10000
275     negb 0x10000
277     imul %ecx
278     mul %edx
279     mulb %cl
281     imul %eax, %ecx
282     imul 0x1000, %cx
283     imul $10, %eax, %ecx
284     imul $10, %ax, %cx
285     imul $10, %eax
286     imul $0x1100000, %eax
287     imul $1, %eax
288     
289     idivw 0x1000
290     div %ecx
291     div %bl
292     div %ecx, %eax
294 and $15,%bx
295 and $-20,%edx
297 shl %edx
298 shl $10, %edx
299 shl %cl, %edx
301 shld $1, %eax, %edx
302 shld %cl, %eax, %edx
303 shld %eax, %edx
305 shrd $1, %eax, %edx
306 shrd %cl, %eax, %edx
307 shrd %eax, %edx
310 call 0x1000
311 call L4
312 #ifdef __i386__
313 call *%eax
314 #else
315 call *%rax
316 #endif
317 call *0x1000
318 call func1
320 .global L5,L6
325 #ifdef __i386__
326 lcall $0x100, $0x1000
327 #else
328 lcall *0x100
329 lcall *(%rax)
330 #endif
332 jmp 0x1000
333 jmp *(%edi)
334 #ifdef __i386__
335 jmp *%eax
336 #else
337 jmp *%rax
338 #endif
339 jmp *0x1000
341 #ifdef __i386__
342 ljmp $0x100, $0x1000
343 #else
344 ljmp *0x100
345 ljmp *(%rdi)
346 ljmpl *(%esi)
347 ljmpw *(%esi)
348 #endif
351 ret $10
352 #ifdef __i386__
353 retl
354 retl $10
355 #else
356 retq
357 retq $10
358 #endif
360 lret
362 lret $10
364 enter $1234, $10
367  jo 0x1000
368  jnp 0x1001
369  jne 0x1002
370  jg 0x1003
372  jo L3
373  jnp L3
374  jne L3
375  jg L3
377  loopne L3
378  loopnz L3
379  loope L3
380  loopz L3
381  loop L3
382  jecxz L3
384         
385  seto %al
386  setc %al
387  setcb %al
388  setnp 0x1000
389  setl 0xaaaa
390  setg %dl
392  fadd
393  fadd %st(1), %st
394  fadd %st(0), %st(1)
395  fadd %st(3)
397  fmul %st(0),%st(0)
398  fmul %st(0),%st(1)
400  faddp %st(5)
401  faddp
402  faddp %st(1), %st
404  fadds 0x1000
405  fiadds 0x1002
406  faddl 0x1004
407  fiaddl 0x1006
409  fmul
410  fmul %st(1), %st
411  fmul %st(3)
413  fmulp %st(5)
414  fmulp
415  fmulp %st(1), %st
417  fmuls 0x1000
418  fimuls 0x1002
419  fmull 0x1004
420  fimull 0x1006
422  fsub
423  fsub %st(1), %st
424  fsub %st(3)
426  fsubp %st(5)
427  fsubp
428  fsubp %st(1), %st
430  fsubs 0x1000
431  fisubs 0x1002
432  fsubl 0x1004
433  fisubl 0x1006
435  fsubr
436  fsubr %st(1), %st
437  fsubr %st(3)
439  fsubrp %st(5)
440  fsubrp
441  fsubrp %st(1), %st
443  fsubrs 0x1000
444  fisubrs 0x1002
445  fsubrl 0x1004
446  fisubrl 0x1006
448  fdiv
449  fdiv %st(1), %st
450  fdiv %st(3)
452  fdivp %st(5)
453  fdivp
454  fdivp %st(1), %st
456  fdivs 0x1000
457  fidivs 0x1002
458  fdivl 0x1004
459  fidivl 0x1006
461  fcom %st(3)
463  fcoms 0x1000
464  ficoms 0x1002
465  fcoml 0x1004
466  ficoml 0x1006
468  fcomp %st(5)
469  fcomp
470  fcompp
472  fcomps 0x1000
473  ficomps 0x1002
474  fcompl 0x1004
475  ficompl 0x1006
477  fld %st(5)
478  fldl 0x1000
479  flds 0x1002
480  fildl 0x1004
481  fst %st(4)
482  fstp %st(6)
483  fstpt 0x1006
484  fbstp 0x1008
486  fxch
487  fxch %st(4)
489  fucom %st(6)
490  fucomp %st(3)
491  fucompp
493  finit
494  fninit
495  fldcw 0x1000
496  fnstcw 0x1002
497  fstcw 0x1002
498  fnstsw 0x1004
499  fnstsw (%eax)
500  fstsw 0x1004
501  fstsw (%eax)
502  fnclex
503  fclex
504  fnstenv 0x1000
505  fstenv 0x1000
506  fldenv 0x1000
507  fnsave 0x1002
508  fsave 0x1000
509  frstor 0x1000
510  ffree %st(7)
511  ffreep %st(6)
513     ftst
514     fxam
515     fld1
516     fldl2t
517     fldl2e
518     fldpi
519     fldlg2
520     fldln2
521     fldz
523     f2xm1
524     fyl2x
525     fptan
526     fpatan
527     fxtract
528     fprem1
529     fdecstp
530     fincstp
531     fprem
532     fyl2xp1
533     fsqrt
534     fsincos
535     frndint
536     fscale
537     fsin
538     fcos
539     fchs
540     fabs
541     fnop
542     fwait
544 bswap %edx
545 bswapl %ecx
546 xadd %ecx, %edx
547 xaddb %dl, 0x1000
548 xaddw %ax, 0x1000
549 xaddl %eax, 0x1000
550 cmpxchg %ecx, %edx
551 cmpxchgb %dl, 0x1000
552 cmpxchgw %ax, 0x1000
553 cmpxchgl %eax, 0x1000
554 invlpg 0x1000
555 cmpxchg8b 0x1002
556 #ifdef __x86_64__
557 cmpxchg16b (%rax)
558 cmpxchg16b (%r10,%r11)
559 #endif
561 fcmovb %st(5), %st
562 fcmove %st(5), %st
563 fcmovbe %st(5), %st
564 fcmovu %st(5), %st
565 fcmovnb %st(5), %st
566 fcmovne %st(5), %st
567 fcmovnbe %st(5), %st
568 fcmovnu %st(5), %st
569 fcomi %st(5), %st
570 fucomi %st(5), %st
571 fcomip %st(5), %st
572 fucomip %st(5), %st
576  cmovo 0x1000, %eax
577  cmovs 0x1000, %eax
578  cmovns %edx, %edi
579  cmovne %ax, %si
580 #ifdef __x86_64__
581  bswapq %rsi
582  bswapq %r10
583  cmovz %rdi,%rbx
584 #endif
586 int $3
587 int $0x10
589 #ifdef __i386__
590     pusha
591     popa
592 #endif
593     clc # another comment
594     cld # a comment with embedded ' tick
595     cli
596     clts
597     cmc
598     lahf
599     sahf
600 #ifdef __i386__
601     pushfl
602     popfl
603 #else
604     pushfq
605     popfq
606 #endif
607     pushf
608     popf
609     stc
610     std
611     sti
612 #ifdef __i386__
613     aaa
614     aas
615     daa
616     das
617     aad
618     aam
619     into
620 #endif
621     cbw
622     cwd
623     cwde
624     cdq
625     cbtw
626     cwtd
627     cwtl
628     cltd
629     leave
630     int3
631     iret
632     rsm
633     hlt
634     wait
635     nop
637     /* XXX: handle prefixes */
638 #if 0
639     aword
640     addr16
641 #endif
642     lock
643     rep
644     repe
645     repz
646     repne
647     repnz
648     nop
650     lock ;negl (%eax)
651     wait ;pushf
652     rep  ;stosb
653     repe ;lodsb
654     repz ;cmpsb
655     repne;movsb
656     repnz;outsb
658     /* handle one-line prefix + ops */
659     lock  negl (%eax)
660     wait  pushf
661     rep   stosb
662     repe  lodsb
663     repz  cmpsb
664     repne movsb
665     repnz outsb
666     
667     invd
668     wbinvd
669     cpuid
670     wrmsr
671     rdtsc
672     rdmsr
673     rdpmc
674     ud2
675 #ifdef __x86_64__
676     syscall
677     sysret
678     sysretq
679     lfence
680     mfence
681     sfence
682     prefetchnta 0x18(%rdx)
683     prefetcht0 (%rcx)
684     prefetcht1 (%rsi)
685     prefetcht2 (%rdi)
686     prefetchw (%rdi)
687     clflush 0x1000(%rax,%rcx)
688     fxsaveq (%rdx)
689     fxsaveq (%r11)
690     fxrstorq (%rcx)
691     fxrstorq (%r10)
693 #endif
695     lar %ax,%dx
696     lar %eax,%dx
697     lar %ax,%edx
698     lar %eax,%edx
699 #ifdef __x86_64__
700     lar %ax,%rdx
701     lar %eax,%rdx
702 #endif
703     emms
704     movd %edx, %mm3
705     movd 0x1000, %mm2
706     movd %mm4, %ecx
707     movd %mm5, 0x1000
708                     
709     movq 0x1000, %mm2
710     movq %mm4, 0x1000
711     
712     pand 0x1000, %mm3
713     pand %mm4, %mm5
714     
715     psllw $1, %mm6
716     psllw 0x1000, %mm7
717     psllw %mm2, %mm7
719     xlat
720     cmpsb
721     scmpw
722     insl
723     outsw
724     lodsb
725     slodl
726     movsb
727     movsl
728     smovb
729     scasb
730     sscaw
731     stosw
732     sstol
734     bsf 0x1000, %ebx
735     bsr 0x1000, %ebx
736     bt %edx, 0x1000
737     btl $2, 0x1000
738     btc %edx, 0x1000
739     btcl $2, 0x1000
740     btr %edx, 0x1000
741     btrl $2, 0x1000
742     bts %edx, 0x1000
743     btsl $2, 0x1000
745         
746         
747 #ifdef __i386__
748     boundl %edx, 0x10000
749     boundw %bx, 0x1000
751     arpl %bx, 0x1000
752 #endif
753     lar 0x1000, %eax
754     lgdt 0x1000
755     lidt 0x1000
756     lldt 0x1000
757     sgdt 0x1000
758     sidt 0x1000
759     sldt 0x1000
760 #ifdef __x86_64__
761     lgdtq 0x1000
762     lidtq 0x1000
763     sgdtq 0x1000
764     sidtq 0x1000
766     swapgs
768     str %rdx
769     str %r9
770 #endif
772     lmsw 0x1000
773     lsl 0x1000, %ecx
774     ltr 0x1000
775     ltr %si
776     smsw 0x1000
777     str 0x1000
778     str %ecx
779     str %dx
780     
781     verr 0x1000
782     verw 0x1000
783   
784 #ifdef __i386__
785     push %ds
786     pushw %ds
787     pushl %ds
788     pop %ds
789     popw %ds
790     popl %ds
791 #endif
792     fxsave 1(%ebx)
793     fxrstor 1(%ecx)
794 #ifdef __i386__
795     pushl $1
796 #else
797     pushq $1
798 #endif
799     pushw $1
800     push $1
802 #ifdef __ASSEMBLER__ // should be defined, for S files
803     inc %eax
804 #endif
806 #ifndef _WIN32
807 ft1: ft2: ft3: ft4: ft5: ft6: ft7: ft8: ft9:
808     xor %eax, %eax
809     ret
811 .type ft1,STT_FUNC
812 .type ft2,@STT_FUNC
813 .type ft3,%STT_FUNC
814 .type ft4,"STT_FUNC"
815 .type ft5,function
816 .type ft6,@function
817 .type ft7,%function
818 .type ft8,"function"
819 #endif
821     pause
822 .rept 6
823     nop
824 .endr
825 .fill 4,1,0x90
827 .section .text.one,"ax"
829 .previous
830 .pushsection .text.one,"ax"
832 .pushsection .text.two,"ax"
834 .popsection
835 .popsection
837 1: ud2
838 .pushsection __bug_table,"a"
839 .align 8
840 2: .long 1b - 2b
841    .long 0x600000 - 2b
842    .long 1b + 42
843    .long 43 + 1b
844    .long 2b + 144
845    .long 145 + 2b
846    .word 164, 0
847    .org 2b+32
848 #ifdef __x86_64__
849    .quad 1b
850 #else
851    .long 1b
852 #endif
853 .popsection
854 3: mov %eax,%ecx
856 .pushsection .text.three, "ax"
858 .skip (-((4b-3b) > 0) * 2) , 0x90
859 .popsection
861 .globl overrideme
862 .weak overrideme
863   nop
864 .globl notimplemented
865 notimplemented:
866   ret
867 .set overrideme, notimplemented
868 overrideme = notimplemented
869 overrideme:
870   ret
872     movd %esi, %mm1
873     movd %edi, %xmm2
874     movd (%ebx), %mm3
875     movd (%ebx), %xmm3
876     movd %mm1, %esi
877     movd %xmm2, %edi
878     movd %mm3, (%edx)
879     movd %xmm3, (%edx)
880 #ifdef __x86_64__
881     movd %rsi, %mm1
882     movd %rdi, %xmm2
883     movd (%rbx), %mm3
884     movd (%rbx), %xmm3
885     movd %mm1, %r12
886     movd %xmm2, %rdi
887     movd %mm3, (%r8)
888     movd %xmm3, (%r13)
889 #endif
891     movq (%ebp), %mm1
892     movq %mm2, (%edi)
893     movq (%edi), %xmm3
894     movq %mm4, %mm5
895 #ifdef __x86_64__
896     movq %rcx, %mm1
897     movq %rdx, %xmm2
898     movq %r13, %xmm3
899     /* movq mem64->xmm is encoded as f30f7e by GAS, but as
900        660f6e by tcc (which really is a movd and would need 
901        a REX.W prefix to be movq).  */
902     movq (%rsi), %xmm3
903     movq %mm1, %rdx
904     movq %xmm3, %rcx
905     movq %xmm4, (%rsi)
906 #endif
908 #define TEST_MMX_SSE(insn) \
909     insn %mm1, %mm2; \
910     insn %xmm2, %xmm3; \
911     insn (%ebx), %xmm3;
912 #define TEST_MMX_SSE_I8(insn) \
913     TEST_MMX_SSE(insn) \
914     insn $0x42, %mm4; \
915     insn $0x42, %xmm4;
917     TEST_MMX_SSE(packssdw)
918     TEST_MMX_SSE(packsswb)
919     TEST_MMX_SSE(packuswb)
920     TEST_MMX_SSE(paddb)
921     TEST_MMX_SSE(paddw)
922     TEST_MMX_SSE(paddd)
923     TEST_MMX_SSE(paddsb)
924     TEST_MMX_SSE(paddsw)
925     TEST_MMX_SSE(paddusb)
926     TEST_MMX_SSE(paddusw)
927     TEST_MMX_SSE(pand)
928     TEST_MMX_SSE(pandn)
929     TEST_MMX_SSE(pcmpeqb)
930     TEST_MMX_SSE(pcmpeqw)
931     TEST_MMX_SSE(pcmpeqd)
932     TEST_MMX_SSE(pcmpgtb)
933     TEST_MMX_SSE(pcmpgtw)
934     TEST_MMX_SSE(pcmpgtd)
935     TEST_MMX_SSE(pmaddwd)
936     TEST_MMX_SSE(pmulhw)
937     TEST_MMX_SSE(pmullw)
938     TEST_MMX_SSE(por)
939     TEST_MMX_SSE(psllw)
940 TEST_MMX_SSE_I8(psllw)
941     TEST_MMX_SSE(pslld)
942 TEST_MMX_SSE_I8(pslld)
943     TEST_MMX_SSE(psllq)
944 TEST_MMX_SSE_I8(psllq)
945     TEST_MMX_SSE(psraw)
946 TEST_MMX_SSE_I8(psraw)
947     TEST_MMX_SSE(psrad)
948 TEST_MMX_SSE_I8(psrad)
949     TEST_MMX_SSE(psrlw)
950 TEST_MMX_SSE_I8(psrlw)
951     TEST_MMX_SSE(psrld)
952 TEST_MMX_SSE_I8(psrld)
953     TEST_MMX_SSE(psrlq)
954 TEST_MMX_SSE_I8(psrlq)
955     TEST_MMX_SSE(psubb)
956     TEST_MMX_SSE(psubw)
957     TEST_MMX_SSE(psubd)
958     TEST_MMX_SSE(psubsb)
959     TEST_MMX_SSE(psubsw)
960     TEST_MMX_SSE(psubusb)
961     TEST_MMX_SSE(psubusw)
962     TEST_MMX_SSE(punpckhbw)
963     TEST_MMX_SSE(punpckhwd)
964     TEST_MMX_SSE(punpckhdq)
965     TEST_MMX_SSE(punpcklbw)
966     TEST_MMX_SSE(punpcklwd)
967     TEST_MMX_SSE(punpckldq)
968     TEST_MMX_SSE(pxor)
970     cvtpi2ps %mm1, %xmm2
971     cvtpi2ps (%ebx), %xmm2
972     TEST_MMX_SSE(pmaxsw)
973     TEST_MMX_SSE(pmaxub)
974     TEST_MMX_SSE(pminsw)
975     TEST_MMX_SSE(pminub)