1 #include <stdio.h>
2 #include "macro_load_store.h"
3
main()4 int main()
5 {
6 #if defined(__mips_hard_float)
7 int i;
8 int s1 = sizeof(int);
9 int s2 = sizeof(unsigned long long);
10 init_reg_val2();
11 /**********************************************************************/
12 /*-------------------------------LOAD---------------------------------*/
13 /**********************************************************************/
14 printf("--- LDC1 ---\n");
15 for (i = 0; i < N*s1; i = i+8)
16 TEST3("ldc1", i, reg_val1);
17
18 for (i = 0; i < N*s2; i = i+8)
19 TEST3("ldc1", i, reg_val2);
20
21 printf("--- LDXC1 ---\n");
22 for (i = 0; i < N*s1; i = i+8)
23 TEST5("ldxc1", i, reg_val1);
24
25 for (i = 0; i < N*s2; i = i+8)
26 TEST5("ldxc1", i, reg_val2);
27
28 printf("--- LWC1 ---\n");
29 for (i = 0; i < N*s1; i = i+4)
30 TEST3w("lwc1", i, reg_val1);
31
32 for (i = 0; i < N*s2; i = i+4)
33 TEST3w("lwc1", i, reg_val2);
34
35 printf("--- LWXC1 ---\n");
36 for (i = 0; i < N*s1; i = i+4)
37 TEST5w("lwxc1", i, reg_val1);
38
39 for (i = 0; i < N*s2; i = i+4)
40 TEST5w("lwxc1", i, reg_val2);
41
42 /**********************************************************************/
43 /*-------------------------------STORE--------------------------------*/
44 /**********************************************************************/
45 init_reg_val_zero();
46 printf("--- SDC1 ---\n");
47 for (i = 0; i < N*s1; i = i+8) {
48 TEST4("sdc1", i);
49 }
50
51 init_reg_val_zero();
52 printf("--- SWC1 ---\n");
53 for (i = 0; i < (N-1)*s1; i = i+4) {
54 TEST4("swc1", i);
55 }
56
57 init_reg_val_zero();
58 printf("--- SDXC1 ---\n");
59 for (i = 0; i < N*s1; i = i+8) {
60 TEST6("sdxc1", i);
61 }
62
63 init_reg_val_zero();
64 printf("--- SWXC1 ---\n");
65 for (i = 0; i < (N-1)*s1; i = i+4) {
66 TEST6("swxc1", i);
67 }
68 #endif
69
70 return 0;
71 }
72