1 #include <stdio.h> 2 #include "macro_load_store.h" 3 4 int main() 5 { 6 int i; 7 int s1 = sizeof(int); 8 int s2 = sizeof(unsigned long long); 9 init_reg_val2(); 10 /**********************************************************************/ 11 /*-------------------------------LOAD---------------------------------*/ 12 /**********************************************************************/ 13 /* lb */ 14 for (i = 0; i < N*s1; i++) 15 TEST1("lb", i, reg_val1); 16 17 for (i = 0; i < N*s2; i++) 18 TEST1("lb", i, reg_val2); 19 20 /* lbu */ 21 for (i = 0; i < N*s1; i++) 22 TEST1("lbu", i, reg_val1); 23 24 for (i = 0; i < N*s2; i++) 25 TEST1("lbu", i, reg_val2); 26 27 /* ld */ 28 for (i = 0; i < N*s1; i = i+8) 29 TEST1("ld", i, reg_val1); 30 31 for (i = 0; i < N*s2; i = i+8) 32 TEST1("ld", i, reg_val2); 33 34 /* ldl */ 35 for (i = 0; i < N*s1; i++) 36 TEST1("ldl", i, reg_val1); 37 38 for (i = 0; i < N*s2; i++) 39 TEST1("ldl", i, reg_val2); 40 41 /* ldr */ 42 for (i = 0; i < N*s1; i++) 43 TEST1("ldr", i, reg_val1); 44 45 for (i = 0; i < N*s2; i++) 46 TEST1("ldr", i, reg_val2); 47 48 /* lh */ 49 for (i = 0; i < N*s1; i = i+2) 50 TEST1("lh", i, reg_val1); 51 52 for (i = 0; i < N*s2; i = i+2) 53 TEST1("lh", i, reg_val2); 54 55 /* lhu */ 56 for (i = 0; i < N*s1; i = i+2) 57 TEST1("lhu", i, reg_val1); 58 59 for (i = 0; i < N*s2; i = i+2) 60 TEST1("lhu", i, reg_val2); 61 62 /* lw */ 63 for (i = 0; i < N*s1; i = i+4) 64 TEST1("lw", i, reg_val1); 65 66 for (i = 0; i < N*s2; i = i+4) 67 TEST1("lw", i, reg_val2); 68 69 /* lwl */ 70 for (i = 0; i < N*s1; i++) 71 TEST1("lwl", i, reg_val1); 72 73 for (i = 0; i < N*s2; i++) 74 TEST1("lwl", i, reg_val2); 75 76 /* lwr */ 77 for (i = 0; i < N*s1; i++) 78 TEST1("lwr", i, reg_val1); 79 80 for (i = 0; i < N*s2; i++) 81 TEST1("lwr", i, reg_val2); 82 83 /* lwu */ 84 for (i = 0; i < N*s1; i = i+4) 85 TEST1("lwu", i, reg_val1); 86 87 for (i = 0; i < N*s2; i = i+4) 88 TEST1("lwu", i, reg_val2); 89 90 /**********************************************************************/ 91 /*-------------------------------STORE--------------------------------*/ 92 /**********************************************************************/ 93 init_reg_val_zero(); 94 /* sb */ 95 for (i = 0; i < (N-1)*s2; i++) 96 TEST2("sb", i); 97 98 init_reg_val_zero(); 99 /* sd */ 100 for (i = 0; i < (N-1)*s2; i = i+8) 101 TEST2("sd", i); 102 103 init_reg_val_zero(); 104 /* sdl */ 105 for (i = 0; i < (N-1)*s2; i++) 106 TEST2("sdl", i); 107 108 init_reg_val_zero(); 109 /* sdr */ 110 for (i = 8; i < (N-1)*s2; i++) 111 TEST2("sdr", i); 112 113 init_reg_val_zero(); 114 /* sh */ 115 for (i = 0; i < (N-1)*s2; i = i+2) 116 TEST2("sh", i); 117 118 init_reg_val_zero(); 119 /* sw */ 120 for (i = 0; i < (N-1)*s2; i = i+4) 121 TEST2("sw", i); 122 123 init_reg_val_zero(); 124 /* swl */ 125 for (i = 4; i < (N-1)*s2; i++) 126 TEST2("swl", i); 127 128 init_reg_val_zero(); 129 /* swr */ 130 for (i = 4; i < (N-1)*s2; i++) 131 TEST2("swr", i); 132 133 return 0; 134 } 135