1 #define TEST1(instruction, RSval, RTval, RD, RS, RT) \
3 unsigned long long out; \
4 __asm__ __volatile__( \
5 "move $"#RS", %1" "\n\t" \
6 "move $"#RT", %2" "\n\t" \
7 "move $"#RD", $zero" "\n\t" \
9 "move %0, $"#RD "\n\t" \
11 : "r" (RSval), "r" (RTval) \
14 printf("%s :: rd 0x%llx, rs 0x%llx, rt 0x%llx\n", \
15 instruction, out, (long long) RSval, \
19 #define TEST2(instruction, RSval, imm, RT, RS) \
21 unsigned long long out; \
22 __asm__ __volatile__( \
23 "move $"#RS", %1" "\n\t" \
24 "move $"#RT", $zero" "\n\t" \
26 "move %0, $"#RT "\n\t" \
31 printf("%s :: rt 0x%llx, rs 0x%llx, imm 0x%04x\n", \
32 instruction, out, (long long) RSval, imm); \
35 #define TEST3(instruction, RSval, RD, RS) \
37 unsigned long long out; \
38 __asm__ __volatile__( \
39 "move $"#RS", %1" "\n\t" \
40 "move $"#RD", $zero" "\n\t" \
42 "move %0, $"#RD "\n\t" \
47 printf("%s :: rd 0x%llx, rs 0x%llx\n", \
48 instruction, out, (long long) RSval); \
51 #define TEST4(instruction, RSval, RTval, RS, RT) \
53 unsigned long long HI; \
54 unsigned long long LO; \
55 __asm__ __volatile__( \
56 "move $"#RS", %2" "\n\t" \
57 "move $"#RT", %3" "\n\t" \
63 : "=r" (HI), "=r" (LO) \
64 : "r" (RSval), "r"(RTval) \
67 printf("%s :: rs 0x%llx, rt 0x%llx, HI 0x%llx, LO 0x%llx\n", \
68 instruction, (long long) RSval, (long long) RTval, HI, LO); \
71 #define TEST5(instruction, RSval, RTval, RS, RT) \
73 unsigned long long HI; \
74 unsigned long long LO; \
75 __asm__ __volatile__( \
76 "move $"#RS", %2" "\n\t" \
77 "move $"#RT", %3" "\n\t" \
83 : "=r" (HI), "=r" (LO) \
84 : "r" (RSval), "r"(RTval) \
87 printf("%s :: rs 0x%llx, rt 0x%llx, HI 0x%llx, LO 0x%llx\n", \
88 instruction, (long long) RSval, (long long) RTval, HI, LO); \
91 #define TEST6(instruction, imm, RT) \
93 unsigned long long out; \
94 __asm__ __volatile__( \
95 "move $"#RT", $zero" "\n\t" \
97 "move %0, $"#RT "\n\t" \
101 printf("%s :: rt 0x%llx, imm 0x%04x\n", \
102 instruction, out, imm); \