1 # gas comment with ``gnu'' style quotes
3 /* some directive tests */
13 /* .align 16, 0x90 gas is too clever for us with 0x90 fill */
14 .align 16, 0x91 /* 0x91 tests the non-clever behaviour */
17 .string "hello\0world"
19 /* some label tests */
32 /* instruction tests */
42 movb $2, 0x100(%ebx,%edx,2)
43 movw $2, 0x100(%ebx,%edx,2)
44 movl $2, 0x100(%ebx,%edx,2)
45 movl %eax, 0x100(%ebx,%edx,2)
46 movl 0x100(%ebx,%edx,2), %edx
47 movw %ax, 0x100(%ebx,%edx,2)
54 mov $0x1122334455,%rbx
55 movq $0x1122334455,%rbx
56 movl $0x11334455,(%rbx)
59 mov %eax, 0x12(,%edx,2)
141 /* NOTE: gas is bugged here, so size must be added */
146 leal 0x1000(%ebx), %ecx
147 lea 0x1000(%ebx), %ecx
178 addl $0x123, 0x100(%ebx)
179 addl $0x123, 0x100(%ebx,%edx,2)
180 addl $0x123, 0x100(%esp)
181 addl $0x123, (3*8)(%esp)
229 imul $0x1100000, %eax
269 lcall $0x100, $0x1000
493 cmpxchgl %eax, 0x1000
571 /* XXX: handle prefixes */
592 /* handle one-line prefix + ops */
695 #ifdef __ASSEMBLER__ // should be defined, for S files
700 ft1: ft2: ft3: ft4: ft5: ft6: ft7: ft8: ft9:
744 /* movq mem64->xmm is encoded as f30f7e by GAS, but as
745 660f6e by tcc (which really is a movd and would need
746 a REX.W prefix to be movq). */
753 #define TEST_MMX_SSE(insn) \
757 #define TEST_MMX_SSE_I8(insn) \
762 TEST_MMX_SSE(packssdw)
763 TEST_MMX_SSE(packsswb)
764 TEST_MMX_SSE(packuswb)
770 TEST_MMX_SSE(paddusb)
771 TEST_MMX_SSE(paddusw)
774 TEST_MMX_SSE(pcmpeqb)
775 TEST_MMX_SSE(pcmpeqw)
776 TEST_MMX_SSE(pcmpeqd)
777 TEST_MMX_SSE(pcmpgtb)
778 TEST_MMX_SSE(pcmpgtw)
779 TEST_MMX_SSE(pcmpgtd)
780 TEST_MMX_SSE(pmaddwd)
785 TEST_MMX_SSE_I8(psllw)
787 TEST_MMX_SSE_I8(pslld)
789 TEST_MMX_SSE_I8(psllq)
791 TEST_MMX_SSE_I8(psraw)
793 TEST_MMX_SSE_I8(psrad)
795 TEST_MMX_SSE_I8(psrlw)
797 TEST_MMX_SSE_I8(psrld)
799 TEST_MMX_SSE_I8(psrlq)
805 TEST_MMX_SSE(psubusb)
806 TEST_MMX_SSE(psubusw)
807 TEST_MMX_SSE(punpckhbw)
808 TEST_MMX_SSE(punpckhwd)
809 TEST_MMX_SSE(punpckhdq)
810 TEST_MMX_SSE(punpcklbw)
811 TEST_MMX_SSE(punpcklwd)
812 TEST_MMX_SSE(punpckldq)
816 cvtpi2ps (%ebx), %xmm2