6 #define JZ_NEXT ".byte 0x74,0x00" /* jz the-next-insn */
10 char* junk
= malloc(48);
16 printf("\nComplain int32\n");
18 "movl 0(%0), %%eax\n\t"
19 "movl 8(%0), %%edi\n\t"
20 "xorl %%edi, %%eax\n\t"
22 : : "r"(junk
) : "edi", "eax", "cc"
25 printf("\nNo complain int32\n");
27 "movl 0(%0), %%eax\n\t"
28 "movl 8(%0), %%edi\n\t"
29 "xorl %%eax, %%eax\n\t"
31 : : "r"(junk
) : "edi", "eax", "cc"
37 printf("\nComplain mmx\n");
40 "movq 0(%0), %%mm0\n\t"
41 "movq 8(%0), %%mm7\n\t"
42 "pxor %%mm7, %%mm0\n\t"
43 "movq %%mm0, 16(%0)\n\t"
44 "movl 16(%0), %%esi\n\t"
45 "addl 20(%0), %%esi\n\t"
47 : : "r"(junk
) : "esi", "mm7", "mm0", "cc", "memory"
50 printf("\nNo complain mmx\n");
53 "movq 0(%0), %%mm0\n\t"
54 "movq 8(%0), %%mm7\n\t"
55 "pxor %%mm0, %%mm0\n\t"
56 "movq %%mm0, 16(%0)\n\t"
57 "movl 16(%0), %%esi\n\t"
58 "addl 20(%0), %%esi\n\t"
60 : : "r"(junk
) : "esi", "mm7", "mm0", "cc", "memory"
66 printf("\nComplain sse xorps\n");
68 "movups 0(%0), %%xmm0\n\t"
69 "movups 16(%0), %%xmm7\n\t"
70 "xorps %%xmm7, %%xmm0\n\t"
71 "movups %%xmm0, 32(%0)\n\t"
72 "movl 32(%0), %%esi\n\t"
73 "addl 36(%0), %%esi\n\t"
74 "addl 40(%0), %%esi\n\t"
75 "addl 44(%0), %%esi\n\t"
77 : : "r"(junk
) : "esi", "xmm7", "xmm0", "cc", "memory"
80 printf("\nNo complain sse xorps\n");
82 "movups 0(%0), %%xmm0\n\t"
83 "movups 16(%0), %%xmm7\n\t"
84 "xorps %%xmm0, %%xmm0\n\t"
85 "movups %%xmm0, 32(%0)\n\t"
86 "movl 32(%0), %%esi\n\t"
87 "addl 36(%0), %%esi\n\t"
88 "addl 40(%0), %%esi\n\t"
89 "addl 44(%0), %%esi\n\t"
91 : : "r"(junk
) : "esi", "xmm7", "xmm0", "cc", "memory"
97 printf("\nComplain sse2 pxor\n");
99 "movups 0(%0), %%xmm0\n\t"
100 "movups 16(%0), %%xmm7\n\t"
101 "pxor %%xmm7, %%xmm0\n\t"
102 "movups %%xmm0, 32(%0)\n\t"
103 "movl 32(%0), %%esi\n\t"
104 "addl 36(%0), %%esi\n\t"
105 "addl 40(%0), %%esi\n\t"
106 "addl 44(%0), %%esi\n\t"
108 : : "r"(junk
) : "esi", "xmm7", "xmm0", "cc", "memory"
111 printf("\nNo complain sse2 pxor\n");
112 __asm__
__volatile__(
113 "movups 0(%0), %%xmm0\n\t"
114 "movups 16(%0), %%xmm7\n\t"
115 "pxor %%xmm0, %%xmm0\n\t"
116 "movups %%xmm0, 32(%0)\n\t"
117 "movl 32(%0), %%esi\n\t"
118 "addl 36(%0), %%esi\n\t"
119 "addl 40(%0), %%esi\n\t"
120 "addl 44(%0), %%esi\n\t"
122 : : "r"(junk
) : "esi", "xmm7", "xmm0", "cc", "memory"
126 printf("\nComplain sse2 xorpd\n");
127 __asm__
__volatile__(
128 "movups 0(%0), %%xmm0\n\t"
129 "movups 16(%0), %%xmm7\n\t"
130 "xorpd %%xmm7, %%xmm0\n\t"
131 "movups %%xmm0, 32(%0)\n\t"
132 "movl 32(%0), %%esi\n\t"
133 "addl 36(%0), %%esi\n\t"
134 "addl 40(%0), %%esi\n\t"
135 "addl 44(%0), %%esi\n\t"
137 : : "r"(junk
) : "esi", "xmm7", "xmm0", "cc", "memory"
140 printf("\nNo complain sse2 xorpd\n");
141 __asm__
__volatile__(
142 "movups 0(%0), %%xmm0\n\t"
143 "movups 16(%0), %%xmm7\n\t"
144 "xorpd %%xmm0, %%xmm0\n\t"
145 "movups %%xmm0, 32(%0)\n\t"
146 "movl 32(%0), %%esi\n\t"
147 "addl 36(%0), %%esi\n\t"
148 "addl 40(%0), %%esi\n\t"
149 "addl 44(%0), %%esi\n\t"
151 : : "r"(junk
) : "esi", "xmm7", "xmm0", "cc", "memory"