6 #define JZ_NEXT ".byte 0x74,0x00" /* jz the-next-insn */
10 char* junk
= malloc(48);
16 printf("\nComplain int64\n");
18 "movq 0(%0), %%rax\n\t"
19 "movq 8(%0), %%r8\n\t"
20 "xorq %%r8, %%rax\n\t"
22 : : "r"(junk
) : "r8", "rax", "cc"
25 printf("\nNo complain int64\n");
27 "movq 0(%0), %%rax\n\t"
28 "movq 8(%0), %%r8\n\t"
29 "xorq %%rax, %%rax\n\t"
31 : : "r"(junk
) : "r8", "rax", "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"
46 : : "r"(junk
) : "mm7", "mm0", "cc", "memory"
49 printf("\nNo complain mmx\n");
52 "movq 0(%0), %%mm0\n\t"
53 "movq 8(%0), %%mm7\n\t"
54 "pxor %%mm0, %%mm0\n\t"
55 "movq %%mm0, 16(%0)\n\t"
58 : : "r"(junk
) : "mm7", "mm0", "cc", "memory"
64 printf("\nComplain sse xorps\n");
66 "movups 0(%0), %%xmm0\n\t"
67 "movups 16(%0), %%xmm8\n\t"
68 "xorps %%xmm8, %%xmm0\n\t"
69 "movups %%xmm0, 32(%0)\n\t"
70 "movq 32(%0), %%rax\n\t"
71 "addq 40(%0), %%rax\n\t"
73 : : "r"(junk
) : "rax", "xmm8", "xmm0", "cc", "memory"
76 printf("\nNo complain sse xorps\n");
78 "movups 0(%0), %%xmm0\n\t"
79 "movups 16(%0), %%xmm8\n\t"
80 "xorps %%xmm0, %%xmm0\n\t"
81 "movups %%xmm0, 32(%0)\n\t"
82 "movq 32(%0), %%rax\n\t"
83 "addq 40(%0), %%rax\n\t"
85 : : "r"(junk
) : "rax", "xmm8", "xmm0", "cc", "memory"
91 printf("\nComplain sse2 pxor\n");
93 "movups 0(%0), %%xmm0\n\t"
94 "movups 16(%0), %%xmm8\n\t"
95 "pxor %%xmm8, %%xmm0\n\t"
96 "movups %%xmm0, 32(%0)\n\t"
97 "movq 32(%0), %%rax\n\t"
98 "addq 40(%0), %%rax\n\t"
100 : : "r"(junk
) : "rax", "xmm8", "xmm0", "cc", "memory"
103 printf("\nNo complain sse2 pxor\n");
104 __asm__
__volatile__(
105 "movups 0(%0), %%xmm0\n\t"
106 "movups 16(%0), %%xmm8\n\t"
107 "pxor %%xmm0, %%xmm0\n\t"
108 "movups %%xmm0, 32(%0)\n\t"
109 "movq 32(%0), %%rax\n\t"
110 "addq 40(%0), %%rax\n\t"
112 : : "r"(junk
) : "rax", "xmm8", "xmm0", "cc", "memory"
116 printf("\nComplain sse2 xorpd\n");
117 __asm__
__volatile__(
118 "movups 0(%0), %%xmm0\n\t"
119 "movups 16(%0), %%xmm8\n\t"
120 "xorpd %%xmm8, %%xmm0\n\t"
121 "movups %%xmm0, 32(%0)\n\t"
122 "movq 32(%0), %%rax\n\t"
123 "addq 40(%0), %%rax\n\t"
125 : : "r"(junk
) : "rax", "xmm8", "xmm0", "cc", "memory"
128 printf("\nNo complain sse2 xorpd\n");
129 __asm__
__volatile__(
130 "movups 0(%0), %%xmm0\n\t"
131 "movups 16(%0), %%xmm8\n\t"
132 "xorpd %%xmm0, %%xmm0\n\t"
133 "movups %%xmm0, 32(%0)\n\t"
134 "movq 32(%0), %%rax\n\t"
135 "addq 40(%0), %%rax\n\t"
137 : : "r"(junk
) : "rax", "xmm8", "xmm0", "cc", "memory"