fixup! riscv: Implement large addend for global address
[tinycc.git] / tests / asmtest.S
blob7f31ce59b521932fa4a550ea98ea6014f25bd431
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 # not accepted by new GAS anymore
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 # not accepted by new GAS anymore
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 # not accepted by new GAS anymore
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  cmovbw %ax, %di
581  cmovnbel %edx, %ecx
582 #ifdef __x86_64__
583  bswapq %rsi
584  bswapq %r10
585  cmovz %rdi,%rbx
586  cmovpeq %rsi, %rdx
587 #endif
589 int $3
590 int $0x10
592 #ifdef __i386__
593     pusha
594     popa
595 #endif
596     clc # another comment
597     cld # a comment with embedded ' tick
598     cli
599     clts
600     cmc
601     lahf
602     sahf
603 #ifdef __i386__
604     pushfl
605     popfl
606 #else
607     pushfq
608     popfq
609 #endif
610     pushf
611     popf
612     stc
613     std
614     sti
615 #ifdef __i386__
616     aaa
617     aas
618     daa
619     das
620     aad
621     aam
622     into
623 #endif
624     cbw
625     cwd
626     cwde
627     cdq
628     cbtw
629     cwtd
630     cwtl
631     cltd
632     leave
633     int3
634     iret
635     iretw
636     iretl
637 #ifdef __x86_64__
638     iretq
639 #endif
640     rsm
641     hlt
642     wait
643     nop
644     vmcall
645     vmlaunch
646     vmresume
647     vmxoff
649     /* XXX: handle prefixes */
650 #if 0
651     aword
652     addr16
653 #endif
654     lock
655     rep
656     repe
657     repz
658     repne
659     repnz
660     nop
662     lock ;negl (%eax)
663     wait ;pushf
664     rep  ;stosb
665     repe ;lodsb
666     repz ;cmpsb
667     repne;movsb
668     repnz;outsb
670     /* handle one-line prefix + ops */
671     lock  negl (%eax)
672     wait  pushf
673     rep   stosb
674     repe  lodsb
675     repz  cmpsb
676     repne movsb
677     repnz outsb
678     
679     invd
680     wbinvd
681     cpuid
682     wrmsr
683     rdtsc
684     rdmsr
685     rdpmc
686     ud2
687 #ifdef __x86_64__
688     syscall
689     sysret
690     sysretq
691     lfence
692     mfence
693     sfence
694     prefetchnta 0x18(%rdx)
695     prefetcht0 (%rcx)
696     prefetcht1 (%rsi)
697     prefetcht2 (%rdi)
698     prefetchw (%rdi)
699     clflush 0x1000(%rax,%rcx)
700     fxsaveq (%rdx)
701     fxsaveq (%r11)
702     fxrstorq (%rcx)
703     fxrstorq (%r10)
704     movnti %ebx, (%rdi)
705     movntil %ecx, (%rdi)
706     movnti %rax, (%rdi)
707     movntiq %r8, (%rdi)
709 #endif
711     lar %ax,%dx
712     lar %eax,%dx
713     lar %ax,%edx
714     lar %eax,%edx
715 #ifdef __x86_64__
716     lar %ax,%rdx
717     lar %eax,%rdx
718 #endif
719     emms
720     movd %edx, %mm3
721     movd 0x1000, %mm2
722     movd %mm4, %ecx
723     movd %mm5, 0x1000
724                     
725     movq 0x1000, %mm2
726     movq %mm4, 0x1000
727     
728     pand 0x1000, %mm3
729     pand %mm4, %mm5
730     
731     psllw $1, %mm6
732     psllw 0x1000, %mm7
733     psllw %mm2, %mm7
735     xlat
736     cmpsb
737     scmpw
738     insl
739     outsw
740     lodsb
741     slodl
742     movsb
743     movsl
744     smovb
745     scasb
746     sscaw
747     stosw
748     sstol
750     bsf 0x1000, %ebx
751     bsr 0x1000, %ebx
752     bt %edx, 0x1000
753     btl $2, 0x1000
754     btc %edx, 0x1000
755     btcl $2, 0x1000
756     btr %edx, 0x1000
757     btrl $2, 0x1000
758     bts %edx, 0x1000
759     btsl $2, 0x1000
761     popcnt %ax, %si
762     popcntw %ax, %si
763     popcnt 0x1000, %edx
764     popcntl 0x1000, %edx
765 #ifdef __x86_64__
766     popcnt %rbx, %rdi
767     popcntq %rcx, %r8
768 #endif
770     lzcnt %cx, %ax
771     lzcntw %cx, %ax
772     lzcnt %edx, %ebx
773     lzcntl 8(%edi), %ecx
774 #ifdef __x86_64__
775     lzcnt %rdi, %rdx
776     lzcntq %r12, %r15
777     lzcnt 0x40(%rcx), %r11
778     lzcntq (%r8), %rsi
779 #endif
781     tzcnt %cx, %ax
782     tzcntw %cx, %ax
783     tzcnt %edx, %ebx
784     tzcntl -24(%edi), %ecx
785 #ifdef __x86_64__
786     tzcnt %rbp, %rdx
787     tzcntq %rax, %r15
788     tzcnt -8(%rbp), %rcx
789     tzcntq (%r8), %r12
790 #endif
792 #ifdef __i386__
793     boundl %edx, 0x10000
794     boundw %bx, 0x1000
796     arpl %bx, 0x1000
797 #endif
798     lar 0x1000, %eax
799     lgdt 0x1000
800     lidt 0x1000
801     lldt 0x1000
802     sgdt 0x1000
803     sidt 0x1000
804     sldt 0x1000
805 #ifdef __x86_64__
806     lgdtq 0x1000
807     lidtq 0x1000
808     sgdtq 0x1000
809     sidtq 0x1000
811     swapgs
813     /* Newer gas assemble 'str %rdx' as 'str %edx', based on the observation
814        that the 16bit value of the task register is zero-extended into the
815        destination anyway, and hence storing into %edx is the same as storing
816        into %rdx.  TCC doesn't do that micro-optimization, hence just store
817        into the 32bit reg as well.  */
818     str %edx
819     str %r9d
820 #endif
822     lmsw 0x1000
823     lsl 0x1000, %ecx
824     ltr 0x1000
825     ltr %si
826     smsw 0x1000
827     str 0x1000
828     str %ecx
829     str %dx
830     
831     verr 0x1000
832     verw 0x1000
833   
834 #ifdef __i386__
835     push %ds
836     pushw %ds
837     pushl %ds
838     pop %ds
839     popw %ds
840     popl %ds
841 #endif
842     fxsave 1(%ebx)
843     fxrstor 1(%ecx)
844 #ifdef __i386__
845     pushl $1
846 #else
847     pushq $1
848 #endif
849     pushw $1
850     push $1
852 #ifdef __ASSEMBLER__ // should be defined, for S files
853     inc %eax
854 #endif
856 #ifndef _WIN32
857 ft1: ft2: ft3: ft4: ft5: ft6: ft7: ft8: ft9:
858     xor %eax, %eax
859     ret
861 .type ft1,STT_FUNC
862 .type ft2,@STT_FUNC
863 .type ft3,%STT_FUNC
864 .type ft4,"STT_FUNC"
865 .type ft5,function
866 .type ft6,@function
867 .type ft7,%function
868 .type ft8,"function"
869 #endif
871     pause
872 .rept 6
873     nop
874 .endr
875 .fill 4,1,0x90
877 .section .text.one,"ax"
879 .previous
880 .pushsection .text.one,"ax"
882 .pushsection .text.two,"ax"
884 .popsection
885 .popsection
887 1: ud2
888 .pushsection __bug_table,"a"
889 .align 8
890 2: .long 1b - 2b
891    .long 0x600000 - 2b
892    .long 1b + 42
893    .long 43 + 1b
894    .long 2b + 144
895    .long 145 + 2b
896    .word 164, 0
897    .org 2b+32
898 #ifdef __x86_64__
899    .quad 1b
900 #else
901    .long 1b
902 #endif
903 .popsection
904 3: mov %eax,%ecx
906 .pushsection .text.three, "ax"
908 .skip (-((4b-3b) > 0) * 2) , 0x90
909 .popsection
911 .globl overrideme
912 .weak overrideme
913   nop
914 .globl notimplemented
915 notimplemented:
916   ret
917 .set overrideme, notimplemented
918 overrideme = notimplemented
919 overrideme:
920   ret
922     movd %esi, %mm1
923     movd %edi, %xmm2
924     movd (%ebx), %mm3
925     movd (%ebx), %xmm3
926     movd %mm1, %esi
927     movd %xmm2, %edi
928     movd %mm3, (%edx)
929     movd %xmm3, (%edx)
930 #ifdef __x86_64__
931     movd %rsi, %mm1
932     movd %rdi, %xmm2
933     movd (%rbx), %mm3
934     movd (%rbx), %xmm3
935     movd %mm1, %r12
936     movd %xmm2, %rdi
937     movd %mm3, (%r8)
938     movd %xmm3, (%r13)
939 #endif
941     movq (%ebp), %mm1
942     movq %mm2, (%edi)
943     movq (%edi), %xmm3
944     movq %mm4, %mm5
945 #ifdef __x86_64__
946     movq %rcx, %mm1
947     movq %rdx, %xmm2
948     movq %r13, %xmm3
949     /* movq mem64->xmm is encoded as f30f7e by GAS, but as
950        660f6e by tcc (which really is a movd and would need 
951        a REX.W prefix to be movq).  */
952     movq (%rsi), %xmm3
953     movq %mm1, %rdx
954     movq %xmm3, %rcx
955     movq %xmm4, (%rsi)
956 #endif
958 #define TEST_MMX_SSE(insn) \
959     insn %mm1, %mm2; \
960     insn %xmm2, %xmm3; \
961     insn (%ebx), %xmm3;
962 #define TEST_MMX_SSE_I8(insn) \
963     TEST_MMX_SSE(insn) \
964     insn $0x42, %mm4; \
965     insn $0x42, %xmm4;
967     TEST_MMX_SSE(packssdw)
968     TEST_MMX_SSE(packsswb)
969     TEST_MMX_SSE(packuswb)
970     TEST_MMX_SSE(paddb)
971     TEST_MMX_SSE(paddw)
972     TEST_MMX_SSE(paddd)
973     TEST_MMX_SSE(paddsb)
974     TEST_MMX_SSE(paddsw)
975     TEST_MMX_SSE(paddusb)
976     TEST_MMX_SSE(paddusw)
977     TEST_MMX_SSE(pand)
978     TEST_MMX_SSE(pandn)
979     TEST_MMX_SSE(pcmpeqb)
980     TEST_MMX_SSE(pcmpeqw)
981     TEST_MMX_SSE(pcmpeqd)
982     TEST_MMX_SSE(pcmpgtb)
983     TEST_MMX_SSE(pcmpgtw)
984     TEST_MMX_SSE(pcmpgtd)
985     TEST_MMX_SSE(pmaddwd)
986     TEST_MMX_SSE(pmulhw)
987     TEST_MMX_SSE(pmullw)
988     TEST_MMX_SSE(por)
989     TEST_MMX_SSE(psllw)
990 TEST_MMX_SSE_I8(psllw)
991     TEST_MMX_SSE(pslld)
992 TEST_MMX_SSE_I8(pslld)
993     TEST_MMX_SSE(psllq)
994 TEST_MMX_SSE_I8(psllq)
995     TEST_MMX_SSE(psraw)
996 TEST_MMX_SSE_I8(psraw)
997     TEST_MMX_SSE(psrad)
998 TEST_MMX_SSE_I8(psrad)
999     TEST_MMX_SSE(psrlw)
1000 TEST_MMX_SSE_I8(psrlw)
1001     TEST_MMX_SSE(psrld)
1002 TEST_MMX_SSE_I8(psrld)
1003     TEST_MMX_SSE(psrlq)
1004 TEST_MMX_SSE_I8(psrlq)
1005     TEST_MMX_SSE(psubb)
1006     TEST_MMX_SSE(psubw)
1007     TEST_MMX_SSE(psubd)
1008     TEST_MMX_SSE(psubsb)
1009     TEST_MMX_SSE(psubsw)
1010     TEST_MMX_SSE(psubusb)
1011     TEST_MMX_SSE(psubusw)
1012     TEST_MMX_SSE(punpckhbw)
1013     TEST_MMX_SSE(punpckhwd)
1014     TEST_MMX_SSE(punpckhdq)
1015     TEST_MMX_SSE(punpcklbw)
1016     TEST_MMX_SSE(punpcklwd)
1017     TEST_MMX_SSE(punpckldq)
1018     TEST_MMX_SSE(pxor)
1020     cvtpi2ps %mm1, %xmm2
1021     cvtpi2ps (%ebx), %xmm2
1022     TEST_MMX_SSE(pmaxsw)
1023     TEST_MMX_SSE(pmaxub)
1024     TEST_MMX_SSE(pminsw)
1025     TEST_MMX_SSE(pminub)