__asm__ ("foo1");
__asm__ ("foo2");
__asm__ ("foo3");
void t1(int len) {
__asm__ volatile("" : "=&r"(len), "+&r"(len));
}
void t2(unsigned long long t) {
__asm__ volatile("" : "+m"(t));
}
void t3(unsigned char *src, unsigned long long temp) {
__asm__ volatile("" : "+m"(temp), "+r"(src));
}
void t4(void) {
unsigned long long a;
struct reg { unsigned long long a, b; } b;
__asm__ volatile ("":: "m"(a), "m"(b));
}
void t5(int i) {
asm("nop" : "=r"(i) : "0"(t5));
}
void t6(void) {
__asm__ volatile("" : : "i" (t6));
}
void t7(int a) {
__asm__ volatile("T7 NAMED: %[input]" : "+r"(a): [input] "i" (4));
}
void t8(void) {
__asm__ volatile("T8 NAMED MODIFIER: %c[input]" :: [input] "i" (4));
}
unsigned t9(unsigned int a) {
asm("bswap %0 %1" : "+r" (a));
return a;
}
void t10(int r) {
__asm__("PR3908 %[lf] %[xx] %[li] %[r]" : [r] "+r" (r) : [lf] "mx" (0), [li] "mr" (0), [xx] "x" ((double)(0)));
}
unsigned t11(signed char input) {
unsigned output;
__asm__("xyz"
: "=a" (output)
: "0" (input));
return output;
}
unsigned char t12(unsigned input) {
unsigned char output;
__asm__("xyz"
: "=a" (output)
: "0" (input));
return output;
}
unsigned char t13(unsigned input) {
unsigned char output;
__asm__("xyz %1"
: "=a" (output)
: "0" (input));
return output;
}
struct large {
int x[1000];
};
unsigned long t15(int x, struct large *P) {
__asm__("xyz "
: "=r" (x)
: "m" (*P), "0" (x));
return x;
}
struct S {
int a : 4;
};
void t14(struct S *P) {
__asm__("abc %0" : "=r"(P->a) );
}
int t16(void) {
int a,b;
asm ( "nop;"
:"=%c" (a)
: "r" (b)
);
return 0;
}
void t17(void) {
int i;
__asm__ ( "nop": "=m"(i));
}
int t18(unsigned data) {
int a, b;
asm("xyz" :"=a"(a), "=d"(b) : "a"(data));
return a + b;
}
int t19(unsigned data) {
int a, b;
asm("x{abc|def|ghi}z" :"=r"(a): "r"(data));
return a + b;
}
double t20(double x) {
register long double result;
__asm __volatile ("frndint" : "=t" (result) : "0" (x));
return result;
}
float t21(long double x) {
register float result;
__asm __volatile ("frndint" : "=t" (result) : "0" (x));
return result;
}
unsigned char t22(unsigned char a, unsigned char b) {
unsigned int la = a;
unsigned int lb = b;
unsigned int bigres;
unsigned char res;
__asm__ ("0:\n1:\n" : [bigres] "=la"(bigres) : [la] "0"(la), [lb] "c"(lb) :
"edx", "cc");
res = bigres;
return res;
}
unsigned char t23(unsigned char a, unsigned char b) {
unsigned int la = a;
unsigned int lb = b;
unsigned char res;
__asm__ ("0:\n1:\n" : [res] "=la"(res) : [la] "0"(la), [lb] "c"(lb) :
"edx", "cc");
return res;
}
void *t24(char c) {
void *addr;
__asm__ ("foobar" : "=a" (addr) : "0" (c));
return addr;
}
void t25(void)
{
__asm__ __volatile__( \
"finit" \
: \
: \
:"st","st(1)","st(2)","st(3)", \
"st(4)","st(5)","st(6)","st(7)", \
"fpsr","fpcr" \
);
}
typedef long long __m256i __attribute__((__vector_size__(32)));
void t26 (__m256i *p) {
__asm__ volatile("vmovaps %0, %%ymm0" :: "m" (*(__m256i*)p) : "ymm0");
}
void t27(void) {
asm volatile("nop");
}
void t28(void)
{
asm volatile ("/* %0 */" : : "i#*X,*r" (1));
}
static unsigned t29_var[1];
void t29(void) {
asm volatile("movl %%eax, %0"
:
: "m"(t29_var));
}
void t30(int len) {
__asm__ volatile(""
: "+&&rm"(len));
}
void t31(int len) {
__asm__ volatile(""
: "+%%rm"(len), "+rm"(len));
}
int t32(int cond)
{
asm goto("testl %0, %0; jne %l1;" :: "r"(cond)::label_true, loop);
return 0;
loop:
return 0;
label_true:
return 1;
}
void *t33(void *ptr)
{
void *ret;
asm ("lea %1, %0" : "=r" (ret) : "p" (ptr));
return ret;
}