Commit d9bea114849319e2dd31f027411089575f1d23a1
1 parent
f8393946
target-mips: variable names consistency
Use a consistent naming of arguments and TCG variables across the whole file, the same as in tcg/tcg-op.h: - arg1, arg2, ... for arguments - t0, t1, t2, ... for variables Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7106 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
768 additions
and
766 deletions
target-mips/op_helper.c
| @@ -67,25 +67,25 @@ static void do_restore_state (void *pc_ptr) | @@ -67,25 +67,25 @@ static void do_restore_state (void *pc_ptr) | ||
| 67 | } | 67 | } |
| 68 | #endif | 68 | #endif |
| 69 | 69 | ||
| 70 | -target_ulong helper_clo (target_ulong t0) | 70 | +target_ulong helper_clo (target_ulong arg1) |
| 71 | { | 71 | { |
| 72 | - return clo32(t0); | 72 | + return clo32(arg1); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | -target_ulong helper_clz (target_ulong t0) | 75 | +target_ulong helper_clz (target_ulong arg1) |
| 76 | { | 76 | { |
| 77 | - return clz32(t0); | 77 | + return clz32(arg1); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | #if defined(TARGET_MIPS64) | 80 | #if defined(TARGET_MIPS64) |
| 81 | -target_ulong helper_dclo (target_ulong t0) | 81 | +target_ulong helper_dclo (target_ulong arg1) |
| 82 | { | 82 | { |
| 83 | - return clo64(t0); | 83 | + return clo64(arg1); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | -target_ulong helper_dclz (target_ulong t0) | 86 | +target_ulong helper_dclz (target_ulong arg1) |
| 87 | { | 87 | { |
| 88 | - return clz64(t0); | 88 | + return clz64(arg1); |
| 89 | } | 89 | } |
| 90 | #endif /* TARGET_MIPS64 */ | 90 | #endif /* TARGET_MIPS64 */ |
| 91 | 91 | ||
| @@ -101,126 +101,126 @@ static inline void set_HILO (uint64_t HILO) | @@ -101,126 +101,126 @@ static inline void set_HILO (uint64_t HILO) | ||
| 101 | env->active_tc.HI[0] = (int32_t)(HILO >> 32); | 101 | env->active_tc.HI[0] = (int32_t)(HILO >> 32); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | -static inline void set_HIT0_LO (target_ulong t0, uint64_t HILO) | 104 | +static inline void set_HIT0_LO (target_ulong arg1, uint64_t HILO) |
| 105 | { | 105 | { |
| 106 | env->active_tc.LO[0] = (int32_t)(HILO & 0xFFFFFFFF); | 106 | env->active_tc.LO[0] = (int32_t)(HILO & 0xFFFFFFFF); |
| 107 | - t0 = env->active_tc.HI[0] = (int32_t)(HILO >> 32); | 107 | + arg1 = env->active_tc.HI[0] = (int32_t)(HILO >> 32); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | -static inline void set_HI_LOT0 (target_ulong t0, uint64_t HILO) | 110 | +static inline void set_HI_LOT0 (target_ulong arg1, uint64_t HILO) |
| 111 | { | 111 | { |
| 112 | - t0 = env->active_tc.LO[0] = (int32_t)(HILO & 0xFFFFFFFF); | 112 | + arg1 = env->active_tc.LO[0] = (int32_t)(HILO & 0xFFFFFFFF); |
| 113 | env->active_tc.HI[0] = (int32_t)(HILO >> 32); | 113 | env->active_tc.HI[0] = (int32_t)(HILO >> 32); |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | /* Multiplication variants of the vr54xx. */ | 116 | /* Multiplication variants of the vr54xx. */ |
| 117 | -target_ulong helper_muls (target_ulong t0, target_ulong t1) | 117 | +target_ulong helper_muls (target_ulong arg1, target_ulong arg2) |
| 118 | { | 118 | { |
| 119 | - set_HI_LOT0(t0, 0 - ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1)); | 119 | + set_HI_LOT0(arg1, 0 - ((int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2)); |
| 120 | 120 | ||
| 121 | - return t0; | 121 | + return arg1; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | -target_ulong helper_mulsu (target_ulong t0, target_ulong t1) | 124 | +target_ulong helper_mulsu (target_ulong arg1, target_ulong arg2) |
| 125 | { | 125 | { |
| 126 | - set_HI_LOT0(t0, 0 - ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1)); | 126 | + set_HI_LOT0(arg1, 0 - ((uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2)); |
| 127 | 127 | ||
| 128 | - return t0; | 128 | + return arg1; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | -target_ulong helper_macc (target_ulong t0, target_ulong t1) | 131 | +target_ulong helper_macc (target_ulong arg1, target_ulong arg2) |
| 132 | { | 132 | { |
| 133 | - set_HI_LOT0(t0, ((int64_t)get_HILO()) + ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1)); | 133 | + set_HI_LOT0(arg1, ((int64_t)get_HILO()) + ((int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2)); |
| 134 | 134 | ||
| 135 | - return t0; | 135 | + return arg1; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | -target_ulong helper_macchi (target_ulong t0, target_ulong t1) | 138 | +target_ulong helper_macchi (target_ulong arg1, target_ulong arg2) |
| 139 | { | 139 | { |
| 140 | - set_HIT0_LO(t0, ((int64_t)get_HILO()) + ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1)); | 140 | + set_HIT0_LO(arg1, ((int64_t)get_HILO()) + ((int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2)); |
| 141 | 141 | ||
| 142 | - return t0; | 142 | + return arg1; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | -target_ulong helper_maccu (target_ulong t0, target_ulong t1) | 145 | +target_ulong helper_maccu (target_ulong arg1, target_ulong arg2) |
| 146 | { | 146 | { |
| 147 | - set_HI_LOT0(t0, ((uint64_t)get_HILO()) + ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1)); | 147 | + set_HI_LOT0(arg1, ((uint64_t)get_HILO()) + ((uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2)); |
| 148 | 148 | ||
| 149 | - return t0; | 149 | + return arg1; |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | -target_ulong helper_macchiu (target_ulong t0, target_ulong t1) | 152 | +target_ulong helper_macchiu (target_ulong arg1, target_ulong arg2) |
| 153 | { | 153 | { |
| 154 | - set_HIT0_LO(t0, ((uint64_t)get_HILO()) + ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1)); | 154 | + set_HIT0_LO(arg1, ((uint64_t)get_HILO()) + ((uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2)); |
| 155 | 155 | ||
| 156 | - return t0; | 156 | + return arg1; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | -target_ulong helper_msac (target_ulong t0, target_ulong t1) | 159 | +target_ulong helper_msac (target_ulong arg1, target_ulong arg2) |
| 160 | { | 160 | { |
| 161 | - set_HI_LOT0(t0, ((int64_t)get_HILO()) - ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1)); | 161 | + set_HI_LOT0(arg1, ((int64_t)get_HILO()) - ((int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2)); |
| 162 | 162 | ||
| 163 | - return t0; | 163 | + return arg1; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | -target_ulong helper_msachi (target_ulong t0, target_ulong t1) | 166 | +target_ulong helper_msachi (target_ulong arg1, target_ulong arg2) |
| 167 | { | 167 | { |
| 168 | - set_HIT0_LO(t0, ((int64_t)get_HILO()) - ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1)); | 168 | + set_HIT0_LO(arg1, ((int64_t)get_HILO()) - ((int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2)); |
| 169 | 169 | ||
| 170 | - return t0; | 170 | + return arg1; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | -target_ulong helper_msacu (target_ulong t0, target_ulong t1) | 173 | +target_ulong helper_msacu (target_ulong arg1, target_ulong arg2) |
| 174 | { | 174 | { |
| 175 | - set_HI_LOT0(t0, ((uint64_t)get_HILO()) - ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1)); | 175 | + set_HI_LOT0(arg1, ((uint64_t)get_HILO()) - ((uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2)); |
| 176 | 176 | ||
| 177 | - return t0; | 177 | + return arg1; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | -target_ulong helper_msachiu (target_ulong t0, target_ulong t1) | 180 | +target_ulong helper_msachiu (target_ulong arg1, target_ulong arg2) |
| 181 | { | 181 | { |
| 182 | - set_HIT0_LO(t0, ((uint64_t)get_HILO()) - ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1)); | 182 | + set_HIT0_LO(arg1, ((uint64_t)get_HILO()) - ((uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2)); |
| 183 | 183 | ||
| 184 | - return t0; | 184 | + return arg1; |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | -target_ulong helper_mulhi (target_ulong t0, target_ulong t1) | 187 | +target_ulong helper_mulhi (target_ulong arg1, target_ulong arg2) |
| 188 | { | 188 | { |
| 189 | - set_HIT0_LO(t0, (int64_t)(int32_t)t0 * (int64_t)(int32_t)t1); | 189 | + set_HIT0_LO(arg1, (int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2); |
| 190 | 190 | ||
| 191 | - return t0; | 191 | + return arg1; |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | -target_ulong helper_mulhiu (target_ulong t0, target_ulong t1) | 194 | +target_ulong helper_mulhiu (target_ulong arg1, target_ulong arg2) |
| 195 | { | 195 | { |
| 196 | - set_HIT0_LO(t0, (uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1); | 196 | + set_HIT0_LO(arg1, (uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2); |
| 197 | 197 | ||
| 198 | - return t0; | 198 | + return arg1; |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | -target_ulong helper_mulshi (target_ulong t0, target_ulong t1) | 201 | +target_ulong helper_mulshi (target_ulong arg1, target_ulong arg2) |
| 202 | { | 202 | { |
| 203 | - set_HIT0_LO(t0, 0 - ((int64_t)(int32_t)t0 * (int64_t)(int32_t)t1)); | 203 | + set_HIT0_LO(arg1, 0 - ((int64_t)(int32_t)arg1 * (int64_t)(int32_t)arg2)); |
| 204 | 204 | ||
| 205 | - return t0; | 205 | + return arg1; |
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | -target_ulong helper_mulshiu (target_ulong t0, target_ulong t1) | 208 | +target_ulong helper_mulshiu (target_ulong arg1, target_ulong arg2) |
| 209 | { | 209 | { |
| 210 | - set_HIT0_LO(t0, 0 - ((uint64_t)(uint32_t)t0 * (uint64_t)(uint32_t)t1)); | 210 | + set_HIT0_LO(arg1, 0 - ((uint64_t)(uint32_t)arg1 * (uint64_t)(uint32_t)arg2)); |
| 211 | 211 | ||
| 212 | - return t0; | 212 | + return arg1; |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | #ifdef TARGET_MIPS64 | 215 | #ifdef TARGET_MIPS64 |
| 216 | -void helper_dmult (target_ulong t0, target_ulong t1) | 216 | +void helper_dmult (target_ulong arg1, target_ulong arg2) |
| 217 | { | 217 | { |
| 218 | - muls64(&(env->active_tc.LO[0]), &(env->active_tc.HI[0]), t0, t1); | 218 | + muls64(&(env->active_tc.LO[0]), &(env->active_tc.HI[0]), arg1, arg2); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | -void helper_dmultu (target_ulong t0, target_ulong t1) | 221 | +void helper_dmultu (target_ulong arg1, target_ulong arg2) |
| 222 | { | 222 | { |
| 223 | - mulu64(&(env->active_tc.LO[0]), &(env->active_tc.HI[0]), t0, t1); | 223 | + mulu64(&(env->active_tc.LO[0]), &(env->active_tc.HI[0]), arg1, arg2); |
| 224 | } | 224 | } |
| 225 | #endif | 225 | #endif |
| 226 | 226 | ||
| @@ -232,7 +232,7 @@ void helper_dmultu (target_ulong t0, target_ulong t1) | @@ -232,7 +232,7 @@ void helper_dmultu (target_ulong t0, target_ulong t1) | ||
| 232 | #define GET_OFFSET(addr, offset) (addr - (offset)) | 232 | #define GET_OFFSET(addr, offset) (addr - (offset)) |
| 233 | #endif | 233 | #endif |
| 234 | 234 | ||
| 235 | -target_ulong helper_lwl(target_ulong t0, target_ulong t1, int mem_idx) | 235 | +target_ulong helper_lwl(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 236 | { | 236 | { |
| 237 | target_ulong tmp; | 237 | target_ulong tmp; |
| 238 | 238 | ||
| @@ -249,27 +249,27 @@ target_ulong helper_lwl(target_ulong t0, target_ulong t1, int mem_idx) | @@ -249,27 +249,27 @@ target_ulong helper_lwl(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 249 | case 2: ldfun = ldub_user; break; | 249 | case 2: ldfun = ldub_user; break; |
| 250 | } | 250 | } |
| 251 | #endif | 251 | #endif |
| 252 | - tmp = ldfun(t0); | ||
| 253 | - t1 = (t1 & 0x00FFFFFF) | (tmp << 24); | 252 | + tmp = ldfun(arg2); |
| 253 | + arg1 = (arg1 & 0x00FFFFFF) | (tmp << 24); | ||
| 254 | 254 | ||
| 255 | - if (GET_LMASK(t0) <= 2) { | ||
| 256 | - tmp = ldfun(GET_OFFSET(t0, 1)); | ||
| 257 | - t1 = (t1 & 0xFF00FFFF) | (tmp << 16); | 255 | + if (GET_LMASK(arg2) <= 2) { |
| 256 | + tmp = ldfun(GET_OFFSET(arg2, 1)); | ||
| 257 | + arg1 = (arg1 & 0xFF00FFFF) | (tmp << 16); | ||
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | - if (GET_LMASK(t0) <= 1) { | ||
| 261 | - tmp = ldfun(GET_OFFSET(t0, 2)); | ||
| 262 | - t1 = (t1 & 0xFFFF00FF) | (tmp << 8); | 260 | + if (GET_LMASK(arg2) <= 1) { |
| 261 | + tmp = ldfun(GET_OFFSET(arg2, 2)); | ||
| 262 | + arg1 = (arg1 & 0xFFFF00FF) | (tmp << 8); | ||
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | - if (GET_LMASK(t0) == 0) { | ||
| 266 | - tmp = ldfun(GET_OFFSET(t0, 3)); | ||
| 267 | - t1 = (t1 & 0xFFFFFF00) | tmp; | 265 | + if (GET_LMASK(arg2) == 0) { |
| 266 | + tmp = ldfun(GET_OFFSET(arg2, 3)); | ||
| 267 | + arg1 = (arg1 & 0xFFFFFF00) | tmp; | ||
| 268 | } | 268 | } |
| 269 | - return (int32_t)t1; | 269 | + return (int32_t)arg1; |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | -target_ulong helper_lwr(target_ulong t0, target_ulong t1, int mem_idx) | 272 | +target_ulong helper_lwr(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 273 | { | 273 | { |
| 274 | target_ulong tmp; | 274 | target_ulong tmp; |
| 275 | 275 | ||
| @@ -286,27 +286,27 @@ target_ulong helper_lwr(target_ulong t0, target_ulong t1, int mem_idx) | @@ -286,27 +286,27 @@ target_ulong helper_lwr(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 286 | case 2: ldfun = ldub_user; break; | 286 | case 2: ldfun = ldub_user; break; |
| 287 | } | 287 | } |
| 288 | #endif | 288 | #endif |
| 289 | - tmp = ldfun(t0); | ||
| 290 | - t1 = (t1 & 0xFFFFFF00) | tmp; | 289 | + tmp = ldfun(arg2); |
| 290 | + arg1 = (arg1 & 0xFFFFFF00) | tmp; | ||
| 291 | 291 | ||
| 292 | - if (GET_LMASK(t0) >= 1) { | ||
| 293 | - tmp = ldfun(GET_OFFSET(t0, -1)); | ||
| 294 | - t1 = (t1 & 0xFFFF00FF) | (tmp << 8); | 292 | + if (GET_LMASK(arg2) >= 1) { |
| 293 | + tmp = ldfun(GET_OFFSET(arg2, -1)); | ||
| 294 | + arg1 = (arg1 & 0xFFFF00FF) | (tmp << 8); | ||
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | - if (GET_LMASK(t0) >= 2) { | ||
| 298 | - tmp = ldfun(GET_OFFSET(t0, -2)); | ||
| 299 | - t1 = (t1 & 0xFF00FFFF) | (tmp << 16); | 297 | + if (GET_LMASK(arg2) >= 2) { |
| 298 | + tmp = ldfun(GET_OFFSET(arg2, -2)); | ||
| 299 | + arg1 = (arg1 & 0xFF00FFFF) | (tmp << 16); | ||
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | - if (GET_LMASK(t0) == 3) { | ||
| 303 | - tmp = ldfun(GET_OFFSET(t0, -3)); | ||
| 304 | - t1 = (t1 & 0x00FFFFFF) | (tmp << 24); | 302 | + if (GET_LMASK(arg2) == 3) { |
| 303 | + tmp = ldfun(GET_OFFSET(arg2, -3)); | ||
| 304 | + arg1 = (arg1 & 0x00FFFFFF) | (tmp << 24); | ||
| 305 | } | 305 | } |
| 306 | - return (int32_t)t1; | 306 | + return (int32_t)arg1; |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | -void helper_swl(target_ulong t0, target_ulong t1, int mem_idx) | 309 | +void helper_swl(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 310 | { | 310 | { |
| 311 | #ifdef CONFIG_USER_ONLY | 311 | #ifdef CONFIG_USER_ONLY |
| 312 | #define stfun stb_raw | 312 | #define stfun stb_raw |
| @@ -321,19 +321,19 @@ void helper_swl(target_ulong t0, target_ulong t1, int mem_idx) | @@ -321,19 +321,19 @@ void helper_swl(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 321 | case 2: stfun = stb_user; break; | 321 | case 2: stfun = stb_user; break; |
| 322 | } | 322 | } |
| 323 | #endif | 323 | #endif |
| 324 | - stfun(t0, (uint8_t)(t1 >> 24)); | 324 | + stfun(arg2, (uint8_t)(arg1 >> 24)); |
| 325 | 325 | ||
| 326 | - if (GET_LMASK(t0) <= 2) | ||
| 327 | - stfun(GET_OFFSET(t0, 1), (uint8_t)(t1 >> 16)); | 326 | + if (GET_LMASK(arg2) <= 2) |
| 327 | + stfun(GET_OFFSET(arg2, 1), (uint8_t)(arg1 >> 16)); | ||
| 328 | 328 | ||
| 329 | - if (GET_LMASK(t0) <= 1) | ||
| 330 | - stfun(GET_OFFSET(t0, 2), (uint8_t)(t1 >> 8)); | 329 | + if (GET_LMASK(arg2) <= 1) |
| 330 | + stfun(GET_OFFSET(arg2, 2), (uint8_t)(arg1 >> 8)); | ||
| 331 | 331 | ||
| 332 | - if (GET_LMASK(t0) == 0) | ||
| 333 | - stfun(GET_OFFSET(t0, 3), (uint8_t)t1); | 332 | + if (GET_LMASK(arg2) == 0) |
| 333 | + stfun(GET_OFFSET(arg2, 3), (uint8_t)arg1); | ||
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | -void helper_swr(target_ulong t0, target_ulong t1, int mem_idx) | 336 | +void helper_swr(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 337 | { | 337 | { |
| 338 | #ifdef CONFIG_USER_ONLY | 338 | #ifdef CONFIG_USER_ONLY |
| 339 | #define stfun stb_raw | 339 | #define stfun stb_raw |
| @@ -348,16 +348,16 @@ void helper_swr(target_ulong t0, target_ulong t1, int mem_idx) | @@ -348,16 +348,16 @@ void helper_swr(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 348 | case 2: stfun = stb_user; break; | 348 | case 2: stfun = stb_user; break; |
| 349 | } | 349 | } |
| 350 | #endif | 350 | #endif |
| 351 | - stfun(t0, (uint8_t)t1); | 351 | + stfun(arg2, (uint8_t)arg1); |
| 352 | 352 | ||
| 353 | - if (GET_LMASK(t0) >= 1) | ||
| 354 | - stfun(GET_OFFSET(t0, -1), (uint8_t)(t1 >> 8)); | 353 | + if (GET_LMASK(arg2) >= 1) |
| 354 | + stfun(GET_OFFSET(arg2, -1), (uint8_t)(arg1 >> 8)); | ||
| 355 | 355 | ||
| 356 | - if (GET_LMASK(t0) >= 2) | ||
| 357 | - stfun(GET_OFFSET(t0, -2), (uint8_t)(t1 >> 16)); | 356 | + if (GET_LMASK(arg2) >= 2) |
| 357 | + stfun(GET_OFFSET(arg2, -2), (uint8_t)(arg1 >> 16)); | ||
| 358 | 358 | ||
| 359 | - if (GET_LMASK(t0) == 3) | ||
| 360 | - stfun(GET_OFFSET(t0, -3), (uint8_t)(t1 >> 24)); | 359 | + if (GET_LMASK(arg2) == 3) |
| 360 | + stfun(GET_OFFSET(arg2, -3), (uint8_t)(arg1 >> 24)); | ||
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | #if defined(TARGET_MIPS64) | 363 | #if defined(TARGET_MIPS64) |
| @@ -370,7 +370,7 @@ void helper_swr(target_ulong t0, target_ulong t1, int mem_idx) | @@ -370,7 +370,7 @@ void helper_swr(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 370 | #define GET_LMASK64(v) (((v) & 7) ^ 7) | 370 | #define GET_LMASK64(v) (((v) & 7) ^ 7) |
| 371 | #endif | 371 | #endif |
| 372 | 372 | ||
| 373 | -target_ulong helper_ldl(target_ulong t0, target_ulong t1, int mem_idx) | 373 | +target_ulong helper_ldl(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 374 | { | 374 | { |
| 375 | uint64_t tmp; | 375 | uint64_t tmp; |
| 376 | 376 | ||
| @@ -387,48 +387,48 @@ target_ulong helper_ldl(target_ulong t0, target_ulong t1, int mem_idx) | @@ -387,48 +387,48 @@ target_ulong helper_ldl(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 387 | case 2: ldfun = ldub_user; break; | 387 | case 2: ldfun = ldub_user; break; |
| 388 | } | 388 | } |
| 389 | #endif | 389 | #endif |
| 390 | - tmp = ldfun(t0); | ||
| 391 | - t1 = (t1 & 0x00FFFFFFFFFFFFFFULL) | (tmp << 56); | 390 | + tmp = ldfun(arg2); |
| 391 | + arg1 = (arg1 & 0x00FFFFFFFFFFFFFFULL) | (tmp << 56); | ||
| 392 | 392 | ||
| 393 | - if (GET_LMASK64(t0) <= 6) { | ||
| 394 | - tmp = ldfun(GET_OFFSET(t0, 1)); | ||
| 395 | - t1 = (t1 & 0xFF00FFFFFFFFFFFFULL) | (tmp << 48); | 393 | + if (GET_LMASK64(arg2) <= 6) { |
| 394 | + tmp = ldfun(GET_OFFSET(arg2, 1)); | ||
| 395 | + arg1 = (arg1 & 0xFF00FFFFFFFFFFFFULL) | (tmp << 48); | ||
| 396 | } | 396 | } |
| 397 | 397 | ||
| 398 | - if (GET_LMASK64(t0) <= 5) { | ||
| 399 | - tmp = ldfun(GET_OFFSET(t0, 2)); | ||
| 400 | - t1 = (t1 & 0xFFFF00FFFFFFFFFFULL) | (tmp << 40); | 398 | + if (GET_LMASK64(arg2) <= 5) { |
| 399 | + tmp = ldfun(GET_OFFSET(arg2, 2)); | ||
| 400 | + arg1 = (arg1 & 0xFFFF00FFFFFFFFFFULL) | (tmp << 40); | ||
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | - if (GET_LMASK64(t0) <= 4) { | ||
| 404 | - tmp = ldfun(GET_OFFSET(t0, 3)); | ||
| 405 | - t1 = (t1 & 0xFFFFFF00FFFFFFFFULL) | (tmp << 32); | 403 | + if (GET_LMASK64(arg2) <= 4) { |
| 404 | + tmp = ldfun(GET_OFFSET(arg2, 3)); | ||
| 405 | + arg1 = (arg1 & 0xFFFFFF00FFFFFFFFULL) | (tmp << 32); | ||
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | - if (GET_LMASK64(t0) <= 3) { | ||
| 409 | - tmp = ldfun(GET_OFFSET(t0, 4)); | ||
| 410 | - t1 = (t1 & 0xFFFFFFFF00FFFFFFULL) | (tmp << 24); | 408 | + if (GET_LMASK64(arg2) <= 3) { |
| 409 | + tmp = ldfun(GET_OFFSET(arg2, 4)); | ||
| 410 | + arg1 = (arg1 & 0xFFFFFFFF00FFFFFFULL) | (tmp << 24); | ||
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | - if (GET_LMASK64(t0) <= 2) { | ||
| 414 | - tmp = ldfun(GET_OFFSET(t0, 5)); | ||
| 415 | - t1 = (t1 & 0xFFFFFFFFFF00FFFFULL) | (tmp << 16); | 413 | + if (GET_LMASK64(arg2) <= 2) { |
| 414 | + tmp = ldfun(GET_OFFSET(arg2, 5)); | ||
| 415 | + arg1 = (arg1 & 0xFFFFFFFFFF00FFFFULL) | (tmp << 16); | ||
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | - if (GET_LMASK64(t0) <= 1) { | ||
| 419 | - tmp = ldfun(GET_OFFSET(t0, 6)); | ||
| 420 | - t1 = (t1 & 0xFFFFFFFFFFFF00FFULL) | (tmp << 8); | 418 | + if (GET_LMASK64(arg2) <= 1) { |
| 419 | + tmp = ldfun(GET_OFFSET(arg2, 6)); | ||
| 420 | + arg1 = (arg1 & 0xFFFFFFFFFFFF00FFULL) | (tmp << 8); | ||
| 421 | } | 421 | } |
| 422 | 422 | ||
| 423 | - if (GET_LMASK64(t0) == 0) { | ||
| 424 | - tmp = ldfun(GET_OFFSET(t0, 7)); | ||
| 425 | - t1 = (t1 & 0xFFFFFFFFFFFFFF00ULL) | tmp; | 423 | + if (GET_LMASK64(arg2) == 0) { |
| 424 | + tmp = ldfun(GET_OFFSET(arg2, 7)); | ||
| 425 | + arg1 = (arg1 & 0xFFFFFFFFFFFFFF00ULL) | tmp; | ||
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | - return t1; | 428 | + return arg1; |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | -target_ulong helper_ldr(target_ulong t0, target_ulong t1, int mem_idx) | 431 | +target_ulong helper_ldr(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 432 | { | 432 | { |
| 433 | uint64_t tmp; | 433 | uint64_t tmp; |
| 434 | 434 | ||
| @@ -445,48 +445,48 @@ target_ulong helper_ldr(target_ulong t0, target_ulong t1, int mem_idx) | @@ -445,48 +445,48 @@ target_ulong helper_ldr(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 445 | case 2: ldfun = ldub_user; break; | 445 | case 2: ldfun = ldub_user; break; |
| 446 | } | 446 | } |
| 447 | #endif | 447 | #endif |
| 448 | - tmp = ldfun(t0); | ||
| 449 | - t1 = (t1 & 0xFFFFFFFFFFFFFF00ULL) | tmp; | 448 | + tmp = ldfun(arg2); |
| 449 | + arg1 = (arg1 & 0xFFFFFFFFFFFFFF00ULL) | tmp; | ||
| 450 | 450 | ||
| 451 | - if (GET_LMASK64(t0) >= 1) { | ||
| 452 | - tmp = ldfun(GET_OFFSET(t0, -1)); | ||
| 453 | - t1 = (t1 & 0xFFFFFFFFFFFF00FFULL) | (tmp << 8); | 451 | + if (GET_LMASK64(arg2) >= 1) { |
| 452 | + tmp = ldfun(GET_OFFSET(arg2, -1)); | ||
| 453 | + arg1 = (arg1 & 0xFFFFFFFFFFFF00FFULL) | (tmp << 8); | ||
| 454 | } | 454 | } |
| 455 | 455 | ||
| 456 | - if (GET_LMASK64(t0) >= 2) { | ||
| 457 | - tmp = ldfun(GET_OFFSET(t0, -2)); | ||
| 458 | - t1 = (t1 & 0xFFFFFFFFFF00FFFFULL) | (tmp << 16); | 456 | + if (GET_LMASK64(arg2) >= 2) { |
| 457 | + tmp = ldfun(GET_OFFSET(arg2, -2)); | ||
| 458 | + arg1 = (arg1 & 0xFFFFFFFFFF00FFFFULL) | (tmp << 16); | ||
| 459 | } | 459 | } |
| 460 | 460 | ||
| 461 | - if (GET_LMASK64(t0) >= 3) { | ||
| 462 | - tmp = ldfun(GET_OFFSET(t0, -3)); | ||
| 463 | - t1 = (t1 & 0xFFFFFFFF00FFFFFFULL) | (tmp << 24); | 461 | + if (GET_LMASK64(arg2) >= 3) { |
| 462 | + tmp = ldfun(GET_OFFSET(arg2, -3)); | ||
| 463 | + arg1 = (arg1 & 0xFFFFFFFF00FFFFFFULL) | (tmp << 24); | ||
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | - if (GET_LMASK64(t0) >= 4) { | ||
| 467 | - tmp = ldfun(GET_OFFSET(t0, -4)); | ||
| 468 | - t1 = (t1 & 0xFFFFFF00FFFFFFFFULL) | (tmp << 32); | 466 | + if (GET_LMASK64(arg2) >= 4) { |
| 467 | + tmp = ldfun(GET_OFFSET(arg2, -4)); | ||
| 468 | + arg1 = (arg1 & 0xFFFFFF00FFFFFFFFULL) | (tmp << 32); | ||
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | - if (GET_LMASK64(t0) >= 5) { | ||
| 472 | - tmp = ldfun(GET_OFFSET(t0, -5)); | ||
| 473 | - t1 = (t1 & 0xFFFF00FFFFFFFFFFULL) | (tmp << 40); | 471 | + if (GET_LMASK64(arg2) >= 5) { |
| 472 | + tmp = ldfun(GET_OFFSET(arg2, -5)); | ||
| 473 | + arg1 = (arg1 & 0xFFFF00FFFFFFFFFFULL) | (tmp << 40); | ||
| 474 | } | 474 | } |
| 475 | 475 | ||
| 476 | - if (GET_LMASK64(t0) >= 6) { | ||
| 477 | - tmp = ldfun(GET_OFFSET(t0, -6)); | ||
| 478 | - t1 = (t1 & 0xFF00FFFFFFFFFFFFULL) | (tmp << 48); | 476 | + if (GET_LMASK64(arg2) >= 6) { |
| 477 | + tmp = ldfun(GET_OFFSET(arg2, -6)); | ||
| 478 | + arg1 = (arg1 & 0xFF00FFFFFFFFFFFFULL) | (tmp << 48); | ||
| 479 | } | 479 | } |
| 480 | 480 | ||
| 481 | - if (GET_LMASK64(t0) == 7) { | ||
| 482 | - tmp = ldfun(GET_OFFSET(t0, -7)); | ||
| 483 | - t1 = (t1 & 0x00FFFFFFFFFFFFFFULL) | (tmp << 56); | 481 | + if (GET_LMASK64(arg2) == 7) { |
| 482 | + tmp = ldfun(GET_OFFSET(arg2, -7)); | ||
| 483 | + arg1 = (arg1 & 0x00FFFFFFFFFFFFFFULL) | (tmp << 56); | ||
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | - return t1; | 486 | + return arg1; |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | -void helper_sdl(target_ulong t0, target_ulong t1, int mem_idx) | 489 | +void helper_sdl(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 490 | { | 490 | { |
| 491 | #ifdef CONFIG_USER_ONLY | 491 | #ifdef CONFIG_USER_ONLY |
| 492 | #define stfun stb_raw | 492 | #define stfun stb_raw |
| @@ -501,31 +501,31 @@ void helper_sdl(target_ulong t0, target_ulong t1, int mem_idx) | @@ -501,31 +501,31 @@ void helper_sdl(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 501 | case 2: stfun = stb_user; break; | 501 | case 2: stfun = stb_user; break; |
| 502 | } | 502 | } |
| 503 | #endif | 503 | #endif |
| 504 | - stfun(t0, (uint8_t)(t1 >> 56)); | 504 | + stfun(arg2, (uint8_t)(arg1 >> 56)); |
| 505 | 505 | ||
| 506 | - if (GET_LMASK64(t0) <= 6) | ||
| 507 | - stfun(GET_OFFSET(t0, 1), (uint8_t)(t1 >> 48)); | 506 | + if (GET_LMASK64(arg2) <= 6) |
| 507 | + stfun(GET_OFFSET(arg2, 1), (uint8_t)(arg1 >> 48)); | ||
| 508 | 508 | ||
| 509 | - if (GET_LMASK64(t0) <= 5) | ||
| 510 | - stfun(GET_OFFSET(t0, 2), (uint8_t)(t1 >> 40)); | 509 | + if (GET_LMASK64(arg2) <= 5) |
| 510 | + stfun(GET_OFFSET(arg2, 2), (uint8_t)(arg1 >> 40)); | ||
| 511 | 511 | ||
| 512 | - if (GET_LMASK64(t0) <= 4) | ||
| 513 | - stfun(GET_OFFSET(t0, 3), (uint8_t)(t1 >> 32)); | 512 | + if (GET_LMASK64(arg2) <= 4) |
| 513 | + stfun(GET_OFFSET(arg2, 3), (uint8_t)(arg1 >> 32)); | ||
| 514 | 514 | ||
| 515 | - if (GET_LMASK64(t0) <= 3) | ||
| 516 | - stfun(GET_OFFSET(t0, 4), (uint8_t)(t1 >> 24)); | 515 | + if (GET_LMASK64(arg2) <= 3) |
| 516 | + stfun(GET_OFFSET(arg2, 4), (uint8_t)(arg1 >> 24)); | ||
| 517 | 517 | ||
| 518 | - if (GET_LMASK64(t0) <= 2) | ||
| 519 | - stfun(GET_OFFSET(t0, 5), (uint8_t)(t1 >> 16)); | 518 | + if (GET_LMASK64(arg2) <= 2) |
| 519 | + stfun(GET_OFFSET(arg2, 5), (uint8_t)(arg1 >> 16)); | ||
| 520 | 520 | ||
| 521 | - if (GET_LMASK64(t0) <= 1) | ||
| 522 | - stfun(GET_OFFSET(t0, 6), (uint8_t)(t1 >> 8)); | 521 | + if (GET_LMASK64(arg2) <= 1) |
| 522 | + stfun(GET_OFFSET(arg2, 6), (uint8_t)(arg1 >> 8)); | ||
| 523 | 523 | ||
| 524 | - if (GET_LMASK64(t0) <= 0) | ||
| 525 | - stfun(GET_OFFSET(t0, 7), (uint8_t)t1); | 524 | + if (GET_LMASK64(arg2) <= 0) |
| 525 | + stfun(GET_OFFSET(arg2, 7), (uint8_t)arg1); | ||
| 526 | } | 526 | } |
| 527 | 527 | ||
| 528 | -void helper_sdr(target_ulong t0, target_ulong t1, int mem_idx) | 528 | +void helper_sdr(target_ulong arg1, target_ulong arg2, int mem_idx) |
| 529 | { | 529 | { |
| 530 | #ifdef CONFIG_USER_ONLY | 530 | #ifdef CONFIG_USER_ONLY |
| 531 | #define stfun stb_raw | 531 | #define stfun stb_raw |
| @@ -540,28 +540,28 @@ void helper_sdr(target_ulong t0, target_ulong t1, int mem_idx) | @@ -540,28 +540,28 @@ void helper_sdr(target_ulong t0, target_ulong t1, int mem_idx) | ||
| 540 | case 2: stfun = stb_user; break; | 540 | case 2: stfun = stb_user; break; |
| 541 | } | 541 | } |
| 542 | #endif | 542 | #endif |
| 543 | - stfun(t0, (uint8_t)t1); | 543 | + stfun(arg2, (uint8_t)arg1); |
| 544 | 544 | ||
| 545 | - if (GET_LMASK64(t0) >= 1) | ||
| 546 | - stfun(GET_OFFSET(t0, -1), (uint8_t)(t1 >> 8)); | 545 | + if (GET_LMASK64(arg2) >= 1) |
| 546 | + stfun(GET_OFFSET(arg2, -1), (uint8_t)(arg1 >> 8)); | ||
| 547 | 547 | ||
| 548 | - if (GET_LMASK64(t0) >= 2) | ||
| 549 | - stfun(GET_OFFSET(t0, -2), (uint8_t)(t1 >> 16)); | 548 | + if (GET_LMASK64(arg2) >= 2) |
| 549 | + stfun(GET_OFFSET(arg2, -2), (uint8_t)(arg1 >> 16)); | ||
| 550 | 550 | ||
| 551 | - if (GET_LMASK64(t0) >= 3) | ||
| 552 | - stfun(GET_OFFSET(t0, -3), (uint8_t)(t1 >> 24)); | 551 | + if (GET_LMASK64(arg2) >= 3) |
| 552 | + stfun(GET_OFFSET(arg2, -3), (uint8_t)(arg1 >> 24)); | ||
| 553 | 553 | ||
| 554 | - if (GET_LMASK64(t0) >= 4) | ||
| 555 | - stfun(GET_OFFSET(t0, -4), (uint8_t)(t1 >> 32)); | 554 | + if (GET_LMASK64(arg2) >= 4) |
| 555 | + stfun(GET_OFFSET(arg2, -4), (uint8_t)(arg1 >> 32)); | ||
| 556 | 556 | ||
| 557 | - if (GET_LMASK64(t0) >= 5) | ||
| 558 | - stfun(GET_OFFSET(t0, -5), (uint8_t)(t1 >> 40)); | 557 | + if (GET_LMASK64(arg2) >= 5) |
| 558 | + stfun(GET_OFFSET(arg2, -5), (uint8_t)(arg1 >> 40)); | ||
| 559 | 559 | ||
| 560 | - if (GET_LMASK64(t0) >= 6) | ||
| 561 | - stfun(GET_OFFSET(t0, -6), (uint8_t)(t1 >> 48)); | 560 | + if (GET_LMASK64(arg2) >= 6) |
| 561 | + stfun(GET_OFFSET(arg2, -6), (uint8_t)(arg1 >> 48)); | ||
| 562 | 562 | ||
| 563 | - if (GET_LMASK64(t0) == 7) | ||
| 564 | - stfun(GET_OFFSET(t0, -7), (uint8_t)(t1 >> 56)); | 563 | + if (GET_LMASK64(arg2) == 7) |
| 564 | + stfun(GET_OFFSET(arg2, -7), (uint8_t)(arg1 >> 56)); | ||
| 565 | } | 565 | } |
| 566 | #endif /* TARGET_MIPS64 */ | 566 | #endif /* TARGET_MIPS64 */ |
| 567 | 567 | ||
| @@ -805,7 +805,7 @@ target_ulong helper_dmfc0_watchlo (uint32_t sel) | @@ -805,7 +805,7 @@ target_ulong helper_dmfc0_watchlo (uint32_t sel) | ||
| 805 | } | 805 | } |
| 806 | #endif /* TARGET_MIPS64 */ | 806 | #endif /* TARGET_MIPS64 */ |
| 807 | 807 | ||
| 808 | -void helper_mtc0_index (target_ulong t0) | 808 | +void helper_mtc0_index (target_ulong arg1) |
| 809 | { | 809 | { |
| 810 | int num = 1; | 810 | int num = 1; |
| 811 | unsigned int tmp = env->tlb->nb_tlb; | 811 | unsigned int tmp = env->tlb->nb_tlb; |
| @@ -814,10 +814,10 @@ void helper_mtc0_index (target_ulong t0) | @@ -814,10 +814,10 @@ void helper_mtc0_index (target_ulong t0) | ||
| 814 | tmp >>= 1; | 814 | tmp >>= 1; |
| 815 | num <<= 1; | 815 | num <<= 1; |
| 816 | } while (tmp); | 816 | } while (tmp); |
| 817 | - env->CP0_Index = (env->CP0_Index & 0x80000000) | (t0 & (num - 1)); | 817 | + env->CP0_Index = (env->CP0_Index & 0x80000000) | (arg1 & (num - 1)); |
| 818 | } | 818 | } |
| 819 | 819 | ||
| 820 | -void helper_mtc0_mvpcontrol (target_ulong t0) | 820 | +void helper_mtc0_mvpcontrol (target_ulong arg1) |
| 821 | { | 821 | { |
| 822 | uint32_t mask = 0; | 822 | uint32_t mask = 0; |
| 823 | uint32_t newval; | 823 | uint32_t newval; |
| @@ -827,21 +827,21 @@ void helper_mtc0_mvpcontrol (target_ulong t0) | @@ -827,21 +827,21 @@ void helper_mtc0_mvpcontrol (target_ulong t0) | ||
| 827 | (1 << CP0MVPCo_EVP); | 827 | (1 << CP0MVPCo_EVP); |
| 828 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) | 828 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) |
| 829 | mask |= (1 << CP0MVPCo_STLB); | 829 | mask |= (1 << CP0MVPCo_STLB); |
| 830 | - newval = (env->mvp->CP0_MVPControl & ~mask) | (t0 & mask); | 830 | + newval = (env->mvp->CP0_MVPControl & ~mask) | (arg1 & mask); |
| 831 | 831 | ||
| 832 | // TODO: Enable/disable shared TLB, enable/disable VPEs. | 832 | // TODO: Enable/disable shared TLB, enable/disable VPEs. |
| 833 | 833 | ||
| 834 | env->mvp->CP0_MVPControl = newval; | 834 | env->mvp->CP0_MVPControl = newval; |
| 835 | } | 835 | } |
| 836 | 836 | ||
| 837 | -void helper_mtc0_vpecontrol (target_ulong t0) | 837 | +void helper_mtc0_vpecontrol (target_ulong arg1) |
| 838 | { | 838 | { |
| 839 | uint32_t mask; | 839 | uint32_t mask; |
| 840 | uint32_t newval; | 840 | uint32_t newval; |
| 841 | 841 | ||
| 842 | mask = (1 << CP0VPECo_YSI) | (1 << CP0VPECo_GSI) | | 842 | mask = (1 << CP0VPECo_YSI) | (1 << CP0VPECo_GSI) | |
| 843 | (1 << CP0VPECo_TE) | (0xff << CP0VPECo_TargTC); | 843 | (1 << CP0VPECo_TE) | (0xff << CP0VPECo_TargTC); |
| 844 | - newval = (env->CP0_VPEControl & ~mask) | (t0 & mask); | 844 | + newval = (env->CP0_VPEControl & ~mask) | (arg1 & mask); |
| 845 | 845 | ||
| 846 | /* Yield scheduler intercept not implemented. */ | 846 | /* Yield scheduler intercept not implemented. */ |
| 847 | /* Gating storage scheduler intercept not implemented. */ | 847 | /* Gating storage scheduler intercept not implemented. */ |
| @@ -851,7 +851,7 @@ void helper_mtc0_vpecontrol (target_ulong t0) | @@ -851,7 +851,7 @@ void helper_mtc0_vpecontrol (target_ulong t0) | ||
| 851 | env->CP0_VPEControl = newval; | 851 | env->CP0_VPEControl = newval; |
| 852 | } | 852 | } |
| 853 | 853 | ||
| 854 | -void helper_mtc0_vpeconf0 (target_ulong t0) | 854 | +void helper_mtc0_vpeconf0 (target_ulong arg1) |
| 855 | { | 855 | { |
| 856 | uint32_t mask = 0; | 856 | uint32_t mask = 0; |
| 857 | uint32_t newval; | 857 | uint32_t newval; |
| @@ -861,14 +861,14 @@ void helper_mtc0_vpeconf0 (target_ulong t0) | @@ -861,14 +861,14 @@ void helper_mtc0_vpeconf0 (target_ulong t0) | ||
| 861 | mask |= (0xff << CP0VPEC0_XTC); | 861 | mask |= (0xff << CP0VPEC0_XTC); |
| 862 | mask |= (1 << CP0VPEC0_MVP) | (1 << CP0VPEC0_VPA); | 862 | mask |= (1 << CP0VPEC0_MVP) | (1 << CP0VPEC0_VPA); |
| 863 | } | 863 | } |
| 864 | - newval = (env->CP0_VPEConf0 & ~mask) | (t0 & mask); | 864 | + newval = (env->CP0_VPEConf0 & ~mask) | (arg1 & mask); |
| 865 | 865 | ||
| 866 | // TODO: TC exclusive handling due to ERL/EXL. | 866 | // TODO: TC exclusive handling due to ERL/EXL. |
| 867 | 867 | ||
| 868 | env->CP0_VPEConf0 = newval; | 868 | env->CP0_VPEConf0 = newval; |
| 869 | } | 869 | } |
| 870 | 870 | ||
| 871 | -void helper_mtc0_vpeconf1 (target_ulong t0) | 871 | +void helper_mtc0_vpeconf1 (target_ulong arg1) |
| 872 | { | 872 | { |
| 873 | uint32_t mask = 0; | 873 | uint32_t mask = 0; |
| 874 | uint32_t newval; | 874 | uint32_t newval; |
| @@ -876,7 +876,7 @@ void helper_mtc0_vpeconf1 (target_ulong t0) | @@ -876,7 +876,7 @@ void helper_mtc0_vpeconf1 (target_ulong t0) | ||
| 876 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) | 876 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) |
| 877 | mask |= (0xff << CP0VPEC1_NCX) | (0xff << CP0VPEC1_NCP2) | | 877 | mask |= (0xff << CP0VPEC1_NCX) | (0xff << CP0VPEC1_NCP2) | |
| 878 | (0xff << CP0VPEC1_NCP1); | 878 | (0xff << CP0VPEC1_NCP1); |
| 879 | - newval = (env->CP0_VPEConf1 & ~mask) | (t0 & mask); | 879 | + newval = (env->CP0_VPEConf1 & ~mask) | (arg1 & mask); |
| 880 | 880 | ||
| 881 | /* UDI not implemented. */ | 881 | /* UDI not implemented. */ |
| 882 | /* CP2 not implemented. */ | 882 | /* CP2 not implemented. */ |
| @@ -886,60 +886,60 @@ void helper_mtc0_vpeconf1 (target_ulong t0) | @@ -886,60 +886,60 @@ void helper_mtc0_vpeconf1 (target_ulong t0) | ||
| 886 | env->CP0_VPEConf1 = newval; | 886 | env->CP0_VPEConf1 = newval; |
| 887 | } | 887 | } |
| 888 | 888 | ||
| 889 | -void helper_mtc0_yqmask (target_ulong t0) | 889 | +void helper_mtc0_yqmask (target_ulong arg1) |
| 890 | { | 890 | { |
| 891 | /* Yield qualifier inputs not implemented. */ | 891 | /* Yield qualifier inputs not implemented. */ |
| 892 | env->CP0_YQMask = 0x00000000; | 892 | env->CP0_YQMask = 0x00000000; |
| 893 | } | 893 | } |
| 894 | 894 | ||
| 895 | -void helper_mtc0_vpeopt (target_ulong t0) | 895 | +void helper_mtc0_vpeopt (target_ulong arg1) |
| 896 | { | 896 | { |
| 897 | - env->CP0_VPEOpt = t0 & 0x0000ffff; | 897 | + env->CP0_VPEOpt = arg1 & 0x0000ffff; |
| 898 | } | 898 | } |
| 899 | 899 | ||
| 900 | -void helper_mtc0_entrylo0 (target_ulong t0) | 900 | +void helper_mtc0_entrylo0 (target_ulong arg1) |
| 901 | { | 901 | { |
| 902 | /* Large physaddr (PABITS) not implemented */ | 902 | /* Large physaddr (PABITS) not implemented */ |
| 903 | /* 1k pages not implemented */ | 903 | /* 1k pages not implemented */ |
| 904 | - env->CP0_EntryLo0 = t0 & 0x3FFFFFFF; | 904 | + env->CP0_EntryLo0 = arg1 & 0x3FFFFFFF; |
| 905 | } | 905 | } |
| 906 | 906 | ||
| 907 | -void helper_mtc0_tcstatus (target_ulong t0) | 907 | +void helper_mtc0_tcstatus (target_ulong arg1) |
| 908 | { | 908 | { |
| 909 | uint32_t mask = env->CP0_TCStatus_rw_bitmask; | 909 | uint32_t mask = env->CP0_TCStatus_rw_bitmask; |
| 910 | uint32_t newval; | 910 | uint32_t newval; |
| 911 | 911 | ||
| 912 | - newval = (env->active_tc.CP0_TCStatus & ~mask) | (t0 & mask); | 912 | + newval = (env->active_tc.CP0_TCStatus & ~mask) | (arg1 & mask); |
| 913 | 913 | ||
| 914 | // TODO: Sync with CP0_Status. | 914 | // TODO: Sync with CP0_Status. |
| 915 | 915 | ||
| 916 | env->active_tc.CP0_TCStatus = newval; | 916 | env->active_tc.CP0_TCStatus = newval; |
| 917 | } | 917 | } |
| 918 | 918 | ||
| 919 | -void helper_mttc0_tcstatus (target_ulong t0) | 919 | +void helper_mttc0_tcstatus (target_ulong arg1) |
| 920 | { | 920 | { |
| 921 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 921 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 922 | 922 | ||
| 923 | // TODO: Sync with CP0_Status. | 923 | // TODO: Sync with CP0_Status. |
| 924 | 924 | ||
| 925 | if (other_tc == env->current_tc) | 925 | if (other_tc == env->current_tc) |
| 926 | - env->active_tc.CP0_TCStatus = t0; | 926 | + env->active_tc.CP0_TCStatus = arg1; |
| 927 | else | 927 | else |
| 928 | - env->tcs[other_tc].CP0_TCStatus = t0; | 928 | + env->tcs[other_tc].CP0_TCStatus = arg1; |
| 929 | } | 929 | } |
| 930 | 930 | ||
| 931 | -void helper_mtc0_tcbind (target_ulong t0) | 931 | +void helper_mtc0_tcbind (target_ulong arg1) |
| 932 | { | 932 | { |
| 933 | uint32_t mask = (1 << CP0TCBd_TBE); | 933 | uint32_t mask = (1 << CP0TCBd_TBE); |
| 934 | uint32_t newval; | 934 | uint32_t newval; |
| 935 | 935 | ||
| 936 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) | 936 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) |
| 937 | mask |= (1 << CP0TCBd_CurVPE); | 937 | mask |= (1 << CP0TCBd_CurVPE); |
| 938 | - newval = (env->active_tc.CP0_TCBind & ~mask) | (t0 & mask); | 938 | + newval = (env->active_tc.CP0_TCBind & ~mask) | (arg1 & mask); |
| 939 | env->active_tc.CP0_TCBind = newval; | 939 | env->active_tc.CP0_TCBind = newval; |
| 940 | } | 940 | } |
| 941 | 941 | ||
| 942 | -void helper_mttc0_tcbind (target_ulong t0) | 942 | +void helper_mttc0_tcbind (target_ulong arg1) |
| 943 | { | 943 | { |
| 944 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 944 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 945 | uint32_t mask = (1 << CP0TCBd_TBE); | 945 | uint32_t mask = (1 << CP0TCBd_TBE); |
| @@ -948,122 +948,122 @@ void helper_mttc0_tcbind (target_ulong t0) | @@ -948,122 +948,122 @@ void helper_mttc0_tcbind (target_ulong t0) | ||
| 948 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) | 948 | if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) |
| 949 | mask |= (1 << CP0TCBd_CurVPE); | 949 | mask |= (1 << CP0TCBd_CurVPE); |
| 950 | if (other_tc == env->current_tc) { | 950 | if (other_tc == env->current_tc) { |
| 951 | - newval = (env->active_tc.CP0_TCBind & ~mask) | (t0 & mask); | 951 | + newval = (env->active_tc.CP0_TCBind & ~mask) | (arg1 & mask); |
| 952 | env->active_tc.CP0_TCBind = newval; | 952 | env->active_tc.CP0_TCBind = newval; |
| 953 | } else { | 953 | } else { |
| 954 | - newval = (env->tcs[other_tc].CP0_TCBind & ~mask) | (t0 & mask); | 954 | + newval = (env->tcs[other_tc].CP0_TCBind & ~mask) | (arg1 & mask); |
| 955 | env->tcs[other_tc].CP0_TCBind = newval; | 955 | env->tcs[other_tc].CP0_TCBind = newval; |
| 956 | } | 956 | } |
| 957 | } | 957 | } |
| 958 | 958 | ||
| 959 | -void helper_mtc0_tcrestart (target_ulong t0) | 959 | +void helper_mtc0_tcrestart (target_ulong arg1) |
| 960 | { | 960 | { |
| 961 | - env->active_tc.PC = t0; | 961 | + env->active_tc.PC = arg1; |
| 962 | env->active_tc.CP0_TCStatus &= ~(1 << CP0TCSt_TDS); | 962 | env->active_tc.CP0_TCStatus &= ~(1 << CP0TCSt_TDS); |
| 963 | env->CP0_LLAddr = 0ULL; | 963 | env->CP0_LLAddr = 0ULL; |
| 964 | /* MIPS16 not implemented. */ | 964 | /* MIPS16 not implemented. */ |
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | -void helper_mttc0_tcrestart (target_ulong t0) | 967 | +void helper_mttc0_tcrestart (target_ulong arg1) |
| 968 | { | 968 | { |
| 969 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 969 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 970 | 970 | ||
| 971 | if (other_tc == env->current_tc) { | 971 | if (other_tc == env->current_tc) { |
| 972 | - env->active_tc.PC = t0; | 972 | + env->active_tc.PC = arg1; |
| 973 | env->active_tc.CP0_TCStatus &= ~(1 << CP0TCSt_TDS); | 973 | env->active_tc.CP0_TCStatus &= ~(1 << CP0TCSt_TDS); |
| 974 | env->CP0_LLAddr = 0ULL; | 974 | env->CP0_LLAddr = 0ULL; |
| 975 | /* MIPS16 not implemented. */ | 975 | /* MIPS16 not implemented. */ |
| 976 | } else { | 976 | } else { |
| 977 | - env->tcs[other_tc].PC = t0; | 977 | + env->tcs[other_tc].PC = arg1; |
| 978 | env->tcs[other_tc].CP0_TCStatus &= ~(1 << CP0TCSt_TDS); | 978 | env->tcs[other_tc].CP0_TCStatus &= ~(1 << CP0TCSt_TDS); |
| 979 | env->CP0_LLAddr = 0ULL; | 979 | env->CP0_LLAddr = 0ULL; |
| 980 | /* MIPS16 not implemented. */ | 980 | /* MIPS16 not implemented. */ |
| 981 | } | 981 | } |
| 982 | } | 982 | } |
| 983 | 983 | ||
| 984 | -void helper_mtc0_tchalt (target_ulong t0) | 984 | +void helper_mtc0_tchalt (target_ulong arg1) |
| 985 | { | 985 | { |
| 986 | - env->active_tc.CP0_TCHalt = t0 & 0x1; | 986 | + env->active_tc.CP0_TCHalt = arg1 & 0x1; |
| 987 | 987 | ||
| 988 | // TODO: Halt TC / Restart (if allocated+active) TC. | 988 | // TODO: Halt TC / Restart (if allocated+active) TC. |
| 989 | } | 989 | } |
| 990 | 990 | ||
| 991 | -void helper_mttc0_tchalt (target_ulong t0) | 991 | +void helper_mttc0_tchalt (target_ulong arg1) |
| 992 | { | 992 | { |
| 993 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 993 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 994 | 994 | ||
| 995 | // TODO: Halt TC / Restart (if allocated+active) TC. | 995 | // TODO: Halt TC / Restart (if allocated+active) TC. |
| 996 | 996 | ||
| 997 | if (other_tc == env->current_tc) | 997 | if (other_tc == env->current_tc) |
| 998 | - env->active_tc.CP0_TCHalt = t0; | 998 | + env->active_tc.CP0_TCHalt = arg1; |
| 999 | else | 999 | else |
| 1000 | - env->tcs[other_tc].CP0_TCHalt = t0; | 1000 | + env->tcs[other_tc].CP0_TCHalt = arg1; |
| 1001 | } | 1001 | } |
| 1002 | 1002 | ||
| 1003 | -void helper_mtc0_tccontext (target_ulong t0) | 1003 | +void helper_mtc0_tccontext (target_ulong arg1) |
| 1004 | { | 1004 | { |
| 1005 | - env->active_tc.CP0_TCContext = t0; | 1005 | + env->active_tc.CP0_TCContext = arg1; |
| 1006 | } | 1006 | } |
| 1007 | 1007 | ||
| 1008 | -void helper_mttc0_tccontext (target_ulong t0) | 1008 | +void helper_mttc0_tccontext (target_ulong arg1) |
| 1009 | { | 1009 | { |
| 1010 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1010 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1011 | 1011 | ||
| 1012 | if (other_tc == env->current_tc) | 1012 | if (other_tc == env->current_tc) |
| 1013 | - env->active_tc.CP0_TCContext = t0; | 1013 | + env->active_tc.CP0_TCContext = arg1; |
| 1014 | else | 1014 | else |
| 1015 | - env->tcs[other_tc].CP0_TCContext = t0; | 1015 | + env->tcs[other_tc].CP0_TCContext = arg1; |
| 1016 | } | 1016 | } |
| 1017 | 1017 | ||
| 1018 | -void helper_mtc0_tcschedule (target_ulong t0) | 1018 | +void helper_mtc0_tcschedule (target_ulong arg1) |
| 1019 | { | 1019 | { |
| 1020 | - env->active_tc.CP0_TCSchedule = t0; | 1020 | + env->active_tc.CP0_TCSchedule = arg1; |
| 1021 | } | 1021 | } |
| 1022 | 1022 | ||
| 1023 | -void helper_mttc0_tcschedule (target_ulong t0) | 1023 | +void helper_mttc0_tcschedule (target_ulong arg1) |
| 1024 | { | 1024 | { |
| 1025 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1025 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1026 | 1026 | ||
| 1027 | if (other_tc == env->current_tc) | 1027 | if (other_tc == env->current_tc) |
| 1028 | - env->active_tc.CP0_TCSchedule = t0; | 1028 | + env->active_tc.CP0_TCSchedule = arg1; |
| 1029 | else | 1029 | else |
| 1030 | - env->tcs[other_tc].CP0_TCSchedule = t0; | 1030 | + env->tcs[other_tc].CP0_TCSchedule = arg1; |
| 1031 | } | 1031 | } |
| 1032 | 1032 | ||
| 1033 | -void helper_mtc0_tcschefback (target_ulong t0) | 1033 | +void helper_mtc0_tcschefback (target_ulong arg1) |
| 1034 | { | 1034 | { |
| 1035 | - env->active_tc.CP0_TCScheFBack = t0; | 1035 | + env->active_tc.CP0_TCScheFBack = arg1; |
| 1036 | } | 1036 | } |
| 1037 | 1037 | ||
| 1038 | -void helper_mttc0_tcschefback (target_ulong t0) | 1038 | +void helper_mttc0_tcschefback (target_ulong arg1) |
| 1039 | { | 1039 | { |
| 1040 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1040 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1041 | 1041 | ||
| 1042 | if (other_tc == env->current_tc) | 1042 | if (other_tc == env->current_tc) |
| 1043 | - env->active_tc.CP0_TCScheFBack = t0; | 1043 | + env->active_tc.CP0_TCScheFBack = arg1; |
| 1044 | else | 1044 | else |
| 1045 | - env->tcs[other_tc].CP0_TCScheFBack = t0; | 1045 | + env->tcs[other_tc].CP0_TCScheFBack = arg1; |
| 1046 | } | 1046 | } |
| 1047 | 1047 | ||
| 1048 | -void helper_mtc0_entrylo1 (target_ulong t0) | 1048 | +void helper_mtc0_entrylo1 (target_ulong arg1) |
| 1049 | { | 1049 | { |
| 1050 | /* Large physaddr (PABITS) not implemented */ | 1050 | /* Large physaddr (PABITS) not implemented */ |
| 1051 | /* 1k pages not implemented */ | 1051 | /* 1k pages not implemented */ |
| 1052 | - env->CP0_EntryLo1 = t0 & 0x3FFFFFFF; | 1052 | + env->CP0_EntryLo1 = arg1 & 0x3FFFFFFF; |
| 1053 | } | 1053 | } |
| 1054 | 1054 | ||
| 1055 | -void helper_mtc0_context (target_ulong t0) | 1055 | +void helper_mtc0_context (target_ulong arg1) |
| 1056 | { | 1056 | { |
| 1057 | - env->CP0_Context = (env->CP0_Context & 0x007FFFFF) | (t0 & ~0x007FFFFF); | 1057 | + env->CP0_Context = (env->CP0_Context & 0x007FFFFF) | (arg1 & ~0x007FFFFF); |
| 1058 | } | 1058 | } |
| 1059 | 1059 | ||
| 1060 | -void helper_mtc0_pagemask (target_ulong t0) | 1060 | +void helper_mtc0_pagemask (target_ulong arg1) |
| 1061 | { | 1061 | { |
| 1062 | /* 1k pages not implemented */ | 1062 | /* 1k pages not implemented */ |
| 1063 | - env->CP0_PageMask = t0 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1)); | 1063 | + env->CP0_PageMask = arg1 & (0x1FFFFFFF & (TARGET_PAGE_MASK << 1)); |
| 1064 | } | 1064 | } |
| 1065 | 1065 | ||
| 1066 | -void helper_mtc0_pagegrain (target_ulong t0) | 1066 | +void helper_mtc0_pagegrain (target_ulong arg1) |
| 1067 | { | 1067 | { |
| 1068 | /* SmartMIPS not implemented */ | 1068 | /* SmartMIPS not implemented */ |
| 1069 | /* Large physaddr (PABITS) not implemented */ | 1069 | /* Large physaddr (PABITS) not implemented */ |
| @@ -1071,52 +1071,52 @@ void helper_mtc0_pagegrain (target_ulong t0) | @@ -1071,52 +1071,52 @@ void helper_mtc0_pagegrain (target_ulong t0) | ||
| 1071 | env->CP0_PageGrain = 0; | 1071 | env->CP0_PageGrain = 0; |
| 1072 | } | 1072 | } |
| 1073 | 1073 | ||
| 1074 | -void helper_mtc0_wired (target_ulong t0) | 1074 | +void helper_mtc0_wired (target_ulong arg1) |
| 1075 | { | 1075 | { |
| 1076 | - env->CP0_Wired = t0 % env->tlb->nb_tlb; | 1076 | + env->CP0_Wired = arg1 % env->tlb->nb_tlb; |
| 1077 | } | 1077 | } |
| 1078 | 1078 | ||
| 1079 | -void helper_mtc0_srsconf0 (target_ulong t0) | 1079 | +void helper_mtc0_srsconf0 (target_ulong arg1) |
| 1080 | { | 1080 | { |
| 1081 | - env->CP0_SRSConf0 |= t0 & env->CP0_SRSConf0_rw_bitmask; | 1081 | + env->CP0_SRSConf0 |= arg1 & env->CP0_SRSConf0_rw_bitmask; |
| 1082 | } | 1082 | } |
| 1083 | 1083 | ||
| 1084 | -void helper_mtc0_srsconf1 (target_ulong t0) | 1084 | +void helper_mtc0_srsconf1 (target_ulong arg1) |
| 1085 | { | 1085 | { |
| 1086 | - env->CP0_SRSConf1 |= t0 & env->CP0_SRSConf1_rw_bitmask; | 1086 | + env->CP0_SRSConf1 |= arg1 & env->CP0_SRSConf1_rw_bitmask; |
| 1087 | } | 1087 | } |
| 1088 | 1088 | ||
| 1089 | -void helper_mtc0_srsconf2 (target_ulong t0) | 1089 | +void helper_mtc0_srsconf2 (target_ulong arg1) |
| 1090 | { | 1090 | { |
| 1091 | - env->CP0_SRSConf2 |= t0 & env->CP0_SRSConf2_rw_bitmask; | 1091 | + env->CP0_SRSConf2 |= arg1 & env->CP0_SRSConf2_rw_bitmask; |
| 1092 | } | 1092 | } |
| 1093 | 1093 | ||
| 1094 | -void helper_mtc0_srsconf3 (target_ulong t0) | 1094 | +void helper_mtc0_srsconf3 (target_ulong arg1) |
| 1095 | { | 1095 | { |
| 1096 | - env->CP0_SRSConf3 |= t0 & env->CP0_SRSConf3_rw_bitmask; | 1096 | + env->CP0_SRSConf3 |= arg1 & env->CP0_SRSConf3_rw_bitmask; |
| 1097 | } | 1097 | } |
| 1098 | 1098 | ||
| 1099 | -void helper_mtc0_srsconf4 (target_ulong t0) | 1099 | +void helper_mtc0_srsconf4 (target_ulong arg1) |
| 1100 | { | 1100 | { |
| 1101 | - env->CP0_SRSConf4 |= t0 & env->CP0_SRSConf4_rw_bitmask; | 1101 | + env->CP0_SRSConf4 |= arg1 & env->CP0_SRSConf4_rw_bitmask; |
| 1102 | } | 1102 | } |
| 1103 | 1103 | ||
| 1104 | -void helper_mtc0_hwrena (target_ulong t0) | 1104 | +void helper_mtc0_hwrena (target_ulong arg1) |
| 1105 | { | 1105 | { |
| 1106 | - env->CP0_HWREna = t0 & 0x0000000F; | 1106 | + env->CP0_HWREna = arg1 & 0x0000000F; |
| 1107 | } | 1107 | } |
| 1108 | 1108 | ||
| 1109 | -void helper_mtc0_count (target_ulong t0) | 1109 | +void helper_mtc0_count (target_ulong arg1) |
| 1110 | { | 1110 | { |
| 1111 | - cpu_mips_store_count(env, t0); | 1111 | + cpu_mips_store_count(env, arg1); |
| 1112 | } | 1112 | } |
| 1113 | 1113 | ||
| 1114 | -void helper_mtc0_entryhi (target_ulong t0) | 1114 | +void helper_mtc0_entryhi (target_ulong arg1) |
| 1115 | { | 1115 | { |
| 1116 | target_ulong old, val; | 1116 | target_ulong old, val; |
| 1117 | 1117 | ||
| 1118 | /* 1k pages not implemented */ | 1118 | /* 1k pages not implemented */ |
| 1119 | - val = t0 & ((TARGET_PAGE_MASK << 1) | 0xFF); | 1119 | + val = arg1 & ((TARGET_PAGE_MASK << 1) | 0xFF); |
| 1120 | #if defined(TARGET_MIPS64) | 1120 | #if defined(TARGET_MIPS64) |
| 1121 | val &= env->SEGMask; | 1121 | val &= env->SEGMask; |
| 1122 | #endif | 1122 | #endif |
| @@ -1131,32 +1131,32 @@ void helper_mtc0_entryhi (target_ulong t0) | @@ -1131,32 +1131,32 @@ void helper_mtc0_entryhi (target_ulong t0) | ||
| 1131 | cpu_mips_tlb_flush(env, 1); | 1131 | cpu_mips_tlb_flush(env, 1); |
| 1132 | } | 1132 | } |
| 1133 | 1133 | ||
| 1134 | -void helper_mttc0_entryhi(target_ulong t0) | 1134 | +void helper_mttc0_entryhi(target_ulong arg1) |
| 1135 | { | 1135 | { |
| 1136 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1136 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1137 | int32_t tcstatus; | 1137 | int32_t tcstatus; |
| 1138 | 1138 | ||
| 1139 | - env->CP0_EntryHi = (env->CP0_EntryHi & 0xff) | (t0 & ~0xff); | 1139 | + env->CP0_EntryHi = (env->CP0_EntryHi & 0xff) | (arg1 & ~0xff); |
| 1140 | if (other_tc == env->current_tc) { | 1140 | if (other_tc == env->current_tc) { |
| 1141 | - tcstatus = (env->active_tc.CP0_TCStatus & ~0xff) | (t0 & 0xff); | 1141 | + tcstatus = (env->active_tc.CP0_TCStatus & ~0xff) | (arg1 & 0xff); |
| 1142 | env->active_tc.CP0_TCStatus = tcstatus; | 1142 | env->active_tc.CP0_TCStatus = tcstatus; |
| 1143 | } else { | 1143 | } else { |
| 1144 | - tcstatus = (env->tcs[other_tc].CP0_TCStatus & ~0xff) | (t0 & 0xff); | 1144 | + tcstatus = (env->tcs[other_tc].CP0_TCStatus & ~0xff) | (arg1 & 0xff); |
| 1145 | env->tcs[other_tc].CP0_TCStatus = tcstatus; | 1145 | env->tcs[other_tc].CP0_TCStatus = tcstatus; |
| 1146 | } | 1146 | } |
| 1147 | } | 1147 | } |
| 1148 | 1148 | ||
| 1149 | -void helper_mtc0_compare (target_ulong t0) | 1149 | +void helper_mtc0_compare (target_ulong arg1) |
| 1150 | { | 1150 | { |
| 1151 | - cpu_mips_store_compare(env, t0); | 1151 | + cpu_mips_store_compare(env, arg1); |
| 1152 | } | 1152 | } |
| 1153 | 1153 | ||
| 1154 | -void helper_mtc0_status (target_ulong t0) | 1154 | +void helper_mtc0_status (target_ulong arg1) |
| 1155 | { | 1155 | { |
| 1156 | uint32_t val, old; | 1156 | uint32_t val, old; |
| 1157 | uint32_t mask = env->CP0_Status_rw_bitmask; | 1157 | uint32_t mask = env->CP0_Status_rw_bitmask; |
| 1158 | 1158 | ||
| 1159 | - val = t0 & mask; | 1159 | + val = arg1 & mask; |
| 1160 | old = env->CP0_Status; | 1160 | old = env->CP0_Status; |
| 1161 | env->CP0_Status = (env->CP0_Status & ~mask) | val; | 1161 | env->CP0_Status = (env->CP0_Status & ~mask) | val; |
| 1162 | compute_hflags(env); | 1162 | compute_hflags(env); |
| @@ -1175,34 +1175,34 @@ void helper_mtc0_status (target_ulong t0) | @@ -1175,34 +1175,34 @@ void helper_mtc0_status (target_ulong t0) | ||
| 1175 | cpu_mips_update_irq(env); | 1175 | cpu_mips_update_irq(env); |
| 1176 | } | 1176 | } |
| 1177 | 1177 | ||
| 1178 | -void helper_mttc0_status(target_ulong t0) | 1178 | +void helper_mttc0_status(target_ulong arg1) |
| 1179 | { | 1179 | { |
| 1180 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1180 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1181 | int32_t tcstatus = env->tcs[other_tc].CP0_TCStatus; | 1181 | int32_t tcstatus = env->tcs[other_tc].CP0_TCStatus; |
| 1182 | 1182 | ||
| 1183 | - env->CP0_Status = t0 & ~0xf1000018; | ||
| 1184 | - tcstatus = (tcstatus & ~(0xf << CP0TCSt_TCU0)) | (t0 & (0xf << CP0St_CU0)); | ||
| 1185 | - tcstatus = (tcstatus & ~(1 << CP0TCSt_TMX)) | ((t0 & (1 << CP0St_MX)) << (CP0TCSt_TMX - CP0St_MX)); | ||
| 1186 | - tcstatus = (tcstatus & ~(0x3 << CP0TCSt_TKSU)) | ((t0 & (0x3 << CP0St_KSU)) << (CP0TCSt_TKSU - CP0St_KSU)); | 1183 | + env->CP0_Status = arg1 & ~0xf1000018; |
| 1184 | + tcstatus = (tcstatus & ~(0xf << CP0TCSt_TCU0)) | (arg1 & (0xf << CP0St_CU0)); | ||
| 1185 | + tcstatus = (tcstatus & ~(1 << CP0TCSt_TMX)) | ((arg1 & (1 << CP0St_MX)) << (CP0TCSt_TMX - CP0St_MX)); | ||
| 1186 | + tcstatus = (tcstatus & ~(0x3 << CP0TCSt_TKSU)) | ((arg1 & (0x3 << CP0St_KSU)) << (CP0TCSt_TKSU - CP0St_KSU)); | ||
| 1187 | if (other_tc == env->current_tc) | 1187 | if (other_tc == env->current_tc) |
| 1188 | env->active_tc.CP0_TCStatus = tcstatus; | 1188 | env->active_tc.CP0_TCStatus = tcstatus; |
| 1189 | else | 1189 | else |
| 1190 | env->tcs[other_tc].CP0_TCStatus = tcstatus; | 1190 | env->tcs[other_tc].CP0_TCStatus = tcstatus; |
| 1191 | } | 1191 | } |
| 1192 | 1192 | ||
| 1193 | -void helper_mtc0_intctl (target_ulong t0) | 1193 | +void helper_mtc0_intctl (target_ulong arg1) |
| 1194 | { | 1194 | { |
| 1195 | /* vectored interrupts not implemented, no performance counters. */ | 1195 | /* vectored interrupts not implemented, no performance counters. */ |
| 1196 | - env->CP0_IntCtl = (env->CP0_IntCtl & ~0x000002e0) | (t0 & 0x000002e0); | 1196 | + env->CP0_IntCtl = (env->CP0_IntCtl & ~0x000002e0) | (arg1 & 0x000002e0); |
| 1197 | } | 1197 | } |
| 1198 | 1198 | ||
| 1199 | -void helper_mtc0_srsctl (target_ulong t0) | 1199 | +void helper_mtc0_srsctl (target_ulong arg1) |
| 1200 | { | 1200 | { |
| 1201 | uint32_t mask = (0xf << CP0SRSCtl_ESS) | (0xf << CP0SRSCtl_PSS); | 1201 | uint32_t mask = (0xf << CP0SRSCtl_ESS) | (0xf << CP0SRSCtl_PSS); |
| 1202 | - env->CP0_SRSCtl = (env->CP0_SRSCtl & ~mask) | (t0 & mask); | 1202 | + env->CP0_SRSCtl = (env->CP0_SRSCtl & ~mask) | (arg1 & mask); |
| 1203 | } | 1203 | } |
| 1204 | 1204 | ||
| 1205 | -void helper_mtc0_cause (target_ulong t0) | 1205 | +void helper_mtc0_cause (target_ulong arg1) |
| 1206 | { | 1206 | { |
| 1207 | uint32_t mask = 0x00C00300; | 1207 | uint32_t mask = 0x00C00300; |
| 1208 | uint32_t old = env->CP0_Cause; | 1208 | uint32_t old = env->CP0_Cause; |
| @@ -1210,7 +1210,7 @@ void helper_mtc0_cause (target_ulong t0) | @@ -1210,7 +1210,7 @@ void helper_mtc0_cause (target_ulong t0) | ||
| 1210 | if (env->insn_flags & ISA_MIPS32R2) | 1210 | if (env->insn_flags & ISA_MIPS32R2) |
| 1211 | mask |= 1 << CP0Ca_DC; | 1211 | mask |= 1 << CP0Ca_DC; |
| 1212 | 1212 | ||
| 1213 | - env->CP0_Cause = (env->CP0_Cause & ~mask) | (t0 & mask); | 1213 | + env->CP0_Cause = (env->CP0_Cause & ~mask) | (arg1 & mask); |
| 1214 | 1214 | ||
| 1215 | if ((old ^ env->CP0_Cause) & (1 << CP0Ca_DC)) { | 1215 | if ((old ^ env->CP0_Cause) & (1 << CP0Ca_DC)) { |
| 1216 | if (env->CP0_Cause & (1 << CP0Ca_DC)) | 1216 | if (env->CP0_Cause & (1 << CP0Ca_DC)) |
| @@ -1221,66 +1221,66 @@ void helper_mtc0_cause (target_ulong t0) | @@ -1221,66 +1221,66 @@ void helper_mtc0_cause (target_ulong t0) | ||
| 1221 | 1221 | ||
| 1222 | /* Handle the software interrupt as an hardware one, as they | 1222 | /* Handle the software interrupt as an hardware one, as they |
| 1223 | are very similar */ | 1223 | are very similar */ |
| 1224 | - if (t0 & CP0Ca_IP_mask) { | 1224 | + if (arg1 & CP0Ca_IP_mask) { |
| 1225 | cpu_mips_update_irq(env); | 1225 | cpu_mips_update_irq(env); |
| 1226 | } | 1226 | } |
| 1227 | } | 1227 | } |
| 1228 | 1228 | ||
| 1229 | -void helper_mtc0_ebase (target_ulong t0) | 1229 | +void helper_mtc0_ebase (target_ulong arg1) |
| 1230 | { | 1230 | { |
| 1231 | /* vectored interrupts not implemented */ | 1231 | /* vectored interrupts not implemented */ |
| 1232 | /* Multi-CPU not implemented */ | 1232 | /* Multi-CPU not implemented */ |
| 1233 | - env->CP0_EBase = 0x80000000 | (t0 & 0x3FFFF000); | 1233 | + env->CP0_EBase = 0x80000000 | (arg1 & 0x3FFFF000); |
| 1234 | } | 1234 | } |
| 1235 | 1235 | ||
| 1236 | -void helper_mtc0_config0 (target_ulong t0) | 1236 | +void helper_mtc0_config0 (target_ulong arg1) |
| 1237 | { | 1237 | { |
| 1238 | - env->CP0_Config0 = (env->CP0_Config0 & 0x81FFFFF8) | (t0 & 0x00000007); | 1238 | + env->CP0_Config0 = (env->CP0_Config0 & 0x81FFFFF8) | (arg1 & 0x00000007); |
| 1239 | } | 1239 | } |
| 1240 | 1240 | ||
| 1241 | -void helper_mtc0_config2 (target_ulong t0) | 1241 | +void helper_mtc0_config2 (target_ulong arg1) |
| 1242 | { | 1242 | { |
| 1243 | /* tertiary/secondary caches not implemented */ | 1243 | /* tertiary/secondary caches not implemented */ |
| 1244 | env->CP0_Config2 = (env->CP0_Config2 & 0x8FFF0FFF); | 1244 | env->CP0_Config2 = (env->CP0_Config2 & 0x8FFF0FFF); |
| 1245 | } | 1245 | } |
| 1246 | 1246 | ||
| 1247 | -void helper_mtc0_watchlo (target_ulong t0, uint32_t sel) | 1247 | +void helper_mtc0_watchlo (target_ulong arg1, uint32_t sel) |
| 1248 | { | 1248 | { |
| 1249 | /* Watch exceptions for instructions, data loads, data stores | 1249 | /* Watch exceptions for instructions, data loads, data stores |
| 1250 | not implemented. */ | 1250 | not implemented. */ |
| 1251 | - env->CP0_WatchLo[sel] = (t0 & ~0x7); | 1251 | + env->CP0_WatchLo[sel] = (arg1 & ~0x7); |
| 1252 | } | 1252 | } |
| 1253 | 1253 | ||
| 1254 | -void helper_mtc0_watchhi (target_ulong t0, uint32_t sel) | 1254 | +void helper_mtc0_watchhi (target_ulong arg1, uint32_t sel) |
| 1255 | { | 1255 | { |
| 1256 | - env->CP0_WatchHi[sel] = (t0 & 0x40FF0FF8); | ||
| 1257 | - env->CP0_WatchHi[sel] &= ~(env->CP0_WatchHi[sel] & t0 & 0x7); | 1256 | + env->CP0_WatchHi[sel] = (arg1 & 0x40FF0FF8); |
| 1257 | + env->CP0_WatchHi[sel] &= ~(env->CP0_WatchHi[sel] & arg1 & 0x7); | ||
| 1258 | } | 1258 | } |
| 1259 | 1259 | ||
| 1260 | -void helper_mtc0_xcontext (target_ulong t0) | 1260 | +void helper_mtc0_xcontext (target_ulong arg1) |
| 1261 | { | 1261 | { |
| 1262 | target_ulong mask = (1ULL << (env->SEGBITS - 7)) - 1; | 1262 | target_ulong mask = (1ULL << (env->SEGBITS - 7)) - 1; |
| 1263 | - env->CP0_XContext = (env->CP0_XContext & mask) | (t0 & ~mask); | 1263 | + env->CP0_XContext = (env->CP0_XContext & mask) | (arg1 & ~mask); |
| 1264 | } | 1264 | } |
| 1265 | 1265 | ||
| 1266 | -void helper_mtc0_framemask (target_ulong t0) | 1266 | +void helper_mtc0_framemask (target_ulong arg1) |
| 1267 | { | 1267 | { |
| 1268 | - env->CP0_Framemask = t0; /* XXX */ | 1268 | + env->CP0_Framemask = arg1; /* XXX */ |
| 1269 | } | 1269 | } |
| 1270 | 1270 | ||
| 1271 | -void helper_mtc0_debug (target_ulong t0) | 1271 | +void helper_mtc0_debug (target_ulong arg1) |
| 1272 | { | 1272 | { |
| 1273 | - env->CP0_Debug = (env->CP0_Debug & 0x8C03FC1F) | (t0 & 0x13300120); | ||
| 1274 | - if (t0 & (1 << CP0DB_DM)) | 1273 | + env->CP0_Debug = (env->CP0_Debug & 0x8C03FC1F) | (arg1 & 0x13300120); |
| 1274 | + if (arg1 & (1 << CP0DB_DM)) | ||
| 1275 | env->hflags |= MIPS_HFLAG_DM; | 1275 | env->hflags |= MIPS_HFLAG_DM; |
| 1276 | else | 1276 | else |
| 1277 | env->hflags &= ~MIPS_HFLAG_DM; | 1277 | env->hflags &= ~MIPS_HFLAG_DM; |
| 1278 | } | 1278 | } |
| 1279 | 1279 | ||
| 1280 | -void helper_mttc0_debug(target_ulong t0) | 1280 | +void helper_mttc0_debug(target_ulong arg1) |
| 1281 | { | 1281 | { |
| 1282 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1282 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1283 | - uint32_t val = t0 & ((1 << CP0DB_SSt) | (1 << CP0DB_Halt)); | 1283 | + uint32_t val = arg1 & ((1 << CP0DB_SSt) | (1 << CP0DB_Halt)); |
| 1284 | 1284 | ||
| 1285 | /* XXX: Might be wrong, check with EJTAG spec. */ | 1285 | /* XXX: Might be wrong, check with EJTAG spec. */ |
| 1286 | if (other_tc == env->current_tc) | 1286 | if (other_tc == env->current_tc) |
| @@ -1288,32 +1288,32 @@ void helper_mttc0_debug(target_ulong t0) | @@ -1288,32 +1288,32 @@ void helper_mttc0_debug(target_ulong t0) | ||
| 1288 | else | 1288 | else |
| 1289 | env->tcs[other_tc].CP0_Debug_tcstatus = val; | 1289 | env->tcs[other_tc].CP0_Debug_tcstatus = val; |
| 1290 | env->CP0_Debug = (env->CP0_Debug & ((1 << CP0DB_SSt) | (1 << CP0DB_Halt))) | | 1290 | env->CP0_Debug = (env->CP0_Debug & ((1 << CP0DB_SSt) | (1 << CP0DB_Halt))) | |
| 1291 | - (t0 & ~((1 << CP0DB_SSt) | (1 << CP0DB_Halt))); | 1291 | + (arg1 & ~((1 << CP0DB_SSt) | (1 << CP0DB_Halt))); |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | -void helper_mtc0_performance0 (target_ulong t0) | 1294 | +void helper_mtc0_performance0 (target_ulong arg1) |
| 1295 | { | 1295 | { |
| 1296 | - env->CP0_Performance0 = t0 & 0x000007ff; | 1296 | + env->CP0_Performance0 = arg1 & 0x000007ff; |
| 1297 | } | 1297 | } |
| 1298 | 1298 | ||
| 1299 | -void helper_mtc0_taglo (target_ulong t0) | 1299 | +void helper_mtc0_taglo (target_ulong arg1) |
| 1300 | { | 1300 | { |
| 1301 | - env->CP0_TagLo = t0 & 0xFFFFFCF6; | 1301 | + env->CP0_TagLo = arg1 & 0xFFFFFCF6; |
| 1302 | } | 1302 | } |
| 1303 | 1303 | ||
| 1304 | -void helper_mtc0_datalo (target_ulong t0) | 1304 | +void helper_mtc0_datalo (target_ulong arg1) |
| 1305 | { | 1305 | { |
| 1306 | - env->CP0_DataLo = t0; /* XXX */ | 1306 | + env->CP0_DataLo = arg1; /* XXX */ |
| 1307 | } | 1307 | } |
| 1308 | 1308 | ||
| 1309 | -void helper_mtc0_taghi (target_ulong t0) | 1309 | +void helper_mtc0_taghi (target_ulong arg1) |
| 1310 | { | 1310 | { |
| 1311 | - env->CP0_TagHi = t0; /* XXX */ | 1311 | + env->CP0_TagHi = arg1; /* XXX */ |
| 1312 | } | 1312 | } |
| 1313 | 1313 | ||
| 1314 | -void helper_mtc0_datahi (target_ulong t0) | 1314 | +void helper_mtc0_datahi (target_ulong arg1) |
| 1315 | { | 1315 | { |
| 1316 | - env->CP0_DataHi = t0; /* XXX */ | 1316 | + env->CP0_DataHi = arg1; /* XXX */ |
| 1317 | } | 1317 | } |
| 1318 | 1318 | ||
| 1319 | /* MIPS MT functions */ | 1319 | /* MIPS MT functions */ |
| @@ -1367,106 +1367,106 @@ target_ulong helper_mftdsp(void) | @@ -1367,106 +1367,106 @@ target_ulong helper_mftdsp(void) | ||
| 1367 | return env->tcs[other_tc].DSPControl; | 1367 | return env->tcs[other_tc].DSPControl; |
| 1368 | } | 1368 | } |
| 1369 | 1369 | ||
| 1370 | -void helper_mttgpr(target_ulong t0, uint32_t sel) | 1370 | +void helper_mttgpr(target_ulong arg1, uint32_t sel) |
| 1371 | { | 1371 | { |
| 1372 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1372 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1373 | 1373 | ||
| 1374 | if (other_tc == env->current_tc) | 1374 | if (other_tc == env->current_tc) |
| 1375 | - env->active_tc.gpr[sel] = t0; | 1375 | + env->active_tc.gpr[sel] = arg1; |
| 1376 | else | 1376 | else |
| 1377 | - env->tcs[other_tc].gpr[sel] = t0; | 1377 | + env->tcs[other_tc].gpr[sel] = arg1; |
| 1378 | } | 1378 | } |
| 1379 | 1379 | ||
| 1380 | -void helper_mttlo(target_ulong t0, uint32_t sel) | 1380 | +void helper_mttlo(target_ulong arg1, uint32_t sel) |
| 1381 | { | 1381 | { |
| 1382 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1382 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1383 | 1383 | ||
| 1384 | if (other_tc == env->current_tc) | 1384 | if (other_tc == env->current_tc) |
| 1385 | - env->active_tc.LO[sel] = t0; | 1385 | + env->active_tc.LO[sel] = arg1; |
| 1386 | else | 1386 | else |
| 1387 | - env->tcs[other_tc].LO[sel] = t0; | 1387 | + env->tcs[other_tc].LO[sel] = arg1; |
| 1388 | } | 1388 | } |
| 1389 | 1389 | ||
| 1390 | -void helper_mtthi(target_ulong t0, uint32_t sel) | 1390 | +void helper_mtthi(target_ulong arg1, uint32_t sel) |
| 1391 | { | 1391 | { |
| 1392 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1392 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1393 | 1393 | ||
| 1394 | if (other_tc == env->current_tc) | 1394 | if (other_tc == env->current_tc) |
| 1395 | - env->active_tc.HI[sel] = t0; | 1395 | + env->active_tc.HI[sel] = arg1; |
| 1396 | else | 1396 | else |
| 1397 | - env->tcs[other_tc].HI[sel] = t0; | 1397 | + env->tcs[other_tc].HI[sel] = arg1; |
| 1398 | } | 1398 | } |
| 1399 | 1399 | ||
| 1400 | -void helper_mttacx(target_ulong t0, uint32_t sel) | 1400 | +void helper_mttacx(target_ulong arg1, uint32_t sel) |
| 1401 | { | 1401 | { |
| 1402 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1402 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1403 | 1403 | ||
| 1404 | if (other_tc == env->current_tc) | 1404 | if (other_tc == env->current_tc) |
| 1405 | - env->active_tc.ACX[sel] = t0; | 1405 | + env->active_tc.ACX[sel] = arg1; |
| 1406 | else | 1406 | else |
| 1407 | - env->tcs[other_tc].ACX[sel] = t0; | 1407 | + env->tcs[other_tc].ACX[sel] = arg1; |
| 1408 | } | 1408 | } |
| 1409 | 1409 | ||
| 1410 | -void helper_mttdsp(target_ulong t0) | 1410 | +void helper_mttdsp(target_ulong arg1) |
| 1411 | { | 1411 | { |
| 1412 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); | 1412 | int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC); |
| 1413 | 1413 | ||
| 1414 | if (other_tc == env->current_tc) | 1414 | if (other_tc == env->current_tc) |
| 1415 | - env->active_tc.DSPControl = t0; | 1415 | + env->active_tc.DSPControl = arg1; |
| 1416 | else | 1416 | else |
| 1417 | - env->tcs[other_tc].DSPControl = t0; | 1417 | + env->tcs[other_tc].DSPControl = arg1; |
| 1418 | } | 1418 | } |
| 1419 | 1419 | ||
| 1420 | /* MIPS MT functions */ | 1420 | /* MIPS MT functions */ |
| 1421 | -target_ulong helper_dmt(target_ulong t0) | 1421 | +target_ulong helper_dmt(target_ulong arg1) |
| 1422 | { | 1422 | { |
| 1423 | // TODO | 1423 | // TODO |
| 1424 | - t0 = 0; | ||
| 1425 | - // rt = t0 | 1424 | + arg1 = 0; |
| 1425 | + // rt = arg1 | ||
| 1426 | 1426 | ||
| 1427 | - return t0; | 1427 | + return arg1; |
| 1428 | } | 1428 | } |
| 1429 | 1429 | ||
| 1430 | -target_ulong helper_emt(target_ulong t0) | 1430 | +target_ulong helper_emt(target_ulong arg1) |
| 1431 | { | 1431 | { |
| 1432 | // TODO | 1432 | // TODO |
| 1433 | - t0 = 0; | ||
| 1434 | - // rt = t0 | 1433 | + arg1 = 0; |
| 1434 | + // rt = arg1 | ||
| 1435 | 1435 | ||
| 1436 | - return t0; | 1436 | + return arg1; |
| 1437 | } | 1437 | } |
| 1438 | 1438 | ||
| 1439 | -target_ulong helper_dvpe(target_ulong t0) | 1439 | +target_ulong helper_dvpe(target_ulong arg1) |
| 1440 | { | 1440 | { |
| 1441 | // TODO | 1441 | // TODO |
| 1442 | - t0 = 0; | ||
| 1443 | - // rt = t0 | 1442 | + arg1 = 0; |
| 1443 | + // rt = arg1 | ||
| 1444 | 1444 | ||
| 1445 | - return t0; | 1445 | + return arg1; |
| 1446 | } | 1446 | } |
| 1447 | 1447 | ||
| 1448 | -target_ulong helper_evpe(target_ulong t0) | 1448 | +target_ulong helper_evpe(target_ulong arg1) |
| 1449 | { | 1449 | { |
| 1450 | // TODO | 1450 | // TODO |
| 1451 | - t0 = 0; | ||
| 1452 | - // rt = t0 | 1451 | + arg1 = 0; |
| 1452 | + // rt = arg1 | ||
| 1453 | 1453 | ||
| 1454 | - return t0; | 1454 | + return arg1; |
| 1455 | } | 1455 | } |
| 1456 | #endif /* !CONFIG_USER_ONLY */ | 1456 | #endif /* !CONFIG_USER_ONLY */ |
| 1457 | 1457 | ||
| 1458 | -void helper_fork(target_ulong t0, target_ulong t1) | 1458 | +void helper_fork(target_ulong arg1, target_ulong arg2) |
| 1459 | { | 1459 | { |
| 1460 | - // t0 = rt, t1 = rs | ||
| 1461 | - t0 = 0; | 1460 | + // arg1 = rt, arg2 = rs |
| 1461 | + arg1 = 0; | ||
| 1462 | // TODO: store to TC register | 1462 | // TODO: store to TC register |
| 1463 | } | 1463 | } |
| 1464 | 1464 | ||
| 1465 | -target_ulong helper_yield(target_ulong t0) | 1465 | +target_ulong helper_yield(target_ulong arg1) |
| 1466 | { | 1466 | { |
| 1467 | - if (t0 < 0) { | 1467 | + if (arg1 < 0) { |
| 1468 | /* No scheduling policy implemented. */ | 1468 | /* No scheduling policy implemented. */ |
| 1469 | - if (t0 != -2) { | 1469 | + if (arg1 != -2) { |
| 1470 | if (env->CP0_VPEControl & (1 << CP0VPECo_YSI) && | 1470 | if (env->CP0_VPEControl & (1 << CP0VPECo_YSI) && |
| 1471 | env->active_tc.CP0_TCStatus & (1 << CP0TCSt_DT)) { | 1471 | env->active_tc.CP0_TCStatus & (1 << CP0TCSt_DT)) { |
| 1472 | env->CP0_VPEControl &= ~(0x7 << CP0VPECo_EXCPT); | 1472 | env->CP0_VPEControl &= ~(0x7 << CP0VPECo_EXCPT); |
| @@ -1474,14 +1474,14 @@ target_ulong helper_yield(target_ulong t0) | @@ -1474,14 +1474,14 @@ target_ulong helper_yield(target_ulong t0) | ||
| 1474 | helper_raise_exception(EXCP_THREAD); | 1474 | helper_raise_exception(EXCP_THREAD); |
| 1475 | } | 1475 | } |
| 1476 | } | 1476 | } |
| 1477 | - } else if (t0 == 0) { | 1477 | + } else if (arg1 == 0) { |
| 1478 | if (0 /* TODO: TC underflow */) { | 1478 | if (0 /* TODO: TC underflow */) { |
| 1479 | env->CP0_VPEControl &= ~(0x7 << CP0VPECo_EXCPT); | 1479 | env->CP0_VPEControl &= ~(0x7 << CP0VPECo_EXCPT); |
| 1480 | helper_raise_exception(EXCP_THREAD); | 1480 | helper_raise_exception(EXCP_THREAD); |
| 1481 | } else { | 1481 | } else { |
| 1482 | // TODO: Deallocate TC | 1482 | // TODO: Deallocate TC |
| 1483 | } | 1483 | } |
| 1484 | - } else if (t0 > 0) { | 1484 | + } else if (arg1 > 0) { |
| 1485 | /* Yield qualifier inputs not implemented. */ | 1485 | /* Yield qualifier inputs not implemented. */ |
| 1486 | env->CP0_VPEControl &= ~(0x7 << CP0VPECo_EXCPT); | 1486 | env->CP0_VPEControl &= ~(0x7 << CP0VPECo_EXCPT); |
| 1487 | env->CP0_VPEControl |= 2 << CP0VPECo_EXCPT; | 1487 | env->CP0_VPEControl |= 2 << CP0VPECo_EXCPT; |
| @@ -1884,53 +1884,53 @@ unsigned int ieee_rm[] = { | @@ -1884,53 +1884,53 @@ unsigned int ieee_rm[] = { | ||
| 1884 | 1884 | ||
| 1885 | target_ulong helper_cfc1 (uint32_t reg) | 1885 | target_ulong helper_cfc1 (uint32_t reg) |
| 1886 | { | 1886 | { |
| 1887 | - target_ulong t0; | 1887 | + target_ulong arg1; |
| 1888 | 1888 | ||
| 1889 | switch (reg) { | 1889 | switch (reg) { |
| 1890 | case 0: | 1890 | case 0: |
| 1891 | - t0 = (int32_t)env->active_fpu.fcr0; | 1891 | + arg1 = (int32_t)env->active_fpu.fcr0; |
| 1892 | break; | 1892 | break; |
| 1893 | case 25: | 1893 | case 25: |
| 1894 | - t0 = ((env->active_fpu.fcr31 >> 24) & 0xfe) | ((env->active_fpu.fcr31 >> 23) & 0x1); | 1894 | + arg1 = ((env->active_fpu.fcr31 >> 24) & 0xfe) | ((env->active_fpu.fcr31 >> 23) & 0x1); |
| 1895 | break; | 1895 | break; |
| 1896 | case 26: | 1896 | case 26: |
| 1897 | - t0 = env->active_fpu.fcr31 & 0x0003f07c; | 1897 | + arg1 = env->active_fpu.fcr31 & 0x0003f07c; |
| 1898 | break; | 1898 | break; |
| 1899 | case 28: | 1899 | case 28: |
| 1900 | - t0 = (env->active_fpu.fcr31 & 0x00000f83) | ((env->active_fpu.fcr31 >> 22) & 0x4); | 1900 | + arg1 = (env->active_fpu.fcr31 & 0x00000f83) | ((env->active_fpu.fcr31 >> 22) & 0x4); |
| 1901 | break; | 1901 | break; |
| 1902 | default: | 1902 | default: |
| 1903 | - t0 = (int32_t)env->active_fpu.fcr31; | 1903 | + arg1 = (int32_t)env->active_fpu.fcr31; |
| 1904 | break; | 1904 | break; |
| 1905 | } | 1905 | } |
| 1906 | 1906 | ||
| 1907 | - return t0; | 1907 | + return arg1; |
| 1908 | } | 1908 | } |
| 1909 | 1909 | ||
| 1910 | -void helper_ctc1 (target_ulong t0, uint32_t reg) | 1910 | +void helper_ctc1 (target_ulong arg1, uint32_t reg) |
| 1911 | { | 1911 | { |
| 1912 | switch(reg) { | 1912 | switch(reg) { |
| 1913 | case 25: | 1913 | case 25: |
| 1914 | - if (t0 & 0xffffff00) | 1914 | + if (arg1 & 0xffffff00) |
| 1915 | return; | 1915 | return; |
| 1916 | - env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0x017fffff) | ((t0 & 0xfe) << 24) | | ||
| 1917 | - ((t0 & 0x1) << 23); | 1916 | + env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0x017fffff) | ((arg1 & 0xfe) << 24) | |
| 1917 | + ((arg1 & 0x1) << 23); | ||
| 1918 | break; | 1918 | break; |
| 1919 | case 26: | 1919 | case 26: |
| 1920 | - if (t0 & 0x007c0000) | 1920 | + if (arg1 & 0x007c0000) |
| 1921 | return; | 1921 | return; |
| 1922 | - env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0xfffc0f83) | (t0 & 0x0003f07c); | 1922 | + env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0xfffc0f83) | (arg1 & 0x0003f07c); |
| 1923 | break; | 1923 | break; |
| 1924 | case 28: | 1924 | case 28: |
| 1925 | - if (t0 & 0x007c0000) | 1925 | + if (arg1 & 0x007c0000) |
| 1926 | return; | 1926 | return; |
| 1927 | - env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0xfefff07c) | (t0 & 0x00000f83) | | ||
| 1928 | - ((t0 & 0x4) << 22); | 1927 | + env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0xfefff07c) | (arg1 & 0x00000f83) | |
| 1928 | + ((arg1 & 0x4) << 22); | ||
| 1929 | break; | 1929 | break; |
| 1930 | case 31: | 1930 | case 31: |
| 1931 | - if (t0 & 0x007c0000) | 1931 | + if (arg1 & 0x007c0000) |
| 1932 | return; | 1932 | return; |
| 1933 | - env->active_fpu.fcr31 = t0; | 1933 | + env->active_fpu.fcr31 = arg1; |
| 1934 | break; | 1934 | break; |
| 1935 | default: | 1935 | default: |
| 1936 | return; | 1936 | return; |
target-mips/translate.c
| @@ -546,48 +546,48 @@ static inline void gen_store_ACX (TCGv t, int reg) | @@ -546,48 +546,48 @@ static inline void gen_store_ACX (TCGv t, int reg) | ||
| 546 | /* Moves to/from shadow registers. */ | 546 | /* Moves to/from shadow registers. */ |
| 547 | static inline void gen_load_srsgpr (int from, int to) | 547 | static inline void gen_load_srsgpr (int from, int to) |
| 548 | { | 548 | { |
| 549 | - TCGv r_tmp1 = tcg_temp_new(); | 549 | + TCGv t0 = tcg_temp_new(); |
| 550 | 550 | ||
| 551 | if (from == 0) | 551 | if (from == 0) |
| 552 | - tcg_gen_movi_tl(r_tmp1, 0); | 552 | + tcg_gen_movi_tl(t0, 0); |
| 553 | else { | 553 | else { |
| 554 | - TCGv_i32 r_tmp2 = tcg_temp_new_i32(); | 554 | + TCGv_i32 t2 = tcg_temp_new_i32(); |
| 555 | TCGv_ptr addr = tcg_temp_new_ptr(); | 555 | TCGv_ptr addr = tcg_temp_new_ptr(); |
| 556 | 556 | ||
| 557 | - tcg_gen_ld_i32(r_tmp2, cpu_env, offsetof(CPUState, CP0_SRSCtl)); | ||
| 558 | - tcg_gen_shri_i32(r_tmp2, r_tmp2, CP0SRSCtl_PSS); | ||
| 559 | - tcg_gen_andi_i32(r_tmp2, r_tmp2, 0xf); | ||
| 560 | - tcg_gen_muli_i32(r_tmp2, r_tmp2, sizeof(target_ulong) * 32); | ||
| 561 | - tcg_gen_ext_i32_ptr(addr, r_tmp2); | 557 | + tcg_gen_ld_i32(t2, cpu_env, offsetof(CPUState, CP0_SRSCtl)); |
| 558 | + tcg_gen_shri_i32(t2, t2, CP0SRSCtl_PSS); | ||
| 559 | + tcg_gen_andi_i32(t2, t2, 0xf); | ||
| 560 | + tcg_gen_muli_i32(t2, t2, sizeof(target_ulong) * 32); | ||
| 561 | + tcg_gen_ext_i32_ptr(addr, t2); | ||
| 562 | tcg_gen_add_ptr(addr, cpu_env, addr); | 562 | tcg_gen_add_ptr(addr, cpu_env, addr); |
| 563 | 563 | ||
| 564 | - tcg_gen_ld_tl(r_tmp1, addr, sizeof(target_ulong) * from); | 564 | + tcg_gen_ld_tl(t0, addr, sizeof(target_ulong) * from); |
| 565 | tcg_temp_free_ptr(addr); | 565 | tcg_temp_free_ptr(addr); |
| 566 | - tcg_temp_free_i32(r_tmp2); | 566 | + tcg_temp_free_i32(t2); |
| 567 | } | 567 | } |
| 568 | - gen_store_gpr(r_tmp1, to); | ||
| 569 | - tcg_temp_free(r_tmp1); | 568 | + gen_store_gpr(t0, to); |
| 569 | + tcg_temp_free(t0); | ||
| 570 | } | 570 | } |
| 571 | 571 | ||
| 572 | static inline void gen_store_srsgpr (int from, int to) | 572 | static inline void gen_store_srsgpr (int from, int to) |
| 573 | { | 573 | { |
| 574 | if (to != 0) { | 574 | if (to != 0) { |
| 575 | - TCGv r_tmp1 = tcg_temp_new(); | ||
| 576 | - TCGv_i32 r_tmp2 = tcg_temp_new_i32(); | 575 | + TCGv t0 = tcg_temp_new(); |
| 576 | + TCGv_i32 t2 = tcg_temp_new_i32(); | ||
| 577 | TCGv_ptr addr = tcg_temp_new_ptr(); | 577 | TCGv_ptr addr = tcg_temp_new_ptr(); |
| 578 | 578 | ||
| 579 | - gen_load_gpr(r_tmp1, from); | ||
| 580 | - tcg_gen_ld_i32(r_tmp2, cpu_env, offsetof(CPUState, CP0_SRSCtl)); | ||
| 581 | - tcg_gen_shri_i32(r_tmp2, r_tmp2, CP0SRSCtl_PSS); | ||
| 582 | - tcg_gen_andi_i32(r_tmp2, r_tmp2, 0xf); | ||
| 583 | - tcg_gen_muli_i32(r_tmp2, r_tmp2, sizeof(target_ulong) * 32); | ||
| 584 | - tcg_gen_ext_i32_ptr(addr, r_tmp2); | 579 | + gen_load_gpr(t0, from); |
| 580 | + tcg_gen_ld_i32(t2, cpu_env, offsetof(CPUState, CP0_SRSCtl)); | ||
| 581 | + tcg_gen_shri_i32(t2, t2, CP0SRSCtl_PSS); | ||
| 582 | + tcg_gen_andi_i32(t2, t2, 0xf); | ||
| 583 | + tcg_gen_muli_i32(t2, t2, sizeof(target_ulong) * 32); | ||
| 584 | + tcg_gen_ext_i32_ptr(addr, t2); | ||
| 585 | tcg_gen_add_ptr(addr, cpu_env, addr); | 585 | tcg_gen_add_ptr(addr, cpu_env, addr); |
| 586 | 586 | ||
| 587 | - tcg_gen_st_tl(r_tmp1, addr, sizeof(target_ulong) * to); | 587 | + tcg_gen_st_tl(t0, addr, sizeof(target_ulong) * to); |
| 588 | tcg_temp_free_ptr(addr); | 588 | tcg_temp_free_ptr(addr); |
| 589 | - tcg_temp_free_i32(r_tmp2); | ||
| 590 | - tcg_temp_free(r_tmp1); | 589 | + tcg_temp_free_i32(t2); |
| 590 | + tcg_temp_free(t0); | ||
| 591 | } | 591 | } |
| 592 | } | 592 | } |
| 593 | 593 | ||
| @@ -887,10 +887,10 @@ static inline void check_mips_64(DisasContext *ctx) | @@ -887,10 +887,10 @@ static inline void check_mips_64(DisasContext *ctx) | ||
| 887 | } | 887 | } |
| 888 | 888 | ||
| 889 | /* load/store instructions. */ | 889 | /* load/store instructions. */ |
| 890 | -#define OP_LD(insn,fname) \ | ||
| 891 | -static inline void op_ldst_##insn(TCGv t0, DisasContext *ctx) \ | ||
| 892 | -{ \ | ||
| 893 | - tcg_gen_qemu_##fname(t0, t0, ctx->mem_idx); \ | 890 | +#define OP_LD(insn,fname) \ |
| 891 | +static inline void op_ldst_##insn(TCGv ret, TCGv arg1, DisasContext *ctx) \ | ||
| 892 | +{ \ | ||
| 893 | + tcg_gen_qemu_##fname(ret, arg1, ctx->mem_idx); \ | ||
| 894 | } | 894 | } |
| 895 | OP_LD(lb,ld8s); | 895 | OP_LD(lb,ld8s); |
| 896 | OP_LD(lbu,ld8u); | 896 | OP_LD(lbu,ld8u); |
| @@ -903,10 +903,10 @@ OP_LD(ld,ld64); | @@ -903,10 +903,10 @@ OP_LD(ld,ld64); | ||
| 903 | #endif | 903 | #endif |
| 904 | #undef OP_LD | 904 | #undef OP_LD |
| 905 | 905 | ||
| 906 | -#define OP_ST(insn,fname) \ | ||
| 907 | -static inline void op_ldst_##insn(TCGv t0, TCGv t1, DisasContext *ctx) \ | ||
| 908 | -{ \ | ||
| 909 | - tcg_gen_qemu_##fname(t1, t0, ctx->mem_idx); \ | 906 | +#define OP_ST(insn,fname) \ |
| 907 | +static inline void op_ldst_##insn(TCGv arg1, TCGv arg2, DisasContext *ctx) \ | ||
| 908 | +{ \ | ||
| 909 | + tcg_gen_qemu_##fname(arg1, arg2, ctx->mem_idx); \ | ||
| 910 | } | 910 | } |
| 911 | OP_ST(sb,st8); | 911 | OP_ST(sb,st8); |
| 912 | OP_ST(sh,st16); | 912 | OP_ST(sh,st16); |
| @@ -916,12 +916,14 @@ OP_ST(sd,st64); | @@ -916,12 +916,14 @@ OP_ST(sd,st64); | ||
| 916 | #endif | 916 | #endif |
| 917 | #undef OP_ST | 917 | #undef OP_ST |
| 918 | 918 | ||
| 919 | -#define OP_LD_ATOMIC(insn,fname) \ | ||
| 920 | -static inline void op_ldst_##insn(TCGv t0, TCGv t1, DisasContext *ctx) \ | ||
| 921 | -{ \ | ||
| 922 | - tcg_gen_mov_tl(t1, t0); \ | ||
| 923 | - tcg_gen_qemu_##fname(t0, t0, ctx->mem_idx); \ | ||
| 924 | - tcg_gen_st_tl(t1, cpu_env, offsetof(CPUState, CP0_LLAddr)); \ | 919 | +#define OP_LD_ATOMIC(insn,fname) \ |
| 920 | +static inline void op_ldst_##insn(TCGv ret, TCGv arg1, DisasContext *ctx) \ | ||
| 921 | +{ \ | ||
| 922 | + TCGv t0 = tcg_temp_new(); \ | ||
| 923 | + tcg_gen_mov_tl(t0, arg1); \ | ||
| 924 | + tcg_gen_qemu_##fname(ret, arg1, ctx->mem_idx); \ | ||
| 925 | + tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, CP0_LLAddr)); \ | ||
| 926 | + tcg_temp_free(t0); \ | ||
| 925 | } | 927 | } |
| 926 | OP_LD_ATOMIC(ll,ld32s); | 928 | OP_LD_ATOMIC(ll,ld32s); |
| 927 | #if defined(TARGET_MIPS64) | 929 | #if defined(TARGET_MIPS64) |
| @@ -929,28 +931,28 @@ OP_LD_ATOMIC(lld,ld64); | @@ -929,28 +931,28 @@ OP_LD_ATOMIC(lld,ld64); | ||
| 929 | #endif | 931 | #endif |
| 930 | #undef OP_LD_ATOMIC | 932 | #undef OP_LD_ATOMIC |
| 931 | 933 | ||
| 932 | -#define OP_ST_ATOMIC(insn,fname,almask) \ | ||
| 933 | -static inline void op_ldst_##insn(TCGv t0, TCGv t1, DisasContext *ctx) \ | ||
| 934 | -{ \ | ||
| 935 | - TCGv r_tmp = tcg_temp_new(); \ | ||
| 936 | - int l1 = gen_new_label(); \ | ||
| 937 | - int l2 = gen_new_label(); \ | ||
| 938 | - int l3 = gen_new_label(); \ | ||
| 939 | - \ | ||
| 940 | - tcg_gen_andi_tl(r_tmp, t0, almask); \ | ||
| 941 | - tcg_gen_brcondi_tl(TCG_COND_EQ, r_tmp, 0, l1); \ | ||
| 942 | - tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, CP0_BadVAddr)); \ | ||
| 943 | - generate_exception(ctx, EXCP_AdES); \ | ||
| 944 | - gen_set_label(l1); \ | ||
| 945 | - tcg_gen_ld_tl(r_tmp, cpu_env, offsetof(CPUState, CP0_LLAddr)); \ | ||
| 946 | - tcg_gen_brcond_tl(TCG_COND_NE, t0, r_tmp, l2); \ | ||
| 947 | - tcg_temp_free(r_tmp); \ | ||
| 948 | - tcg_gen_qemu_##fname(t1, t0, ctx->mem_idx); \ | ||
| 949 | - tcg_gen_movi_tl(t0, 1); \ | ||
| 950 | - tcg_gen_br(l3); \ | ||
| 951 | - gen_set_label(l2); \ | ||
| 952 | - tcg_gen_movi_tl(t0, 0); \ | ||
| 953 | - gen_set_label(l3); \ | 934 | +#define OP_ST_ATOMIC(insn,fname,almask) \ |
| 935 | +static inline void op_ldst_##insn(TCGv ret, TCGv arg1, TCGv arg2, DisasContext *ctx) \ | ||
| 936 | +{ \ | ||
| 937 | + TCGv t0 = tcg_temp_new(); \ | ||
| 938 | + int l1 = gen_new_label(); \ | ||
| 939 | + int l2 = gen_new_label(); \ | ||
| 940 | + int l3 = gen_new_label(); \ | ||
| 941 | + \ | ||
| 942 | + tcg_gen_andi_tl(t0, arg2, almask); \ | ||
| 943 | + tcg_gen_brcondi_tl(TCG_COND_EQ, t0, 0, l1); \ | ||
| 944 | + tcg_gen_st_tl(arg2, cpu_env, offsetof(CPUState, CP0_BadVAddr)); \ | ||
| 945 | + generate_exception(ctx, EXCP_AdES); \ | ||
| 946 | + gen_set_label(l1); \ | ||
| 947 | + tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_LLAddr)); \ | ||
| 948 | + tcg_gen_brcond_tl(TCG_COND_NE, arg2, t0, l2); \ | ||
| 949 | + tcg_temp_free(t0); \ | ||
| 950 | + tcg_gen_qemu_##fname(arg1, arg2, ctx->mem_idx); \ | ||
| 951 | + tcg_gen_movi_tl(ret, 1); \ | ||
| 952 | + tcg_gen_br(l3); \ | ||
| 953 | + gen_set_label(l2); \ | ||
| 954 | + tcg_gen_movi_tl(ret, 0); \ | ||
| 955 | + gen_set_label(l3); \ | ||
| 954 | } | 956 | } |
| 955 | OP_ST_ATOMIC(sc,st32,0x3); | 957 | OP_ST_ATOMIC(sc,st32,0x3); |
| 956 | #if defined(TARGET_MIPS64) | 958 | #if defined(TARGET_MIPS64) |
| @@ -980,132 +982,132 @@ static void gen_ldst (DisasContext *ctx, uint32_t opc, int rt, | @@ -980,132 +982,132 @@ static void gen_ldst (DisasContext *ctx, uint32_t opc, int rt, | ||
| 980 | #if defined(TARGET_MIPS64) | 982 | #if defined(TARGET_MIPS64) |
| 981 | case OPC_LWU: | 983 | case OPC_LWU: |
| 982 | save_cpu_state(ctx, 0); | 984 | save_cpu_state(ctx, 0); |
| 983 | - op_ldst_lwu(t0, ctx); | 985 | + op_ldst_lwu(t0, t0, ctx); |
| 984 | gen_store_gpr(t0, rt); | 986 | gen_store_gpr(t0, rt); |
| 985 | opn = "lwu"; | 987 | opn = "lwu"; |
| 986 | break; | 988 | break; |
| 987 | case OPC_LD: | 989 | case OPC_LD: |
| 988 | save_cpu_state(ctx, 0); | 990 | save_cpu_state(ctx, 0); |
| 989 | - op_ldst_ld(t0, ctx); | 991 | + op_ldst_ld(t0, t0, ctx); |
| 990 | gen_store_gpr(t0, rt); | 992 | gen_store_gpr(t0, rt); |
| 991 | opn = "ld"; | 993 | opn = "ld"; |
| 992 | break; | 994 | break; |
| 993 | case OPC_LLD: | 995 | case OPC_LLD: |
| 994 | save_cpu_state(ctx, 0); | 996 | save_cpu_state(ctx, 0); |
| 995 | - op_ldst_lld(t0, t1, ctx); | 997 | + op_ldst_lld(t0, t0, ctx); |
| 996 | gen_store_gpr(t0, rt); | 998 | gen_store_gpr(t0, rt); |
| 997 | opn = "lld"; | 999 | opn = "lld"; |
| 998 | break; | 1000 | break; |
| 999 | case OPC_SD: | 1001 | case OPC_SD: |
| 1000 | save_cpu_state(ctx, 0); | 1002 | save_cpu_state(ctx, 0); |
| 1001 | gen_load_gpr(t1, rt); | 1003 | gen_load_gpr(t1, rt); |
| 1002 | - op_ldst_sd(t0, t1, ctx); | 1004 | + op_ldst_sd(t1, t0, ctx); |
| 1003 | opn = "sd"; | 1005 | opn = "sd"; |
| 1004 | break; | 1006 | break; |
| 1005 | case OPC_LDL: | 1007 | case OPC_LDL: |
| 1006 | save_cpu_state(ctx, 1); | 1008 | save_cpu_state(ctx, 1); |
| 1007 | gen_load_gpr(t1, rt); | 1009 | gen_load_gpr(t1, rt); |
| 1008 | - gen_helper_3i(ldl, t1, t0, t1, ctx->mem_idx); | 1010 | + gen_helper_3i(ldl, t1, t1, t0, ctx->mem_idx); |
| 1009 | gen_store_gpr(t1, rt); | 1011 | gen_store_gpr(t1, rt); |
| 1010 | opn = "ldl"; | 1012 | opn = "ldl"; |
| 1011 | break; | 1013 | break; |
| 1012 | case OPC_SDL: | 1014 | case OPC_SDL: |
| 1013 | save_cpu_state(ctx, 1); | 1015 | save_cpu_state(ctx, 1); |
| 1014 | gen_load_gpr(t1, rt); | 1016 | gen_load_gpr(t1, rt); |
| 1015 | - gen_helper_2i(sdl, t0, t1, ctx->mem_idx); | 1017 | + gen_helper_2i(sdl, t1, t0, ctx->mem_idx); |
| 1016 | opn = "sdl"; | 1018 | opn = "sdl"; |
| 1017 | break; | 1019 | break; |
| 1018 | case OPC_LDR: | 1020 | case OPC_LDR: |
| 1019 | save_cpu_state(ctx, 1); | 1021 | save_cpu_state(ctx, 1); |
| 1020 | gen_load_gpr(t1, rt); | 1022 | gen_load_gpr(t1, rt); |
| 1021 | - gen_helper_3i(ldr, t1, t0, t1, ctx->mem_idx); | 1023 | + gen_helper_3i(ldr, t1, t1, t0, ctx->mem_idx); |
| 1022 | gen_store_gpr(t1, rt); | 1024 | gen_store_gpr(t1, rt); |
| 1023 | opn = "ldr"; | 1025 | opn = "ldr"; |
| 1024 | break; | 1026 | break; |
| 1025 | case OPC_SDR: | 1027 | case OPC_SDR: |
| 1026 | save_cpu_state(ctx, 1); | 1028 | save_cpu_state(ctx, 1); |
| 1027 | gen_load_gpr(t1, rt); | 1029 | gen_load_gpr(t1, rt); |
| 1028 | - gen_helper_2i(sdr, t0, t1, ctx->mem_idx); | 1030 | + gen_helper_2i(sdr, t1, t0, ctx->mem_idx); |
| 1029 | opn = "sdr"; | 1031 | opn = "sdr"; |
| 1030 | break; | 1032 | break; |
| 1031 | #endif | 1033 | #endif |
| 1032 | case OPC_LW: | 1034 | case OPC_LW: |
| 1033 | save_cpu_state(ctx, 0); | 1035 | save_cpu_state(ctx, 0); |
| 1034 | - op_ldst_lw(t0, ctx); | 1036 | + op_ldst_lw(t0, t0, ctx); |
| 1035 | gen_store_gpr(t0, rt); | 1037 | gen_store_gpr(t0, rt); |
| 1036 | opn = "lw"; | 1038 | opn = "lw"; |
| 1037 | break; | 1039 | break; |
| 1038 | case OPC_SW: | 1040 | case OPC_SW: |
| 1039 | save_cpu_state(ctx, 0); | 1041 | save_cpu_state(ctx, 0); |
| 1040 | gen_load_gpr(t1, rt); | 1042 | gen_load_gpr(t1, rt); |
| 1041 | - op_ldst_sw(t0, t1, ctx); | 1043 | + op_ldst_sw(t1, t0, ctx); |
| 1042 | opn = "sw"; | 1044 | opn = "sw"; |
| 1043 | break; | 1045 | break; |
| 1044 | case OPC_LH: | 1046 | case OPC_LH: |
| 1045 | save_cpu_state(ctx, 0); | 1047 | save_cpu_state(ctx, 0); |
| 1046 | - op_ldst_lh(t0, ctx); | 1048 | + op_ldst_lh(t0, t0, ctx); |
| 1047 | gen_store_gpr(t0, rt); | 1049 | gen_store_gpr(t0, rt); |
| 1048 | opn = "lh"; | 1050 | opn = "lh"; |
| 1049 | break; | 1051 | break; |
| 1050 | case OPC_SH: | 1052 | case OPC_SH: |
| 1051 | save_cpu_state(ctx, 0); | 1053 | save_cpu_state(ctx, 0); |
| 1052 | gen_load_gpr(t1, rt); | 1054 | gen_load_gpr(t1, rt); |
| 1053 | - op_ldst_sh(t0, t1, ctx); | 1055 | + op_ldst_sh(t1, t0, ctx); |
| 1054 | opn = "sh"; | 1056 | opn = "sh"; |
| 1055 | break; | 1057 | break; |
| 1056 | case OPC_LHU: | 1058 | case OPC_LHU: |
| 1057 | save_cpu_state(ctx, 0); | 1059 | save_cpu_state(ctx, 0); |
| 1058 | - op_ldst_lhu(t0, ctx); | 1060 | + op_ldst_lhu(t0, t0, ctx); |
| 1059 | gen_store_gpr(t0, rt); | 1061 | gen_store_gpr(t0, rt); |
| 1060 | opn = "lhu"; | 1062 | opn = "lhu"; |
| 1061 | break; | 1063 | break; |
| 1062 | case OPC_LB: | 1064 | case OPC_LB: |
| 1063 | save_cpu_state(ctx, 0); | 1065 | save_cpu_state(ctx, 0); |
| 1064 | - op_ldst_lb(t0, ctx); | 1066 | + op_ldst_lb(t0, t0, ctx); |
| 1065 | gen_store_gpr(t0, rt); | 1067 | gen_store_gpr(t0, rt); |
| 1066 | opn = "lb"; | 1068 | opn = "lb"; |
| 1067 | break; | 1069 | break; |
| 1068 | case OPC_SB: | 1070 | case OPC_SB: |
| 1069 | save_cpu_state(ctx, 0); | 1071 | save_cpu_state(ctx, 0); |
| 1070 | gen_load_gpr(t1, rt); | 1072 | gen_load_gpr(t1, rt); |
| 1071 | - op_ldst_sb(t0, t1, ctx); | 1073 | + op_ldst_sb(t1, t0, ctx); |
| 1072 | opn = "sb"; | 1074 | opn = "sb"; |
| 1073 | break; | 1075 | break; |
| 1074 | case OPC_LBU: | 1076 | case OPC_LBU: |
| 1075 | save_cpu_state(ctx, 0); | 1077 | save_cpu_state(ctx, 0); |
| 1076 | - op_ldst_lbu(t0, ctx); | 1078 | + op_ldst_lbu(t0, t0, ctx); |
| 1077 | gen_store_gpr(t0, rt); | 1079 | gen_store_gpr(t0, rt); |
| 1078 | opn = "lbu"; | 1080 | opn = "lbu"; |
| 1079 | break; | 1081 | break; |
| 1080 | case OPC_LWL: | 1082 | case OPC_LWL: |
| 1081 | save_cpu_state(ctx, 1); | 1083 | save_cpu_state(ctx, 1); |
| 1082 | gen_load_gpr(t1, rt); | 1084 | gen_load_gpr(t1, rt); |
| 1083 | - gen_helper_3i(lwl, t1, t0, t1, ctx->mem_idx); | 1085 | + gen_helper_3i(lwl, t1, t1, t0, ctx->mem_idx); |
| 1084 | gen_store_gpr(t1, rt); | 1086 | gen_store_gpr(t1, rt); |
| 1085 | opn = "lwl"; | 1087 | opn = "lwl"; |
| 1086 | break; | 1088 | break; |
| 1087 | case OPC_SWL: | 1089 | case OPC_SWL: |
| 1088 | save_cpu_state(ctx, 1); | 1090 | save_cpu_state(ctx, 1); |
| 1089 | gen_load_gpr(t1, rt); | 1091 | gen_load_gpr(t1, rt); |
| 1090 | - gen_helper_2i(swl, t0, t1, ctx->mem_idx); | 1092 | + gen_helper_2i(swl, t1, t0, ctx->mem_idx); |
| 1091 | opn = "swr"; | 1093 | opn = "swr"; |
| 1092 | break; | 1094 | break; |
| 1093 | case OPC_LWR: | 1095 | case OPC_LWR: |
| 1094 | save_cpu_state(ctx, 1); | 1096 | save_cpu_state(ctx, 1); |
| 1095 | gen_load_gpr(t1, rt); | 1097 | gen_load_gpr(t1, rt); |
| 1096 | - gen_helper_3i(lwr, t1, t0, t1, ctx->mem_idx); | 1098 | + gen_helper_3i(lwr, t1, t1, t0, ctx->mem_idx); |
| 1097 | gen_store_gpr(t1, rt); | 1099 | gen_store_gpr(t1, rt); |
| 1098 | opn = "lwr"; | 1100 | opn = "lwr"; |
| 1099 | break; | 1101 | break; |
| 1100 | case OPC_SWR: | 1102 | case OPC_SWR: |
| 1101 | save_cpu_state(ctx, 1); | 1103 | save_cpu_state(ctx, 1); |
| 1102 | gen_load_gpr(t1, rt); | 1104 | gen_load_gpr(t1, rt); |
| 1103 | - gen_helper_2i(swr, t0, t1, ctx->mem_idx); | 1105 | + gen_helper_2i(swr, t1, t0, ctx->mem_idx); |
| 1104 | opn = "swr"; | 1106 | opn = "swr"; |
| 1105 | break; | 1107 | break; |
| 1106 | case OPC_LL: | 1108 | case OPC_LL: |
| 1107 | save_cpu_state(ctx, 0); | 1109 | save_cpu_state(ctx, 0); |
| 1108 | - op_ldst_ll(t0, t1, ctx); | 1110 | + op_ldst_ll(t0, t0, ctx); |
| 1109 | gen_store_gpr(t0, rt); | 1111 | gen_store_gpr(t0, rt); |
| 1110 | opn = "ll"; | 1112 | opn = "ll"; |
| 1111 | break; | 1113 | break; |
| @@ -1141,13 +1143,13 @@ static void gen_st_cond (DisasContext *ctx, uint32_t opc, int rt, | @@ -1141,13 +1143,13 @@ static void gen_st_cond (DisasContext *ctx, uint32_t opc, int rt, | ||
| 1141 | #if defined(TARGET_MIPS64) | 1143 | #if defined(TARGET_MIPS64) |
| 1142 | case OPC_SCD: | 1144 | case OPC_SCD: |
| 1143 | save_cpu_state(ctx, 0); | 1145 | save_cpu_state(ctx, 0); |
| 1144 | - op_ldst_scd(t0, t1, ctx); | 1146 | + op_ldst_scd(t0, t1, t0, ctx); |
| 1145 | opn = "scd"; | 1147 | opn = "scd"; |
| 1146 | break; | 1148 | break; |
| 1147 | #endif | 1149 | #endif |
| 1148 | case OPC_SC: | 1150 | case OPC_SC: |
| 1149 | save_cpu_state(ctx, 0); | 1151 | save_cpu_state(ctx, 0); |
| 1150 | - op_ldst_sc(t0, t1, ctx); | 1152 | + op_ldst_sc(t0, t1, t0, ctx); |
| 1151 | opn = "sc"; | 1153 | opn = "sc"; |
| 1152 | break; | 1154 | break; |
| 1153 | } | 1155 | } |
| @@ -1430,12 +1432,12 @@ static void gen_shift_imm(CPUState *env, DisasContext *ctx, uint32_t opc, | @@ -1430,12 +1432,12 @@ static void gen_shift_imm(CPUState *env, DisasContext *ctx, uint32_t opc, | ||
| 1430 | /* rotr is decoded as srl on non-R2 CPUs */ | 1432 | /* rotr is decoded as srl on non-R2 CPUs */ |
| 1431 | if (env->insn_flags & ISA_MIPS32R2) { | 1433 | if (env->insn_flags & ISA_MIPS32R2) { |
| 1432 | if (uimm != 0) { | 1434 | if (uimm != 0) { |
| 1433 | - TCGv_i32 r_tmp1 = tcg_temp_new_i32(); | 1435 | + TCGv_i32 t1 = tcg_temp_new_i32(); |
| 1434 | 1436 | ||
| 1435 | - tcg_gen_trunc_tl_i32(r_tmp1, t0); | ||
| 1436 | - tcg_gen_rotri_i32(r_tmp1, r_tmp1, uimm); | ||
| 1437 | - tcg_gen_ext_i32_tl(cpu_gpr[rt], r_tmp1); | ||
| 1438 | - tcg_temp_free_i32(r_tmp1); | 1437 | + tcg_gen_trunc_tl_i32(t1, t0); |
| 1438 | + tcg_gen_rotri_i32(t1, t1, uimm); | ||
| 1439 | + tcg_gen_ext_i32_tl(cpu_gpr[rt], t1); | ||
| 1440 | + tcg_temp_free_i32(t1); | ||
| 1439 | } | 1441 | } |
| 1440 | opn = "rotr"; | 1442 | opn = "rotr"; |
| 1441 | } else { | 1443 | } else { |
| @@ -2840,37 +2842,37 @@ static void gen_bshfl (DisasContext *ctx, uint32_t op2, int rt, int rd) | @@ -2840,37 +2842,37 @@ static void gen_bshfl (DisasContext *ctx, uint32_t op2, int rt, int rd) | ||
| 2840 | 2842 | ||
| 2841 | #ifndef CONFIG_USER_ONLY | 2843 | #ifndef CONFIG_USER_ONLY |
| 2842 | /* CP0 (MMU and control) */ | 2844 | /* CP0 (MMU and control) */ |
| 2843 | -static inline void gen_mfc0_load32 (TCGv t, target_ulong off) | 2845 | +static inline void gen_mfc0_load32 (TCGv arg, target_ulong off) |
| 2844 | { | 2846 | { |
| 2845 | - TCGv_i32 r_tmp = tcg_temp_new_i32(); | 2847 | + TCGv_i32 t0 = tcg_temp_new_i32(); |
| 2846 | 2848 | ||
| 2847 | - tcg_gen_ld_i32(r_tmp, cpu_env, off); | ||
| 2848 | - tcg_gen_ext_i32_tl(t, r_tmp); | ||
| 2849 | - tcg_temp_free_i32(r_tmp); | 2849 | + tcg_gen_ld_i32(t0, cpu_env, off); |
| 2850 | + tcg_gen_ext_i32_tl(arg, t0); | ||
| 2851 | + tcg_temp_free_i32(t0); | ||
| 2850 | } | 2852 | } |
| 2851 | 2853 | ||
| 2852 | -static inline void gen_mfc0_load64 (TCGv t, target_ulong off) | 2854 | +static inline void gen_mfc0_load64 (TCGv arg, target_ulong off) |
| 2853 | { | 2855 | { |
| 2854 | - tcg_gen_ld_tl(t, cpu_env, off); | ||
| 2855 | - tcg_gen_ext32s_tl(t, t); | 2856 | + tcg_gen_ld_tl(arg, cpu_env, off); |
| 2857 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 2856 | } | 2858 | } |
| 2857 | 2859 | ||
| 2858 | -static inline void gen_mtc0_store32 (TCGv t, target_ulong off) | 2860 | +static inline void gen_mtc0_store32 (TCGv arg, target_ulong off) |
| 2859 | { | 2861 | { |
| 2860 | - TCGv_i32 r_tmp = tcg_temp_new_i32(); | 2862 | + TCGv_i32 t0 = tcg_temp_new_i32(); |
| 2861 | 2863 | ||
| 2862 | - tcg_gen_trunc_tl_i32(r_tmp, t); | ||
| 2863 | - tcg_gen_st_i32(r_tmp, cpu_env, off); | ||
| 2864 | - tcg_temp_free_i32(r_tmp); | 2864 | + tcg_gen_trunc_tl_i32(t0, arg); |
| 2865 | + tcg_gen_st_i32(t0, cpu_env, off); | ||
| 2866 | + tcg_temp_free_i32(t0); | ||
| 2865 | } | 2867 | } |
| 2866 | 2868 | ||
| 2867 | -static inline void gen_mtc0_store64 (TCGv t, target_ulong off) | 2869 | +static inline void gen_mtc0_store64 (TCGv arg, target_ulong off) |
| 2868 | { | 2870 | { |
| 2869 | - tcg_gen_ext32s_tl(t, t); | ||
| 2870 | - tcg_gen_st_tl(t, cpu_env, off); | 2871 | + tcg_gen_ext32s_tl(arg, arg); |
| 2872 | + tcg_gen_st_tl(arg, cpu_env, off); | ||
| 2871 | } | 2873 | } |
| 2872 | 2874 | ||
| 2873 | -static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int sel) | 2875 | +static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv arg, int reg, int sel) |
| 2874 | { | 2876 | { |
| 2875 | const char *rn = "invalid"; | 2877 | const char *rn = "invalid"; |
| 2876 | 2878 | ||
| @@ -2881,22 +2883,22 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -2881,22 +2883,22 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 2881 | case 0: | 2883 | case 0: |
| 2882 | switch (sel) { | 2884 | switch (sel) { |
| 2883 | case 0: | 2885 | case 0: |
| 2884 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Index)); | 2886 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Index)); |
| 2885 | rn = "Index"; | 2887 | rn = "Index"; |
| 2886 | break; | 2888 | break; |
| 2887 | case 1: | 2889 | case 1: |
| 2888 | check_insn(env, ctx, ASE_MT); | 2890 | check_insn(env, ctx, ASE_MT); |
| 2889 | - gen_helper_mfc0_mvpcontrol(t0); | 2891 | + gen_helper_mfc0_mvpcontrol(arg); |
| 2890 | rn = "MVPControl"; | 2892 | rn = "MVPControl"; |
| 2891 | break; | 2893 | break; |
| 2892 | case 2: | 2894 | case 2: |
| 2893 | check_insn(env, ctx, ASE_MT); | 2895 | check_insn(env, ctx, ASE_MT); |
| 2894 | - gen_helper_mfc0_mvpconf0(t0); | 2896 | + gen_helper_mfc0_mvpconf0(arg); |
| 2895 | rn = "MVPConf0"; | 2897 | rn = "MVPConf0"; |
| 2896 | break; | 2898 | break; |
| 2897 | case 3: | 2899 | case 3: |
| 2898 | check_insn(env, ctx, ASE_MT); | 2900 | check_insn(env, ctx, ASE_MT); |
| 2899 | - gen_helper_mfc0_mvpconf1(t0); | 2901 | + gen_helper_mfc0_mvpconf1(arg); |
| 2900 | rn = "MVPConf1"; | 2902 | rn = "MVPConf1"; |
| 2901 | break; | 2903 | break; |
| 2902 | default: | 2904 | default: |
| @@ -2906,42 +2908,42 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -2906,42 +2908,42 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 2906 | case 1: | 2908 | case 1: |
| 2907 | switch (sel) { | 2909 | switch (sel) { |
| 2908 | case 0: | 2910 | case 0: |
| 2909 | - gen_helper_mfc0_random(t0); | 2911 | + gen_helper_mfc0_random(arg); |
| 2910 | rn = "Random"; | 2912 | rn = "Random"; |
| 2911 | break; | 2913 | break; |
| 2912 | case 1: | 2914 | case 1: |
| 2913 | check_insn(env, ctx, ASE_MT); | 2915 | check_insn(env, ctx, ASE_MT); |
| 2914 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEControl)); | 2916 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEControl)); |
| 2915 | rn = "VPEControl"; | 2917 | rn = "VPEControl"; |
| 2916 | break; | 2918 | break; |
| 2917 | case 2: | 2919 | case 2: |
| 2918 | check_insn(env, ctx, ASE_MT); | 2920 | check_insn(env, ctx, ASE_MT); |
| 2919 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEConf0)); | 2921 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEConf0)); |
| 2920 | rn = "VPEConf0"; | 2922 | rn = "VPEConf0"; |
| 2921 | break; | 2923 | break; |
| 2922 | case 3: | 2924 | case 3: |
| 2923 | check_insn(env, ctx, ASE_MT); | 2925 | check_insn(env, ctx, ASE_MT); |
| 2924 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEConf1)); | 2926 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEConf1)); |
| 2925 | rn = "VPEConf1"; | 2927 | rn = "VPEConf1"; |
| 2926 | break; | 2928 | break; |
| 2927 | case 4: | 2929 | case 4: |
| 2928 | check_insn(env, ctx, ASE_MT); | 2930 | check_insn(env, ctx, ASE_MT); |
| 2929 | - gen_mfc0_load64(t0, offsetof(CPUState, CP0_YQMask)); | 2931 | + gen_mfc0_load64(arg, offsetof(CPUState, CP0_YQMask)); |
| 2930 | rn = "YQMask"; | 2932 | rn = "YQMask"; |
| 2931 | break; | 2933 | break; |
| 2932 | case 5: | 2934 | case 5: |
| 2933 | check_insn(env, ctx, ASE_MT); | 2935 | check_insn(env, ctx, ASE_MT); |
| 2934 | - gen_mfc0_load64(t0, offsetof(CPUState, CP0_VPESchedule)); | 2936 | + gen_mfc0_load64(arg, offsetof(CPUState, CP0_VPESchedule)); |
| 2935 | rn = "VPESchedule"; | 2937 | rn = "VPESchedule"; |
| 2936 | break; | 2938 | break; |
| 2937 | case 6: | 2939 | case 6: |
| 2938 | check_insn(env, ctx, ASE_MT); | 2940 | check_insn(env, ctx, ASE_MT); |
| 2939 | - gen_mfc0_load64(t0, offsetof(CPUState, CP0_VPEScheFBack)); | 2941 | + gen_mfc0_load64(arg, offsetof(CPUState, CP0_VPEScheFBack)); |
| 2940 | rn = "VPEScheFBack"; | 2942 | rn = "VPEScheFBack"; |
| 2941 | break; | 2943 | break; |
| 2942 | case 7: | 2944 | case 7: |
| 2943 | check_insn(env, ctx, ASE_MT); | 2945 | check_insn(env, ctx, ASE_MT); |
| 2944 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEOpt)); | 2946 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEOpt)); |
| 2945 | rn = "VPEOpt"; | 2947 | rn = "VPEOpt"; |
| 2946 | break; | 2948 | break; |
| 2947 | default: | 2949 | default: |
| @@ -2951,43 +2953,43 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -2951,43 +2953,43 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 2951 | case 2: | 2953 | case 2: |
| 2952 | switch (sel) { | 2954 | switch (sel) { |
| 2953 | case 0: | 2955 | case 0: |
| 2954 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EntryLo0)); | ||
| 2955 | - tcg_gen_ext32s_tl(t0, t0); | 2956 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EntryLo0)); |
| 2957 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 2956 | rn = "EntryLo0"; | 2958 | rn = "EntryLo0"; |
| 2957 | break; | 2959 | break; |
| 2958 | case 1: | 2960 | case 1: |
| 2959 | check_insn(env, ctx, ASE_MT); | 2961 | check_insn(env, ctx, ASE_MT); |
| 2960 | - gen_helper_mfc0_tcstatus(t0); | 2962 | + gen_helper_mfc0_tcstatus(arg); |
| 2961 | rn = "TCStatus"; | 2963 | rn = "TCStatus"; |
| 2962 | break; | 2964 | break; |
| 2963 | case 2: | 2965 | case 2: |
| 2964 | check_insn(env, ctx, ASE_MT); | 2966 | check_insn(env, ctx, ASE_MT); |
| 2965 | - gen_helper_mfc0_tcbind(t0); | 2967 | + gen_helper_mfc0_tcbind(arg); |
| 2966 | rn = "TCBind"; | 2968 | rn = "TCBind"; |
| 2967 | break; | 2969 | break; |
| 2968 | case 3: | 2970 | case 3: |
| 2969 | check_insn(env, ctx, ASE_MT); | 2971 | check_insn(env, ctx, ASE_MT); |
| 2970 | - gen_helper_mfc0_tcrestart(t0); | 2972 | + gen_helper_mfc0_tcrestart(arg); |
| 2971 | rn = "TCRestart"; | 2973 | rn = "TCRestart"; |
| 2972 | break; | 2974 | break; |
| 2973 | case 4: | 2975 | case 4: |
| 2974 | check_insn(env, ctx, ASE_MT); | 2976 | check_insn(env, ctx, ASE_MT); |
| 2975 | - gen_helper_mfc0_tchalt(t0); | 2977 | + gen_helper_mfc0_tchalt(arg); |
| 2976 | rn = "TCHalt"; | 2978 | rn = "TCHalt"; |
| 2977 | break; | 2979 | break; |
| 2978 | case 5: | 2980 | case 5: |
| 2979 | check_insn(env, ctx, ASE_MT); | 2981 | check_insn(env, ctx, ASE_MT); |
| 2980 | - gen_helper_mfc0_tccontext(t0); | 2982 | + gen_helper_mfc0_tccontext(arg); |
| 2981 | rn = "TCContext"; | 2983 | rn = "TCContext"; |
| 2982 | break; | 2984 | break; |
| 2983 | case 6: | 2985 | case 6: |
| 2984 | check_insn(env, ctx, ASE_MT); | 2986 | check_insn(env, ctx, ASE_MT); |
| 2985 | - gen_helper_mfc0_tcschedule(t0); | 2987 | + gen_helper_mfc0_tcschedule(arg); |
| 2986 | rn = "TCSchedule"; | 2988 | rn = "TCSchedule"; |
| 2987 | break; | 2989 | break; |
| 2988 | case 7: | 2990 | case 7: |
| 2989 | check_insn(env, ctx, ASE_MT); | 2991 | check_insn(env, ctx, ASE_MT); |
| 2990 | - gen_helper_mfc0_tcschefback(t0); | 2992 | + gen_helper_mfc0_tcschefback(arg); |
| 2991 | rn = "TCScheFBack"; | 2993 | rn = "TCScheFBack"; |
| 2992 | break; | 2994 | break; |
| 2993 | default: | 2995 | default: |
| @@ -2997,8 +2999,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -2997,8 +2999,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 2997 | case 3: | 2999 | case 3: |
| 2998 | switch (sel) { | 3000 | switch (sel) { |
| 2999 | case 0: | 3001 | case 0: |
| 3000 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EntryLo1)); | ||
| 3001 | - tcg_gen_ext32s_tl(t0, t0); | 3002 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EntryLo1)); |
| 3003 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3002 | rn = "EntryLo1"; | 3004 | rn = "EntryLo1"; |
| 3003 | break; | 3005 | break; |
| 3004 | default: | 3006 | default: |
| @@ -3008,12 +3010,12 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3008,12 +3010,12 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3008 | case 4: | 3010 | case 4: |
| 3009 | switch (sel) { | 3011 | switch (sel) { |
| 3010 | case 0: | 3012 | case 0: |
| 3011 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_Context)); | ||
| 3012 | - tcg_gen_ext32s_tl(t0, t0); | 3013 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_Context)); |
| 3014 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3013 | rn = "Context"; | 3015 | rn = "Context"; |
| 3014 | break; | 3016 | break; |
| 3015 | case 1: | 3017 | case 1: |
| 3016 | -// gen_helper_mfc0_contextconfig(t0); /* SmartMIPS ASE */ | 3018 | +// gen_helper_mfc0_contextconfig(arg); /* SmartMIPS ASE */ |
| 3017 | rn = "ContextConfig"; | 3019 | rn = "ContextConfig"; |
| 3018 | // break; | 3020 | // break; |
| 3019 | default: | 3021 | default: |
| @@ -3023,12 +3025,12 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3023,12 +3025,12 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3023 | case 5: | 3025 | case 5: |
| 3024 | switch (sel) { | 3026 | switch (sel) { |
| 3025 | case 0: | 3027 | case 0: |
| 3026 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_PageMask)); | 3028 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_PageMask)); |
| 3027 | rn = "PageMask"; | 3029 | rn = "PageMask"; |
| 3028 | break; | 3030 | break; |
| 3029 | case 1: | 3031 | case 1: |
| 3030 | check_insn(env, ctx, ISA_MIPS32R2); | 3032 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3031 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_PageGrain)); | 3033 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_PageGrain)); |
| 3032 | rn = "PageGrain"; | 3034 | rn = "PageGrain"; |
| 3033 | break; | 3035 | break; |
| 3034 | default: | 3036 | default: |
| @@ -3038,32 +3040,32 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3038,32 +3040,32 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3038 | case 6: | 3040 | case 6: |
| 3039 | switch (sel) { | 3041 | switch (sel) { |
| 3040 | case 0: | 3042 | case 0: |
| 3041 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Wired)); | 3043 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Wired)); |
| 3042 | rn = "Wired"; | 3044 | rn = "Wired"; |
| 3043 | break; | 3045 | break; |
| 3044 | case 1: | 3046 | case 1: |
| 3045 | check_insn(env, ctx, ISA_MIPS32R2); | 3047 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3046 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf0)); | 3048 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf0)); |
| 3047 | rn = "SRSConf0"; | 3049 | rn = "SRSConf0"; |
| 3048 | break; | 3050 | break; |
| 3049 | case 2: | 3051 | case 2: |
| 3050 | check_insn(env, ctx, ISA_MIPS32R2); | 3052 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3051 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf1)); | 3053 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf1)); |
| 3052 | rn = "SRSConf1"; | 3054 | rn = "SRSConf1"; |
| 3053 | break; | 3055 | break; |
| 3054 | case 3: | 3056 | case 3: |
| 3055 | check_insn(env, ctx, ISA_MIPS32R2); | 3057 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3056 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf2)); | 3058 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf2)); |
| 3057 | rn = "SRSConf2"; | 3059 | rn = "SRSConf2"; |
| 3058 | break; | 3060 | break; |
| 3059 | case 4: | 3061 | case 4: |
| 3060 | check_insn(env, ctx, ISA_MIPS32R2); | 3062 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3061 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf3)); | 3063 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf3)); |
| 3062 | rn = "SRSConf3"; | 3064 | rn = "SRSConf3"; |
| 3063 | break; | 3065 | break; |
| 3064 | case 5: | 3066 | case 5: |
| 3065 | check_insn(env, ctx, ISA_MIPS32R2); | 3067 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3066 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf4)); | 3068 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf4)); |
| 3067 | rn = "SRSConf4"; | 3069 | rn = "SRSConf4"; |
| 3068 | break; | 3070 | break; |
| 3069 | default: | 3071 | default: |
| @@ -3074,7 +3076,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3074,7 +3076,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3074 | switch (sel) { | 3076 | switch (sel) { |
| 3075 | case 0: | 3077 | case 0: |
| 3076 | check_insn(env, ctx, ISA_MIPS32R2); | 3078 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3077 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_HWREna)); | 3079 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_HWREna)); |
| 3078 | rn = "HWREna"; | 3080 | rn = "HWREna"; |
| 3079 | break; | 3081 | break; |
| 3080 | default: | 3082 | default: |
| @@ -3084,8 +3086,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3084,8 +3086,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3084 | case 8: | 3086 | case 8: |
| 3085 | switch (sel) { | 3087 | switch (sel) { |
| 3086 | case 0: | 3088 | case 0: |
| 3087 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_BadVAddr)); | ||
| 3088 | - tcg_gen_ext32s_tl(t0, t0); | 3089 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_BadVAddr)); |
| 3090 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3089 | rn = "BadVAddr"; | 3091 | rn = "BadVAddr"; |
| 3090 | break; | 3092 | break; |
| 3091 | default: | 3093 | default: |
| @@ -3098,7 +3100,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3098,7 +3100,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3098 | /* Mark as an IO operation because we read the time. */ | 3100 | /* Mark as an IO operation because we read the time. */ |
| 3099 | if (use_icount) | 3101 | if (use_icount) |
| 3100 | gen_io_start(); | 3102 | gen_io_start(); |
| 3101 | - gen_helper_mfc0_count(t0); | 3103 | + gen_helper_mfc0_count(arg); |
| 3102 | if (use_icount) { | 3104 | if (use_icount) { |
| 3103 | gen_io_end(); | 3105 | gen_io_end(); |
| 3104 | ctx->bstate = BS_STOP; | 3106 | ctx->bstate = BS_STOP; |
| @@ -3113,8 +3115,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3113,8 +3115,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3113 | case 10: | 3115 | case 10: |
| 3114 | switch (sel) { | 3116 | switch (sel) { |
| 3115 | case 0: | 3117 | case 0: |
| 3116 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EntryHi)); | ||
| 3117 | - tcg_gen_ext32s_tl(t0, t0); | 3118 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EntryHi)); |
| 3119 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3118 | rn = "EntryHi"; | 3120 | rn = "EntryHi"; |
| 3119 | break; | 3121 | break; |
| 3120 | default: | 3122 | default: |
| @@ -3124,7 +3126,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3124,7 +3126,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3124 | case 11: | 3126 | case 11: |
| 3125 | switch (sel) { | 3127 | switch (sel) { |
| 3126 | case 0: | 3128 | case 0: |
| 3127 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Compare)); | 3129 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Compare)); |
| 3128 | rn = "Compare"; | 3130 | rn = "Compare"; |
| 3129 | break; | 3131 | break; |
| 3130 | /* 6,7 are implementation dependent */ | 3132 | /* 6,7 are implementation dependent */ |
| @@ -3135,22 +3137,22 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3135,22 +3137,22 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3135 | case 12: | 3137 | case 12: |
| 3136 | switch (sel) { | 3138 | switch (sel) { |
| 3137 | case 0: | 3139 | case 0: |
| 3138 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Status)); | 3140 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Status)); |
| 3139 | rn = "Status"; | 3141 | rn = "Status"; |
| 3140 | break; | 3142 | break; |
| 3141 | case 1: | 3143 | case 1: |
| 3142 | check_insn(env, ctx, ISA_MIPS32R2); | 3144 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3143 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_IntCtl)); | 3145 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_IntCtl)); |
| 3144 | rn = "IntCtl"; | 3146 | rn = "IntCtl"; |
| 3145 | break; | 3147 | break; |
| 3146 | case 2: | 3148 | case 2: |
| 3147 | check_insn(env, ctx, ISA_MIPS32R2); | 3149 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3148 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSCtl)); | 3150 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSCtl)); |
| 3149 | rn = "SRSCtl"; | 3151 | rn = "SRSCtl"; |
| 3150 | break; | 3152 | break; |
| 3151 | case 3: | 3153 | case 3: |
| 3152 | check_insn(env, ctx, ISA_MIPS32R2); | 3154 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3153 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSMap)); | 3155 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSMap)); |
| 3154 | rn = "SRSMap"; | 3156 | rn = "SRSMap"; |
| 3155 | break; | 3157 | break; |
| 3156 | default: | 3158 | default: |
| @@ -3160,7 +3162,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3160,7 +3162,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3160 | case 13: | 3162 | case 13: |
| 3161 | switch (sel) { | 3163 | switch (sel) { |
| 3162 | case 0: | 3164 | case 0: |
| 3163 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Cause)); | 3165 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Cause)); |
| 3164 | rn = "Cause"; | 3166 | rn = "Cause"; |
| 3165 | break; | 3167 | break; |
| 3166 | default: | 3168 | default: |
| @@ -3170,8 +3172,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3170,8 +3172,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3170 | case 14: | 3172 | case 14: |
| 3171 | switch (sel) { | 3173 | switch (sel) { |
| 3172 | case 0: | 3174 | case 0: |
| 3173 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EPC)); | ||
| 3174 | - tcg_gen_ext32s_tl(t0, t0); | 3175 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EPC)); |
| 3176 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3175 | rn = "EPC"; | 3177 | rn = "EPC"; |
| 3176 | break; | 3178 | break; |
| 3177 | default: | 3179 | default: |
| @@ -3181,12 +3183,12 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3181,12 +3183,12 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3181 | case 15: | 3183 | case 15: |
| 3182 | switch (sel) { | 3184 | switch (sel) { |
| 3183 | case 0: | 3185 | case 0: |
| 3184 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_PRid)); | 3186 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_PRid)); |
| 3185 | rn = "PRid"; | 3187 | rn = "PRid"; |
| 3186 | break; | 3188 | break; |
| 3187 | case 1: | 3189 | case 1: |
| 3188 | check_insn(env, ctx, ISA_MIPS32R2); | 3190 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3189 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_EBase)); | 3191 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_EBase)); |
| 3190 | rn = "EBase"; | 3192 | rn = "EBase"; |
| 3191 | break; | 3193 | break; |
| 3192 | default: | 3194 | default: |
| @@ -3196,29 +3198,29 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3196,29 +3198,29 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3196 | case 16: | 3198 | case 16: |
| 3197 | switch (sel) { | 3199 | switch (sel) { |
| 3198 | case 0: | 3200 | case 0: |
| 3199 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config0)); | 3201 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config0)); |
| 3200 | rn = "Config"; | 3202 | rn = "Config"; |
| 3201 | break; | 3203 | break; |
| 3202 | case 1: | 3204 | case 1: |
| 3203 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config1)); | 3205 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config1)); |
| 3204 | rn = "Config1"; | 3206 | rn = "Config1"; |
| 3205 | break; | 3207 | break; |
| 3206 | case 2: | 3208 | case 2: |
| 3207 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config2)); | 3209 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config2)); |
| 3208 | rn = "Config2"; | 3210 | rn = "Config2"; |
| 3209 | break; | 3211 | break; |
| 3210 | case 3: | 3212 | case 3: |
| 3211 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config3)); | 3213 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config3)); |
| 3212 | rn = "Config3"; | 3214 | rn = "Config3"; |
| 3213 | break; | 3215 | break; |
| 3214 | /* 4,5 are reserved */ | 3216 | /* 4,5 are reserved */ |
| 3215 | /* 6,7 are implementation dependent */ | 3217 | /* 6,7 are implementation dependent */ |
| 3216 | case 6: | 3218 | case 6: |
| 3217 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config6)); | 3219 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config6)); |
| 3218 | rn = "Config6"; | 3220 | rn = "Config6"; |
| 3219 | break; | 3221 | break; |
| 3220 | case 7: | 3222 | case 7: |
| 3221 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config7)); | 3223 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config7)); |
| 3222 | rn = "Config7"; | 3224 | rn = "Config7"; |
| 3223 | break; | 3225 | break; |
| 3224 | default: | 3226 | default: |
| @@ -3228,7 +3230,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3228,7 +3230,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3228 | case 17: | 3230 | case 17: |
| 3229 | switch (sel) { | 3231 | switch (sel) { |
| 3230 | case 0: | 3232 | case 0: |
| 3231 | - gen_helper_mfc0_lladdr(t0); | 3233 | + gen_helper_mfc0_lladdr(arg); |
| 3232 | rn = "LLAddr"; | 3234 | rn = "LLAddr"; |
| 3233 | break; | 3235 | break; |
| 3234 | default: | 3236 | default: |
| @@ -3238,7 +3240,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3238,7 +3240,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3238 | case 18: | 3240 | case 18: |
| 3239 | switch (sel) { | 3241 | switch (sel) { |
| 3240 | case 0 ... 7: | 3242 | case 0 ... 7: |
| 3241 | - gen_helper_1i(mfc0_watchlo, t0, sel); | 3243 | + gen_helper_1i(mfc0_watchlo, arg, sel); |
| 3242 | rn = "WatchLo"; | 3244 | rn = "WatchLo"; |
| 3243 | break; | 3245 | break; |
| 3244 | default: | 3246 | default: |
| @@ -3248,7 +3250,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3248,7 +3250,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3248 | case 19: | 3250 | case 19: |
| 3249 | switch (sel) { | 3251 | switch (sel) { |
| 3250 | case 0 ...7: | 3252 | case 0 ...7: |
| 3251 | - gen_helper_1i(mfc0_watchhi, t0, sel); | 3253 | + gen_helper_1i(mfc0_watchhi, arg, sel); |
| 3252 | rn = "WatchHi"; | 3254 | rn = "WatchHi"; |
| 3253 | break; | 3255 | break; |
| 3254 | default: | 3256 | default: |
| @@ -3260,8 +3262,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3260,8 +3262,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3260 | case 0: | 3262 | case 0: |
| 3261 | #if defined(TARGET_MIPS64) | 3263 | #if defined(TARGET_MIPS64) |
| 3262 | check_insn(env, ctx, ISA_MIPS3); | 3264 | check_insn(env, ctx, ISA_MIPS3); |
| 3263 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_XContext)); | ||
| 3264 | - tcg_gen_ext32s_tl(t0, t0); | 3265 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_XContext)); |
| 3266 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3265 | rn = "XContext"; | 3267 | rn = "XContext"; |
| 3266 | break; | 3268 | break; |
| 3267 | #endif | 3269 | #endif |
| @@ -3273,7 +3275,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3273,7 +3275,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3273 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ | 3275 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ |
| 3274 | switch (sel) { | 3276 | switch (sel) { |
| 3275 | case 0: | 3277 | case 0: |
| 3276 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Framemask)); | 3278 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Framemask)); |
| 3277 | rn = "Framemask"; | 3279 | rn = "Framemask"; |
| 3278 | break; | 3280 | break; |
| 3279 | default: | 3281 | default: |
| @@ -3281,29 +3283,29 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3281,29 +3283,29 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3281 | } | 3283 | } |
| 3282 | break; | 3284 | break; |
| 3283 | case 22: | 3285 | case 22: |
| 3284 | - tcg_gen_movi_tl(t0, 0); /* unimplemented */ | 3286 | + tcg_gen_movi_tl(arg, 0); /* unimplemented */ |
| 3285 | rn = "'Diagnostic"; /* implementation dependent */ | 3287 | rn = "'Diagnostic"; /* implementation dependent */ |
| 3286 | break; | 3288 | break; |
| 3287 | case 23: | 3289 | case 23: |
| 3288 | switch (sel) { | 3290 | switch (sel) { |
| 3289 | case 0: | 3291 | case 0: |
| 3290 | - gen_helper_mfc0_debug(t0); /* EJTAG support */ | 3292 | + gen_helper_mfc0_debug(arg); /* EJTAG support */ |
| 3291 | rn = "Debug"; | 3293 | rn = "Debug"; |
| 3292 | break; | 3294 | break; |
| 3293 | case 1: | 3295 | case 1: |
| 3294 | -// gen_helper_mfc0_tracecontrol(t0); /* PDtrace support */ | 3296 | +// gen_helper_mfc0_tracecontrol(arg); /* PDtrace support */ |
| 3295 | rn = "TraceControl"; | 3297 | rn = "TraceControl"; |
| 3296 | // break; | 3298 | // break; |
| 3297 | case 2: | 3299 | case 2: |
| 3298 | -// gen_helper_mfc0_tracecontrol2(t0); /* PDtrace support */ | 3300 | +// gen_helper_mfc0_tracecontrol2(arg); /* PDtrace support */ |
| 3299 | rn = "TraceControl2"; | 3301 | rn = "TraceControl2"; |
| 3300 | // break; | 3302 | // break; |
| 3301 | case 3: | 3303 | case 3: |
| 3302 | -// gen_helper_mfc0_usertracedata(t0); /* PDtrace support */ | 3304 | +// gen_helper_mfc0_usertracedata(arg); /* PDtrace support */ |
| 3303 | rn = "UserTraceData"; | 3305 | rn = "UserTraceData"; |
| 3304 | // break; | 3306 | // break; |
| 3305 | case 4: | 3307 | case 4: |
| 3306 | -// gen_helper_mfc0_tracebpc(t0); /* PDtrace support */ | 3308 | +// gen_helper_mfc0_tracebpc(arg); /* PDtrace support */ |
| 3307 | rn = "TraceBPC"; | 3309 | rn = "TraceBPC"; |
| 3308 | // break; | 3310 | // break; |
| 3309 | default: | 3311 | default: |
| @@ -3314,8 +3316,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3314,8 +3316,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3314 | switch (sel) { | 3316 | switch (sel) { |
| 3315 | case 0: | 3317 | case 0: |
| 3316 | /* EJTAG support */ | 3318 | /* EJTAG support */ |
| 3317 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_DEPC)); | ||
| 3318 | - tcg_gen_ext32s_tl(t0, t0); | 3319 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_DEPC)); |
| 3320 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3319 | rn = "DEPC"; | 3321 | rn = "DEPC"; |
| 3320 | break; | 3322 | break; |
| 3321 | default: | 3323 | default: |
| @@ -3325,35 +3327,35 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3325,35 +3327,35 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3325 | case 25: | 3327 | case 25: |
| 3326 | switch (sel) { | 3328 | switch (sel) { |
| 3327 | case 0: | 3329 | case 0: |
| 3328 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Performance0)); | 3330 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Performance0)); |
| 3329 | rn = "Performance0"; | 3331 | rn = "Performance0"; |
| 3330 | break; | 3332 | break; |
| 3331 | case 1: | 3333 | case 1: |
| 3332 | -// gen_helper_mfc0_performance1(t0); | 3334 | +// gen_helper_mfc0_performance1(arg); |
| 3333 | rn = "Performance1"; | 3335 | rn = "Performance1"; |
| 3334 | // break; | 3336 | // break; |
| 3335 | case 2: | 3337 | case 2: |
| 3336 | -// gen_helper_mfc0_performance2(t0); | 3338 | +// gen_helper_mfc0_performance2(arg); |
| 3337 | rn = "Performance2"; | 3339 | rn = "Performance2"; |
| 3338 | // break; | 3340 | // break; |
| 3339 | case 3: | 3341 | case 3: |
| 3340 | -// gen_helper_mfc0_performance3(t0); | 3342 | +// gen_helper_mfc0_performance3(arg); |
| 3341 | rn = "Performance3"; | 3343 | rn = "Performance3"; |
| 3342 | // break; | 3344 | // break; |
| 3343 | case 4: | 3345 | case 4: |
| 3344 | -// gen_helper_mfc0_performance4(t0); | 3346 | +// gen_helper_mfc0_performance4(arg); |
| 3345 | rn = "Performance4"; | 3347 | rn = "Performance4"; |
| 3346 | // break; | 3348 | // break; |
| 3347 | case 5: | 3349 | case 5: |
| 3348 | -// gen_helper_mfc0_performance5(t0); | 3350 | +// gen_helper_mfc0_performance5(arg); |
| 3349 | rn = "Performance5"; | 3351 | rn = "Performance5"; |
| 3350 | // break; | 3352 | // break; |
| 3351 | case 6: | 3353 | case 6: |
| 3352 | -// gen_helper_mfc0_performance6(t0); | 3354 | +// gen_helper_mfc0_performance6(arg); |
| 3353 | rn = "Performance6"; | 3355 | rn = "Performance6"; |
| 3354 | // break; | 3356 | // break; |
| 3355 | case 7: | 3357 | case 7: |
| 3356 | -// gen_helper_mfc0_performance7(t0); | 3358 | +// gen_helper_mfc0_performance7(arg); |
| 3357 | rn = "Performance7"; | 3359 | rn = "Performance7"; |
| 3358 | // break; | 3360 | // break; |
| 3359 | default: | 3361 | default: |
| @@ -3361,13 +3363,13 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3361,13 +3363,13 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3361 | } | 3363 | } |
| 3362 | break; | 3364 | break; |
| 3363 | case 26: | 3365 | case 26: |
| 3364 | - tcg_gen_movi_tl(t0, 0); /* unimplemented */ | 3366 | + tcg_gen_movi_tl(arg, 0); /* unimplemented */ |
| 3365 | rn = "ECC"; | 3367 | rn = "ECC"; |
| 3366 | break; | 3368 | break; |
| 3367 | case 27: | 3369 | case 27: |
| 3368 | switch (sel) { | 3370 | switch (sel) { |
| 3369 | case 0 ... 3: | 3371 | case 0 ... 3: |
| 3370 | - tcg_gen_movi_tl(t0, 0); /* unimplemented */ | 3372 | + tcg_gen_movi_tl(arg, 0); /* unimplemented */ |
| 3371 | rn = "CacheErr"; | 3373 | rn = "CacheErr"; |
| 3372 | break; | 3374 | break; |
| 3373 | default: | 3375 | default: |
| @@ -3380,14 +3382,14 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3380,14 +3382,14 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3380 | case 2: | 3382 | case 2: |
| 3381 | case 4: | 3383 | case 4: |
| 3382 | case 6: | 3384 | case 6: |
| 3383 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_TagLo)); | 3385 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_TagLo)); |
| 3384 | rn = "TagLo"; | 3386 | rn = "TagLo"; |
| 3385 | break; | 3387 | break; |
| 3386 | case 1: | 3388 | case 1: |
| 3387 | case 3: | 3389 | case 3: |
| 3388 | case 5: | 3390 | case 5: |
| 3389 | case 7: | 3391 | case 7: |
| 3390 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_DataLo)); | 3392 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_DataLo)); |
| 3391 | rn = "DataLo"; | 3393 | rn = "DataLo"; |
| 3392 | break; | 3394 | break; |
| 3393 | default: | 3395 | default: |
| @@ -3400,14 +3402,14 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3400,14 +3402,14 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3400 | case 2: | 3402 | case 2: |
| 3401 | case 4: | 3403 | case 4: |
| 3402 | case 6: | 3404 | case 6: |
| 3403 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_TagHi)); | 3405 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_TagHi)); |
| 3404 | rn = "TagHi"; | 3406 | rn = "TagHi"; |
| 3405 | break; | 3407 | break; |
| 3406 | case 1: | 3408 | case 1: |
| 3407 | case 3: | 3409 | case 3: |
| 3408 | case 5: | 3410 | case 5: |
| 3409 | case 7: | 3411 | case 7: |
| 3410 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_DataHi)); | 3412 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_DataHi)); |
| 3411 | rn = "DataHi"; | 3413 | rn = "DataHi"; |
| 3412 | break; | 3414 | break; |
| 3413 | default: | 3415 | default: |
| @@ -3417,8 +3419,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3417,8 +3419,8 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3417 | case 30: | 3419 | case 30: |
| 3418 | switch (sel) { | 3420 | switch (sel) { |
| 3419 | case 0: | 3421 | case 0: |
| 3420 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_ErrorEPC)); | ||
| 3421 | - tcg_gen_ext32s_tl(t0, t0); | 3422 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_ErrorEPC)); |
| 3423 | + tcg_gen_ext32s_tl(arg, arg); | ||
| 3422 | rn = "ErrorEPC"; | 3424 | rn = "ErrorEPC"; |
| 3423 | break; | 3425 | break; |
| 3424 | default: | 3426 | default: |
| @@ -3429,7 +3431,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3429,7 +3431,7 @@ static void gen_mfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3429 | switch (sel) { | 3431 | switch (sel) { |
| 3430 | case 0: | 3432 | case 0: |
| 3431 | /* EJTAG support */ | 3433 | /* EJTAG support */ |
| 3432 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_DESAVE)); | 3434 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_DESAVE)); |
| 3433 | rn = "DESAVE"; | 3435 | rn = "DESAVE"; |
| 3434 | break; | 3436 | break; |
| 3435 | default: | 3437 | default: |
| @@ -3447,7 +3449,7 @@ die: | @@ -3447,7 +3449,7 @@ die: | ||
| 3447 | generate_exception(ctx, EXCP_RI); | 3449 | generate_exception(ctx, EXCP_RI); |
| 3448 | } | 3450 | } |
| 3449 | 3451 | ||
| 3450 | -static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int sel) | 3452 | +static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv arg, int reg, int sel) |
| 3451 | { | 3453 | { |
| 3452 | const char *rn = "invalid"; | 3454 | const char *rn = "invalid"; |
| 3453 | 3455 | ||
| @@ -3461,12 +3463,12 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3461,12 +3463,12 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3461 | case 0: | 3463 | case 0: |
| 3462 | switch (sel) { | 3464 | switch (sel) { |
| 3463 | case 0: | 3465 | case 0: |
| 3464 | - gen_helper_mtc0_index(t0); | 3466 | + gen_helper_mtc0_index(arg); |
| 3465 | rn = "Index"; | 3467 | rn = "Index"; |
| 3466 | break; | 3468 | break; |
| 3467 | case 1: | 3469 | case 1: |
| 3468 | check_insn(env, ctx, ASE_MT); | 3470 | check_insn(env, ctx, ASE_MT); |
| 3469 | - gen_helper_mtc0_mvpcontrol(t0); | 3471 | + gen_helper_mtc0_mvpcontrol(arg); |
| 3470 | rn = "MVPControl"; | 3472 | rn = "MVPControl"; |
| 3471 | break; | 3473 | break; |
| 3472 | case 2: | 3474 | case 2: |
| @@ -3491,37 +3493,37 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3491,37 +3493,37 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3491 | break; | 3493 | break; |
| 3492 | case 1: | 3494 | case 1: |
| 3493 | check_insn(env, ctx, ASE_MT); | 3495 | check_insn(env, ctx, ASE_MT); |
| 3494 | - gen_helper_mtc0_vpecontrol(t0); | 3496 | + gen_helper_mtc0_vpecontrol(arg); |
| 3495 | rn = "VPEControl"; | 3497 | rn = "VPEControl"; |
| 3496 | break; | 3498 | break; |
| 3497 | case 2: | 3499 | case 2: |
| 3498 | check_insn(env, ctx, ASE_MT); | 3500 | check_insn(env, ctx, ASE_MT); |
| 3499 | - gen_helper_mtc0_vpeconf0(t0); | 3501 | + gen_helper_mtc0_vpeconf0(arg); |
| 3500 | rn = "VPEConf0"; | 3502 | rn = "VPEConf0"; |
| 3501 | break; | 3503 | break; |
| 3502 | case 3: | 3504 | case 3: |
| 3503 | check_insn(env, ctx, ASE_MT); | 3505 | check_insn(env, ctx, ASE_MT); |
| 3504 | - gen_helper_mtc0_vpeconf1(t0); | 3506 | + gen_helper_mtc0_vpeconf1(arg); |
| 3505 | rn = "VPEConf1"; | 3507 | rn = "VPEConf1"; |
| 3506 | break; | 3508 | break; |
| 3507 | case 4: | 3509 | case 4: |
| 3508 | check_insn(env, ctx, ASE_MT); | 3510 | check_insn(env, ctx, ASE_MT); |
| 3509 | - gen_helper_mtc0_yqmask(t0); | 3511 | + gen_helper_mtc0_yqmask(arg); |
| 3510 | rn = "YQMask"; | 3512 | rn = "YQMask"; |
| 3511 | break; | 3513 | break; |
| 3512 | case 5: | 3514 | case 5: |
| 3513 | check_insn(env, ctx, ASE_MT); | 3515 | check_insn(env, ctx, ASE_MT); |
| 3514 | - gen_mtc0_store64(t0, offsetof(CPUState, CP0_VPESchedule)); | 3516 | + gen_mtc0_store64(arg, offsetof(CPUState, CP0_VPESchedule)); |
| 3515 | rn = "VPESchedule"; | 3517 | rn = "VPESchedule"; |
| 3516 | break; | 3518 | break; |
| 3517 | case 6: | 3519 | case 6: |
| 3518 | check_insn(env, ctx, ASE_MT); | 3520 | check_insn(env, ctx, ASE_MT); |
| 3519 | - gen_mtc0_store64(t0, offsetof(CPUState, CP0_VPEScheFBack)); | 3521 | + gen_mtc0_store64(arg, offsetof(CPUState, CP0_VPEScheFBack)); |
| 3520 | rn = "VPEScheFBack"; | 3522 | rn = "VPEScheFBack"; |
| 3521 | break; | 3523 | break; |
| 3522 | case 7: | 3524 | case 7: |
| 3523 | check_insn(env, ctx, ASE_MT); | 3525 | check_insn(env, ctx, ASE_MT); |
| 3524 | - gen_helper_mtc0_vpeopt(t0); | 3526 | + gen_helper_mtc0_vpeopt(arg); |
| 3525 | rn = "VPEOpt"; | 3527 | rn = "VPEOpt"; |
| 3526 | break; | 3528 | break; |
| 3527 | default: | 3529 | default: |
| @@ -3531,42 +3533,42 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3531,42 +3533,42 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3531 | case 2: | 3533 | case 2: |
| 3532 | switch (sel) { | 3534 | switch (sel) { |
| 3533 | case 0: | 3535 | case 0: |
| 3534 | - gen_helper_mtc0_entrylo0(t0); | 3536 | + gen_helper_mtc0_entrylo0(arg); |
| 3535 | rn = "EntryLo0"; | 3537 | rn = "EntryLo0"; |
| 3536 | break; | 3538 | break; |
| 3537 | case 1: | 3539 | case 1: |
| 3538 | check_insn(env, ctx, ASE_MT); | 3540 | check_insn(env, ctx, ASE_MT); |
| 3539 | - gen_helper_mtc0_tcstatus(t0); | 3541 | + gen_helper_mtc0_tcstatus(arg); |
| 3540 | rn = "TCStatus"; | 3542 | rn = "TCStatus"; |
| 3541 | break; | 3543 | break; |
| 3542 | case 2: | 3544 | case 2: |
| 3543 | check_insn(env, ctx, ASE_MT); | 3545 | check_insn(env, ctx, ASE_MT); |
| 3544 | - gen_helper_mtc0_tcbind(t0); | 3546 | + gen_helper_mtc0_tcbind(arg); |
| 3545 | rn = "TCBind"; | 3547 | rn = "TCBind"; |
| 3546 | break; | 3548 | break; |
| 3547 | case 3: | 3549 | case 3: |
| 3548 | check_insn(env, ctx, ASE_MT); | 3550 | check_insn(env, ctx, ASE_MT); |
| 3549 | - gen_helper_mtc0_tcrestart(t0); | 3551 | + gen_helper_mtc0_tcrestart(arg); |
| 3550 | rn = "TCRestart"; | 3552 | rn = "TCRestart"; |
| 3551 | break; | 3553 | break; |
| 3552 | case 4: | 3554 | case 4: |
| 3553 | check_insn(env, ctx, ASE_MT); | 3555 | check_insn(env, ctx, ASE_MT); |
| 3554 | - gen_helper_mtc0_tchalt(t0); | 3556 | + gen_helper_mtc0_tchalt(arg); |
| 3555 | rn = "TCHalt"; | 3557 | rn = "TCHalt"; |
| 3556 | break; | 3558 | break; |
| 3557 | case 5: | 3559 | case 5: |
| 3558 | check_insn(env, ctx, ASE_MT); | 3560 | check_insn(env, ctx, ASE_MT); |
| 3559 | - gen_helper_mtc0_tccontext(t0); | 3561 | + gen_helper_mtc0_tccontext(arg); |
| 3560 | rn = "TCContext"; | 3562 | rn = "TCContext"; |
| 3561 | break; | 3563 | break; |
| 3562 | case 6: | 3564 | case 6: |
| 3563 | check_insn(env, ctx, ASE_MT); | 3565 | check_insn(env, ctx, ASE_MT); |
| 3564 | - gen_helper_mtc0_tcschedule(t0); | 3566 | + gen_helper_mtc0_tcschedule(arg); |
| 3565 | rn = "TCSchedule"; | 3567 | rn = "TCSchedule"; |
| 3566 | break; | 3568 | break; |
| 3567 | case 7: | 3569 | case 7: |
| 3568 | check_insn(env, ctx, ASE_MT); | 3570 | check_insn(env, ctx, ASE_MT); |
| 3569 | - gen_helper_mtc0_tcschefback(t0); | 3571 | + gen_helper_mtc0_tcschefback(arg); |
| 3570 | rn = "TCScheFBack"; | 3572 | rn = "TCScheFBack"; |
| 3571 | break; | 3573 | break; |
| 3572 | default: | 3574 | default: |
| @@ -3576,7 +3578,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3576,7 +3578,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3576 | case 3: | 3578 | case 3: |
| 3577 | switch (sel) { | 3579 | switch (sel) { |
| 3578 | case 0: | 3580 | case 0: |
| 3579 | - gen_helper_mtc0_entrylo1(t0); | 3581 | + gen_helper_mtc0_entrylo1(arg); |
| 3580 | rn = "EntryLo1"; | 3582 | rn = "EntryLo1"; |
| 3581 | break; | 3583 | break; |
| 3582 | default: | 3584 | default: |
| @@ -3586,11 +3588,11 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3586,11 +3588,11 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3586 | case 4: | 3588 | case 4: |
| 3587 | switch (sel) { | 3589 | switch (sel) { |
| 3588 | case 0: | 3590 | case 0: |
| 3589 | - gen_helper_mtc0_context(t0); | 3591 | + gen_helper_mtc0_context(arg); |
| 3590 | rn = "Context"; | 3592 | rn = "Context"; |
| 3591 | break; | 3593 | break; |
| 3592 | case 1: | 3594 | case 1: |
| 3593 | -// gen_helper_mtc0_contextconfig(t0); /* SmartMIPS ASE */ | 3595 | +// gen_helper_mtc0_contextconfig(arg); /* SmartMIPS ASE */ |
| 3594 | rn = "ContextConfig"; | 3596 | rn = "ContextConfig"; |
| 3595 | // break; | 3597 | // break; |
| 3596 | default: | 3598 | default: |
| @@ -3600,12 +3602,12 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3600,12 +3602,12 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3600 | case 5: | 3602 | case 5: |
| 3601 | switch (sel) { | 3603 | switch (sel) { |
| 3602 | case 0: | 3604 | case 0: |
| 3603 | - gen_helper_mtc0_pagemask(t0); | 3605 | + gen_helper_mtc0_pagemask(arg); |
| 3604 | rn = "PageMask"; | 3606 | rn = "PageMask"; |
| 3605 | break; | 3607 | break; |
| 3606 | case 1: | 3608 | case 1: |
| 3607 | check_insn(env, ctx, ISA_MIPS32R2); | 3609 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3608 | - gen_helper_mtc0_pagegrain(t0); | 3610 | + gen_helper_mtc0_pagegrain(arg); |
| 3609 | rn = "PageGrain"; | 3611 | rn = "PageGrain"; |
| 3610 | break; | 3612 | break; |
| 3611 | default: | 3613 | default: |
| @@ -3615,32 +3617,32 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3615,32 +3617,32 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3615 | case 6: | 3617 | case 6: |
| 3616 | switch (sel) { | 3618 | switch (sel) { |
| 3617 | case 0: | 3619 | case 0: |
| 3618 | - gen_helper_mtc0_wired(t0); | 3620 | + gen_helper_mtc0_wired(arg); |
| 3619 | rn = "Wired"; | 3621 | rn = "Wired"; |
| 3620 | break; | 3622 | break; |
| 3621 | case 1: | 3623 | case 1: |
| 3622 | check_insn(env, ctx, ISA_MIPS32R2); | 3624 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3623 | - gen_helper_mtc0_srsconf0(t0); | 3625 | + gen_helper_mtc0_srsconf0(arg); |
| 3624 | rn = "SRSConf0"; | 3626 | rn = "SRSConf0"; |
| 3625 | break; | 3627 | break; |
| 3626 | case 2: | 3628 | case 2: |
| 3627 | check_insn(env, ctx, ISA_MIPS32R2); | 3629 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3628 | - gen_helper_mtc0_srsconf1(t0); | 3630 | + gen_helper_mtc0_srsconf1(arg); |
| 3629 | rn = "SRSConf1"; | 3631 | rn = "SRSConf1"; |
| 3630 | break; | 3632 | break; |
| 3631 | case 3: | 3633 | case 3: |
| 3632 | check_insn(env, ctx, ISA_MIPS32R2); | 3634 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3633 | - gen_helper_mtc0_srsconf2(t0); | 3635 | + gen_helper_mtc0_srsconf2(arg); |
| 3634 | rn = "SRSConf2"; | 3636 | rn = "SRSConf2"; |
| 3635 | break; | 3637 | break; |
| 3636 | case 4: | 3638 | case 4: |
| 3637 | check_insn(env, ctx, ISA_MIPS32R2); | 3639 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3638 | - gen_helper_mtc0_srsconf3(t0); | 3640 | + gen_helper_mtc0_srsconf3(arg); |
| 3639 | rn = "SRSConf3"; | 3641 | rn = "SRSConf3"; |
| 3640 | break; | 3642 | break; |
| 3641 | case 5: | 3643 | case 5: |
| 3642 | check_insn(env, ctx, ISA_MIPS32R2); | 3644 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3643 | - gen_helper_mtc0_srsconf4(t0); | 3645 | + gen_helper_mtc0_srsconf4(arg); |
| 3644 | rn = "SRSConf4"; | 3646 | rn = "SRSConf4"; |
| 3645 | break; | 3647 | break; |
| 3646 | default: | 3648 | default: |
| @@ -3651,7 +3653,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3651,7 +3653,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3651 | switch (sel) { | 3653 | switch (sel) { |
| 3652 | case 0: | 3654 | case 0: |
| 3653 | check_insn(env, ctx, ISA_MIPS32R2); | 3655 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3654 | - gen_helper_mtc0_hwrena(t0); | 3656 | + gen_helper_mtc0_hwrena(arg); |
| 3655 | rn = "HWREna"; | 3657 | rn = "HWREna"; |
| 3656 | break; | 3658 | break; |
| 3657 | default: | 3659 | default: |
| @@ -3665,7 +3667,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3665,7 +3667,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3665 | case 9: | 3667 | case 9: |
| 3666 | switch (sel) { | 3668 | switch (sel) { |
| 3667 | case 0: | 3669 | case 0: |
| 3668 | - gen_helper_mtc0_count(t0); | 3670 | + gen_helper_mtc0_count(arg); |
| 3669 | rn = "Count"; | 3671 | rn = "Count"; |
| 3670 | break; | 3672 | break; |
| 3671 | /* 6,7 are implementation dependent */ | 3673 | /* 6,7 are implementation dependent */ |
| @@ -3676,7 +3678,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3676,7 +3678,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3676 | case 10: | 3678 | case 10: |
| 3677 | switch (sel) { | 3679 | switch (sel) { |
| 3678 | case 0: | 3680 | case 0: |
| 3679 | - gen_helper_mtc0_entryhi(t0); | 3681 | + gen_helper_mtc0_entryhi(arg); |
| 3680 | rn = "EntryHi"; | 3682 | rn = "EntryHi"; |
| 3681 | break; | 3683 | break; |
| 3682 | default: | 3684 | default: |
| @@ -3686,7 +3688,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3686,7 +3688,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3686 | case 11: | 3688 | case 11: |
| 3687 | switch (sel) { | 3689 | switch (sel) { |
| 3688 | case 0: | 3690 | case 0: |
| 3689 | - gen_helper_mtc0_compare(t0); | 3691 | + gen_helper_mtc0_compare(arg); |
| 3690 | rn = "Compare"; | 3692 | rn = "Compare"; |
| 3691 | break; | 3693 | break; |
| 3692 | /* 6,7 are implementation dependent */ | 3694 | /* 6,7 are implementation dependent */ |
| @@ -3698,7 +3700,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3698,7 +3700,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3698 | switch (sel) { | 3700 | switch (sel) { |
| 3699 | case 0: | 3701 | case 0: |
| 3700 | save_cpu_state(ctx, 1); | 3702 | save_cpu_state(ctx, 1); |
| 3701 | - gen_helper_mtc0_status(t0); | 3703 | + gen_helper_mtc0_status(arg); |
| 3702 | /* BS_STOP isn't good enough here, hflags may have changed. */ | 3704 | /* BS_STOP isn't good enough here, hflags may have changed. */ |
| 3703 | gen_save_pc(ctx->pc + 4); | 3705 | gen_save_pc(ctx->pc + 4); |
| 3704 | ctx->bstate = BS_EXCP; | 3706 | ctx->bstate = BS_EXCP; |
| @@ -3706,21 +3708,21 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3706,21 +3708,21 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3706 | break; | 3708 | break; |
| 3707 | case 1: | 3709 | case 1: |
| 3708 | check_insn(env, ctx, ISA_MIPS32R2); | 3710 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3709 | - gen_helper_mtc0_intctl(t0); | 3711 | + gen_helper_mtc0_intctl(arg); |
| 3710 | /* Stop translation as we may have switched the execution mode */ | 3712 | /* Stop translation as we may have switched the execution mode */ |
| 3711 | ctx->bstate = BS_STOP; | 3713 | ctx->bstate = BS_STOP; |
| 3712 | rn = "IntCtl"; | 3714 | rn = "IntCtl"; |
| 3713 | break; | 3715 | break; |
| 3714 | case 2: | 3716 | case 2: |
| 3715 | check_insn(env, ctx, ISA_MIPS32R2); | 3717 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3716 | - gen_helper_mtc0_srsctl(t0); | 3718 | + gen_helper_mtc0_srsctl(arg); |
| 3717 | /* Stop translation as we may have switched the execution mode */ | 3719 | /* Stop translation as we may have switched the execution mode */ |
| 3718 | ctx->bstate = BS_STOP; | 3720 | ctx->bstate = BS_STOP; |
| 3719 | rn = "SRSCtl"; | 3721 | rn = "SRSCtl"; |
| 3720 | break; | 3722 | break; |
| 3721 | case 3: | 3723 | case 3: |
| 3722 | check_insn(env, ctx, ISA_MIPS32R2); | 3724 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3723 | - gen_mtc0_store32(t0, offsetof(CPUState, CP0_SRSMap)); | 3725 | + gen_mtc0_store32(arg, offsetof(CPUState, CP0_SRSMap)); |
| 3724 | /* Stop translation as we may have switched the execution mode */ | 3726 | /* Stop translation as we may have switched the execution mode */ |
| 3725 | ctx->bstate = BS_STOP; | 3727 | ctx->bstate = BS_STOP; |
| 3726 | rn = "SRSMap"; | 3728 | rn = "SRSMap"; |
| @@ -3733,7 +3735,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3733,7 +3735,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3733 | switch (sel) { | 3735 | switch (sel) { |
| 3734 | case 0: | 3736 | case 0: |
| 3735 | save_cpu_state(ctx, 1); | 3737 | save_cpu_state(ctx, 1); |
| 3736 | - gen_helper_mtc0_cause(t0); | 3738 | + gen_helper_mtc0_cause(arg); |
| 3737 | rn = "Cause"; | 3739 | rn = "Cause"; |
| 3738 | break; | 3740 | break; |
| 3739 | default: | 3741 | default: |
| @@ -3743,7 +3745,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3743,7 +3745,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3743 | case 14: | 3745 | case 14: |
| 3744 | switch (sel) { | 3746 | switch (sel) { |
| 3745 | case 0: | 3747 | case 0: |
| 3746 | - gen_mtc0_store64(t0, offsetof(CPUState, CP0_EPC)); | 3748 | + gen_mtc0_store64(arg, offsetof(CPUState, CP0_EPC)); |
| 3747 | rn = "EPC"; | 3749 | rn = "EPC"; |
| 3748 | break; | 3750 | break; |
| 3749 | default: | 3751 | default: |
| @@ -3758,7 +3760,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3758,7 +3760,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3758 | break; | 3760 | break; |
| 3759 | case 1: | 3761 | case 1: |
| 3760 | check_insn(env, ctx, ISA_MIPS32R2); | 3762 | check_insn(env, ctx, ISA_MIPS32R2); |
| 3761 | - gen_helper_mtc0_ebase(t0); | 3763 | + gen_helper_mtc0_ebase(arg); |
| 3762 | rn = "EBase"; | 3764 | rn = "EBase"; |
| 3763 | break; | 3765 | break; |
| 3764 | default: | 3766 | default: |
| @@ -3768,7 +3770,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3768,7 +3770,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3768 | case 16: | 3770 | case 16: |
| 3769 | switch (sel) { | 3771 | switch (sel) { |
| 3770 | case 0: | 3772 | case 0: |
| 3771 | - gen_helper_mtc0_config0(t0); | 3773 | + gen_helper_mtc0_config0(arg); |
| 3772 | rn = "Config"; | 3774 | rn = "Config"; |
| 3773 | /* Stop translation as we may have switched the execution mode */ | 3775 | /* Stop translation as we may have switched the execution mode */ |
| 3774 | ctx->bstate = BS_STOP; | 3776 | ctx->bstate = BS_STOP; |
| @@ -3778,7 +3780,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3778,7 +3780,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3778 | rn = "Config1"; | 3780 | rn = "Config1"; |
| 3779 | break; | 3781 | break; |
| 3780 | case 2: | 3782 | case 2: |
| 3781 | - gen_helper_mtc0_config2(t0); | 3783 | + gen_helper_mtc0_config2(arg); |
| 3782 | rn = "Config2"; | 3784 | rn = "Config2"; |
| 3783 | /* Stop translation as we may have switched the execution mode */ | 3785 | /* Stop translation as we may have switched the execution mode */ |
| 3784 | ctx->bstate = BS_STOP; | 3786 | ctx->bstate = BS_STOP; |
| @@ -3815,7 +3817,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3815,7 +3817,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3815 | case 18: | 3817 | case 18: |
| 3816 | switch (sel) { | 3818 | switch (sel) { |
| 3817 | case 0 ... 7: | 3819 | case 0 ... 7: |
| 3818 | - gen_helper_1i(mtc0_watchlo, t0, sel); | 3820 | + gen_helper_1i(mtc0_watchlo, arg, sel); |
| 3819 | rn = "WatchLo"; | 3821 | rn = "WatchLo"; |
| 3820 | break; | 3822 | break; |
| 3821 | default: | 3823 | default: |
| @@ -3825,7 +3827,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3825,7 +3827,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3825 | case 19: | 3827 | case 19: |
| 3826 | switch (sel) { | 3828 | switch (sel) { |
| 3827 | case 0 ... 7: | 3829 | case 0 ... 7: |
| 3828 | - gen_helper_1i(mtc0_watchhi, t0, sel); | 3830 | + gen_helper_1i(mtc0_watchhi, arg, sel); |
| 3829 | rn = "WatchHi"; | 3831 | rn = "WatchHi"; |
| 3830 | break; | 3832 | break; |
| 3831 | default: | 3833 | default: |
| @@ -3837,7 +3839,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3837,7 +3839,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3837 | case 0: | 3839 | case 0: |
| 3838 | #if defined(TARGET_MIPS64) | 3840 | #if defined(TARGET_MIPS64) |
| 3839 | check_insn(env, ctx, ISA_MIPS3); | 3841 | check_insn(env, ctx, ISA_MIPS3); |
| 3840 | - gen_helper_mtc0_xcontext(t0); | 3842 | + gen_helper_mtc0_xcontext(arg); |
| 3841 | rn = "XContext"; | 3843 | rn = "XContext"; |
| 3842 | break; | 3844 | break; |
| 3843 | #endif | 3845 | #endif |
| @@ -3849,7 +3851,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3849,7 +3851,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3849 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ | 3851 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ |
| 3850 | switch (sel) { | 3852 | switch (sel) { |
| 3851 | case 0: | 3853 | case 0: |
| 3852 | - gen_helper_mtc0_framemask(t0); | 3854 | + gen_helper_mtc0_framemask(arg); |
| 3853 | rn = "Framemask"; | 3855 | rn = "Framemask"; |
| 3854 | break; | 3856 | break; |
| 3855 | default: | 3857 | default: |
| @@ -3863,20 +3865,20 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3863,20 +3865,20 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3863 | case 23: | 3865 | case 23: |
| 3864 | switch (sel) { | 3866 | switch (sel) { |
| 3865 | case 0: | 3867 | case 0: |
| 3866 | - gen_helper_mtc0_debug(t0); /* EJTAG support */ | 3868 | + gen_helper_mtc0_debug(arg); /* EJTAG support */ |
| 3867 | /* BS_STOP isn't good enough here, hflags may have changed. */ | 3869 | /* BS_STOP isn't good enough here, hflags may have changed. */ |
| 3868 | gen_save_pc(ctx->pc + 4); | 3870 | gen_save_pc(ctx->pc + 4); |
| 3869 | ctx->bstate = BS_EXCP; | 3871 | ctx->bstate = BS_EXCP; |
| 3870 | rn = "Debug"; | 3872 | rn = "Debug"; |
| 3871 | break; | 3873 | break; |
| 3872 | case 1: | 3874 | case 1: |
| 3873 | -// gen_helper_mtc0_tracecontrol(t0); /* PDtrace support */ | 3875 | +// gen_helper_mtc0_tracecontrol(arg); /* PDtrace support */ |
| 3874 | rn = "TraceControl"; | 3876 | rn = "TraceControl"; |
| 3875 | /* Stop translation as we may have switched the execution mode */ | 3877 | /* Stop translation as we may have switched the execution mode */ |
| 3876 | ctx->bstate = BS_STOP; | 3878 | ctx->bstate = BS_STOP; |
| 3877 | // break; | 3879 | // break; |
| 3878 | case 2: | 3880 | case 2: |
| 3879 | -// gen_helper_mtc0_tracecontrol2(t0); /* PDtrace support */ | 3881 | +// gen_helper_mtc0_tracecontrol2(arg); /* PDtrace support */ |
| 3880 | rn = "TraceControl2"; | 3882 | rn = "TraceControl2"; |
| 3881 | /* Stop translation as we may have switched the execution mode */ | 3883 | /* Stop translation as we may have switched the execution mode */ |
| 3882 | ctx->bstate = BS_STOP; | 3884 | ctx->bstate = BS_STOP; |
| @@ -3884,13 +3886,13 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3884,13 +3886,13 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3884 | case 3: | 3886 | case 3: |
| 3885 | /* Stop translation as we may have switched the execution mode */ | 3887 | /* Stop translation as we may have switched the execution mode */ |
| 3886 | ctx->bstate = BS_STOP; | 3888 | ctx->bstate = BS_STOP; |
| 3887 | -// gen_helper_mtc0_usertracedata(t0); /* PDtrace support */ | 3889 | +// gen_helper_mtc0_usertracedata(arg); /* PDtrace support */ |
| 3888 | rn = "UserTraceData"; | 3890 | rn = "UserTraceData"; |
| 3889 | /* Stop translation as we may have switched the execution mode */ | 3891 | /* Stop translation as we may have switched the execution mode */ |
| 3890 | ctx->bstate = BS_STOP; | 3892 | ctx->bstate = BS_STOP; |
| 3891 | // break; | 3893 | // break; |
| 3892 | case 4: | 3894 | case 4: |
| 3893 | -// gen_helper_mtc0_tracebpc(t0); /* PDtrace support */ | 3895 | +// gen_helper_mtc0_tracebpc(arg); /* PDtrace support */ |
| 3894 | /* Stop translation as we may have switched the execution mode */ | 3896 | /* Stop translation as we may have switched the execution mode */ |
| 3895 | ctx->bstate = BS_STOP; | 3897 | ctx->bstate = BS_STOP; |
| 3896 | rn = "TraceBPC"; | 3898 | rn = "TraceBPC"; |
| @@ -3903,7 +3905,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3903,7 +3905,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3903 | switch (sel) { | 3905 | switch (sel) { |
| 3904 | case 0: | 3906 | case 0: |
| 3905 | /* EJTAG support */ | 3907 | /* EJTAG support */ |
| 3906 | - gen_mtc0_store64(t0, offsetof(CPUState, CP0_DEPC)); | 3908 | + gen_mtc0_store64(arg, offsetof(CPUState, CP0_DEPC)); |
| 3907 | rn = "DEPC"; | 3909 | rn = "DEPC"; |
| 3908 | break; | 3910 | break; |
| 3909 | default: | 3911 | default: |
| @@ -3913,35 +3915,35 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3913,35 +3915,35 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3913 | case 25: | 3915 | case 25: |
| 3914 | switch (sel) { | 3916 | switch (sel) { |
| 3915 | case 0: | 3917 | case 0: |
| 3916 | - gen_helper_mtc0_performance0(t0); | 3918 | + gen_helper_mtc0_performance0(arg); |
| 3917 | rn = "Performance0"; | 3919 | rn = "Performance0"; |
| 3918 | break; | 3920 | break; |
| 3919 | case 1: | 3921 | case 1: |
| 3920 | -// gen_helper_mtc0_performance1(t0); | 3922 | +// gen_helper_mtc0_performance1(arg); |
| 3921 | rn = "Performance1"; | 3923 | rn = "Performance1"; |
| 3922 | // break; | 3924 | // break; |
| 3923 | case 2: | 3925 | case 2: |
| 3924 | -// gen_helper_mtc0_performance2(t0); | 3926 | +// gen_helper_mtc0_performance2(arg); |
| 3925 | rn = "Performance2"; | 3927 | rn = "Performance2"; |
| 3926 | // break; | 3928 | // break; |
| 3927 | case 3: | 3929 | case 3: |
| 3928 | -// gen_helper_mtc0_performance3(t0); | 3930 | +// gen_helper_mtc0_performance3(arg); |
| 3929 | rn = "Performance3"; | 3931 | rn = "Performance3"; |
| 3930 | // break; | 3932 | // break; |
| 3931 | case 4: | 3933 | case 4: |
| 3932 | -// gen_helper_mtc0_performance4(t0); | 3934 | +// gen_helper_mtc0_performance4(arg); |
| 3933 | rn = "Performance4"; | 3935 | rn = "Performance4"; |
| 3934 | // break; | 3936 | // break; |
| 3935 | case 5: | 3937 | case 5: |
| 3936 | -// gen_helper_mtc0_performance5(t0); | 3938 | +// gen_helper_mtc0_performance5(arg); |
| 3937 | rn = "Performance5"; | 3939 | rn = "Performance5"; |
| 3938 | // break; | 3940 | // break; |
| 3939 | case 6: | 3941 | case 6: |
| 3940 | -// gen_helper_mtc0_performance6(t0); | 3942 | +// gen_helper_mtc0_performance6(arg); |
| 3941 | rn = "Performance6"; | 3943 | rn = "Performance6"; |
| 3942 | // break; | 3944 | // break; |
| 3943 | case 7: | 3945 | case 7: |
| 3944 | -// gen_helper_mtc0_performance7(t0); | 3946 | +// gen_helper_mtc0_performance7(arg); |
| 3945 | rn = "Performance7"; | 3947 | rn = "Performance7"; |
| 3946 | // break; | 3948 | // break; |
| 3947 | default: | 3949 | default: |
| @@ -3968,14 +3970,14 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3968,14 +3970,14 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3968 | case 2: | 3970 | case 2: |
| 3969 | case 4: | 3971 | case 4: |
| 3970 | case 6: | 3972 | case 6: |
| 3971 | - gen_helper_mtc0_taglo(t0); | 3973 | + gen_helper_mtc0_taglo(arg); |
| 3972 | rn = "TagLo"; | 3974 | rn = "TagLo"; |
| 3973 | break; | 3975 | break; |
| 3974 | case 1: | 3976 | case 1: |
| 3975 | case 3: | 3977 | case 3: |
| 3976 | case 5: | 3978 | case 5: |
| 3977 | case 7: | 3979 | case 7: |
| 3978 | - gen_helper_mtc0_datalo(t0); | 3980 | + gen_helper_mtc0_datalo(arg); |
| 3979 | rn = "DataLo"; | 3981 | rn = "DataLo"; |
| 3980 | break; | 3982 | break; |
| 3981 | default: | 3983 | default: |
| @@ -3988,14 +3990,14 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -3988,14 +3990,14 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 3988 | case 2: | 3990 | case 2: |
| 3989 | case 4: | 3991 | case 4: |
| 3990 | case 6: | 3992 | case 6: |
| 3991 | - gen_helper_mtc0_taghi(t0); | 3993 | + gen_helper_mtc0_taghi(arg); |
| 3992 | rn = "TagHi"; | 3994 | rn = "TagHi"; |
| 3993 | break; | 3995 | break; |
| 3994 | case 1: | 3996 | case 1: |
| 3995 | case 3: | 3997 | case 3: |
| 3996 | case 5: | 3998 | case 5: |
| 3997 | case 7: | 3999 | case 7: |
| 3998 | - gen_helper_mtc0_datahi(t0); | 4000 | + gen_helper_mtc0_datahi(arg); |
| 3999 | rn = "DataHi"; | 4001 | rn = "DataHi"; |
| 4000 | break; | 4002 | break; |
| 4001 | default: | 4003 | default: |
| @@ -4006,7 +4008,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -4006,7 +4008,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 4006 | case 30: | 4008 | case 30: |
| 4007 | switch (sel) { | 4009 | switch (sel) { |
| 4008 | case 0: | 4010 | case 0: |
| 4009 | - gen_mtc0_store64(t0, offsetof(CPUState, CP0_ErrorEPC)); | 4011 | + gen_mtc0_store64(arg, offsetof(CPUState, CP0_ErrorEPC)); |
| 4010 | rn = "ErrorEPC"; | 4012 | rn = "ErrorEPC"; |
| 4011 | break; | 4013 | break; |
| 4012 | default: | 4014 | default: |
| @@ -4017,7 +4019,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | @@ -4017,7 +4019,7 @@ static void gen_mtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int se | ||
| 4017 | switch (sel) { | 4019 | switch (sel) { |
| 4018 | case 0: | 4020 | case 0: |
| 4019 | /* EJTAG support */ | 4021 | /* EJTAG support */ |
| 4020 | - gen_mtc0_store32(t0, offsetof(CPUState, CP0_DESAVE)); | 4022 | + gen_mtc0_store32(arg, offsetof(CPUState, CP0_DESAVE)); |
| 4021 | rn = "DESAVE"; | 4023 | rn = "DESAVE"; |
| 4022 | break; | 4024 | break; |
| 4023 | default: | 4025 | default: |
| @@ -4043,7 +4045,7 @@ die: | @@ -4043,7 +4045,7 @@ die: | ||
| 4043 | } | 4045 | } |
| 4044 | 4046 | ||
| 4045 | #if defined(TARGET_MIPS64) | 4047 | #if defined(TARGET_MIPS64) |
| 4046 | -static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int sel) | 4048 | +static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv arg, int reg, int sel) |
| 4047 | { | 4049 | { |
| 4048 | const char *rn = "invalid"; | 4050 | const char *rn = "invalid"; |
| 4049 | 4051 | ||
| @@ -4054,22 +4056,22 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4054,22 +4056,22 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4054 | case 0: | 4056 | case 0: |
| 4055 | switch (sel) { | 4057 | switch (sel) { |
| 4056 | case 0: | 4058 | case 0: |
| 4057 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Index)); | 4059 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Index)); |
| 4058 | rn = "Index"; | 4060 | rn = "Index"; |
| 4059 | break; | 4061 | break; |
| 4060 | case 1: | 4062 | case 1: |
| 4061 | check_insn(env, ctx, ASE_MT); | 4063 | check_insn(env, ctx, ASE_MT); |
| 4062 | - gen_helper_mfc0_mvpcontrol(t0); | 4064 | + gen_helper_mfc0_mvpcontrol(arg); |
| 4063 | rn = "MVPControl"; | 4065 | rn = "MVPControl"; |
| 4064 | break; | 4066 | break; |
| 4065 | case 2: | 4067 | case 2: |
| 4066 | check_insn(env, ctx, ASE_MT); | 4068 | check_insn(env, ctx, ASE_MT); |
| 4067 | - gen_helper_mfc0_mvpconf0(t0); | 4069 | + gen_helper_mfc0_mvpconf0(arg); |
| 4068 | rn = "MVPConf0"; | 4070 | rn = "MVPConf0"; |
| 4069 | break; | 4071 | break; |
| 4070 | case 3: | 4072 | case 3: |
| 4071 | check_insn(env, ctx, ASE_MT); | 4073 | check_insn(env, ctx, ASE_MT); |
| 4072 | - gen_helper_mfc0_mvpconf1(t0); | 4074 | + gen_helper_mfc0_mvpconf1(arg); |
| 4073 | rn = "MVPConf1"; | 4075 | rn = "MVPConf1"; |
| 4074 | break; | 4076 | break; |
| 4075 | default: | 4077 | default: |
| @@ -4079,42 +4081,42 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4079,42 +4081,42 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4079 | case 1: | 4081 | case 1: |
| 4080 | switch (sel) { | 4082 | switch (sel) { |
| 4081 | case 0: | 4083 | case 0: |
| 4082 | - gen_helper_mfc0_random(t0); | 4084 | + gen_helper_mfc0_random(arg); |
| 4083 | rn = "Random"; | 4085 | rn = "Random"; |
| 4084 | break; | 4086 | break; |
| 4085 | case 1: | 4087 | case 1: |
| 4086 | check_insn(env, ctx, ASE_MT); | 4088 | check_insn(env, ctx, ASE_MT); |
| 4087 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEControl)); | 4089 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEControl)); |
| 4088 | rn = "VPEControl"; | 4090 | rn = "VPEControl"; |
| 4089 | break; | 4091 | break; |
| 4090 | case 2: | 4092 | case 2: |
| 4091 | check_insn(env, ctx, ASE_MT); | 4093 | check_insn(env, ctx, ASE_MT); |
| 4092 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEConf0)); | 4094 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEConf0)); |
| 4093 | rn = "VPEConf0"; | 4095 | rn = "VPEConf0"; |
| 4094 | break; | 4096 | break; |
| 4095 | case 3: | 4097 | case 3: |
| 4096 | check_insn(env, ctx, ASE_MT); | 4098 | check_insn(env, ctx, ASE_MT); |
| 4097 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEConf1)); | 4099 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEConf1)); |
| 4098 | rn = "VPEConf1"; | 4100 | rn = "VPEConf1"; |
| 4099 | break; | 4101 | break; |
| 4100 | case 4: | 4102 | case 4: |
| 4101 | check_insn(env, ctx, ASE_MT); | 4103 | check_insn(env, ctx, ASE_MT); |
| 4102 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_YQMask)); | 4104 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_YQMask)); |
| 4103 | rn = "YQMask"; | 4105 | rn = "YQMask"; |
| 4104 | break; | 4106 | break; |
| 4105 | case 5: | 4107 | case 5: |
| 4106 | check_insn(env, ctx, ASE_MT); | 4108 | check_insn(env, ctx, ASE_MT); |
| 4107 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_VPESchedule)); | 4109 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_VPESchedule)); |
| 4108 | rn = "VPESchedule"; | 4110 | rn = "VPESchedule"; |
| 4109 | break; | 4111 | break; |
| 4110 | case 6: | 4112 | case 6: |
| 4111 | check_insn(env, ctx, ASE_MT); | 4113 | check_insn(env, ctx, ASE_MT); |
| 4112 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_VPEScheFBack)); | 4114 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_VPEScheFBack)); |
| 4113 | rn = "VPEScheFBack"; | 4115 | rn = "VPEScheFBack"; |
| 4114 | break; | 4116 | break; |
| 4115 | case 7: | 4117 | case 7: |
| 4116 | check_insn(env, ctx, ASE_MT); | 4118 | check_insn(env, ctx, ASE_MT); |
| 4117 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_VPEOpt)); | 4119 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_VPEOpt)); |
| 4118 | rn = "VPEOpt"; | 4120 | rn = "VPEOpt"; |
| 4119 | break; | 4121 | break; |
| 4120 | default: | 4122 | default: |
| @@ -4124,42 +4126,42 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4124,42 +4126,42 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4124 | case 2: | 4126 | case 2: |
| 4125 | switch (sel) { | 4127 | switch (sel) { |
| 4126 | case 0: | 4128 | case 0: |
| 4127 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EntryLo0)); | 4129 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EntryLo0)); |
| 4128 | rn = "EntryLo0"; | 4130 | rn = "EntryLo0"; |
| 4129 | break; | 4131 | break; |
| 4130 | case 1: | 4132 | case 1: |
| 4131 | check_insn(env, ctx, ASE_MT); | 4133 | check_insn(env, ctx, ASE_MT); |
| 4132 | - gen_helper_mfc0_tcstatus(t0); | 4134 | + gen_helper_mfc0_tcstatus(arg); |
| 4133 | rn = "TCStatus"; | 4135 | rn = "TCStatus"; |
| 4134 | break; | 4136 | break; |
| 4135 | case 2: | 4137 | case 2: |
| 4136 | check_insn(env, ctx, ASE_MT); | 4138 | check_insn(env, ctx, ASE_MT); |
| 4137 | - gen_helper_mfc0_tcbind(t0); | 4139 | + gen_helper_mfc0_tcbind(arg); |
| 4138 | rn = "TCBind"; | 4140 | rn = "TCBind"; |
| 4139 | break; | 4141 | break; |
| 4140 | case 3: | 4142 | case 3: |
| 4141 | check_insn(env, ctx, ASE_MT); | 4143 | check_insn(env, ctx, ASE_MT); |
| 4142 | - gen_helper_dmfc0_tcrestart(t0); | 4144 | + gen_helper_dmfc0_tcrestart(arg); |
| 4143 | rn = "TCRestart"; | 4145 | rn = "TCRestart"; |
| 4144 | break; | 4146 | break; |
| 4145 | case 4: | 4147 | case 4: |
| 4146 | check_insn(env, ctx, ASE_MT); | 4148 | check_insn(env, ctx, ASE_MT); |
| 4147 | - gen_helper_dmfc0_tchalt(t0); | 4149 | + gen_helper_dmfc0_tchalt(arg); |
| 4148 | rn = "TCHalt"; | 4150 | rn = "TCHalt"; |
| 4149 | break; | 4151 | break; |
| 4150 | case 5: | 4152 | case 5: |
| 4151 | check_insn(env, ctx, ASE_MT); | 4153 | check_insn(env, ctx, ASE_MT); |
| 4152 | - gen_helper_dmfc0_tccontext(t0); | 4154 | + gen_helper_dmfc0_tccontext(arg); |
| 4153 | rn = "TCContext"; | 4155 | rn = "TCContext"; |
| 4154 | break; | 4156 | break; |
| 4155 | case 6: | 4157 | case 6: |
| 4156 | check_insn(env, ctx, ASE_MT); | 4158 | check_insn(env, ctx, ASE_MT); |
| 4157 | - gen_helper_dmfc0_tcschedule(t0); | 4159 | + gen_helper_dmfc0_tcschedule(arg); |
| 4158 | rn = "TCSchedule"; | 4160 | rn = "TCSchedule"; |
| 4159 | break; | 4161 | break; |
| 4160 | case 7: | 4162 | case 7: |
| 4161 | check_insn(env, ctx, ASE_MT); | 4163 | check_insn(env, ctx, ASE_MT); |
| 4162 | - gen_helper_dmfc0_tcschefback(t0); | 4164 | + gen_helper_dmfc0_tcschefback(arg); |
| 4163 | rn = "TCScheFBack"; | 4165 | rn = "TCScheFBack"; |
| 4164 | break; | 4166 | break; |
| 4165 | default: | 4167 | default: |
| @@ -4169,7 +4171,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4169,7 +4171,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4169 | case 3: | 4171 | case 3: |
| 4170 | switch (sel) { | 4172 | switch (sel) { |
| 4171 | case 0: | 4173 | case 0: |
| 4172 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EntryLo1)); | 4174 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EntryLo1)); |
| 4173 | rn = "EntryLo1"; | 4175 | rn = "EntryLo1"; |
| 4174 | break; | 4176 | break; |
| 4175 | default: | 4177 | default: |
| @@ -4179,11 +4181,11 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4179,11 +4181,11 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4179 | case 4: | 4181 | case 4: |
| 4180 | switch (sel) { | 4182 | switch (sel) { |
| 4181 | case 0: | 4183 | case 0: |
| 4182 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_Context)); | 4184 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_Context)); |
| 4183 | rn = "Context"; | 4185 | rn = "Context"; |
| 4184 | break; | 4186 | break; |
| 4185 | case 1: | 4187 | case 1: |
| 4186 | -// gen_helper_dmfc0_contextconfig(t0); /* SmartMIPS ASE */ | 4188 | +// gen_helper_dmfc0_contextconfig(arg); /* SmartMIPS ASE */ |
| 4187 | rn = "ContextConfig"; | 4189 | rn = "ContextConfig"; |
| 4188 | // break; | 4190 | // break; |
| 4189 | default: | 4191 | default: |
| @@ -4193,12 +4195,12 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4193,12 +4195,12 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4193 | case 5: | 4195 | case 5: |
| 4194 | switch (sel) { | 4196 | switch (sel) { |
| 4195 | case 0: | 4197 | case 0: |
| 4196 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_PageMask)); | 4198 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_PageMask)); |
| 4197 | rn = "PageMask"; | 4199 | rn = "PageMask"; |
| 4198 | break; | 4200 | break; |
| 4199 | case 1: | 4201 | case 1: |
| 4200 | check_insn(env, ctx, ISA_MIPS32R2); | 4202 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4201 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_PageGrain)); | 4203 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_PageGrain)); |
| 4202 | rn = "PageGrain"; | 4204 | rn = "PageGrain"; |
| 4203 | break; | 4205 | break; |
| 4204 | default: | 4206 | default: |
| @@ -4208,32 +4210,32 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4208,32 +4210,32 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4208 | case 6: | 4210 | case 6: |
| 4209 | switch (sel) { | 4211 | switch (sel) { |
| 4210 | case 0: | 4212 | case 0: |
| 4211 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Wired)); | 4213 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Wired)); |
| 4212 | rn = "Wired"; | 4214 | rn = "Wired"; |
| 4213 | break; | 4215 | break; |
| 4214 | case 1: | 4216 | case 1: |
| 4215 | check_insn(env, ctx, ISA_MIPS32R2); | 4217 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4216 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf0)); | 4218 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf0)); |
| 4217 | rn = "SRSConf0"; | 4219 | rn = "SRSConf0"; |
| 4218 | break; | 4220 | break; |
| 4219 | case 2: | 4221 | case 2: |
| 4220 | check_insn(env, ctx, ISA_MIPS32R2); | 4222 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4221 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf1)); | 4223 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf1)); |
| 4222 | rn = "SRSConf1"; | 4224 | rn = "SRSConf1"; |
| 4223 | break; | 4225 | break; |
| 4224 | case 3: | 4226 | case 3: |
| 4225 | check_insn(env, ctx, ISA_MIPS32R2); | 4227 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4226 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf2)); | 4228 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf2)); |
| 4227 | rn = "SRSConf2"; | 4229 | rn = "SRSConf2"; |
| 4228 | break; | 4230 | break; |
| 4229 | case 4: | 4231 | case 4: |
| 4230 | check_insn(env, ctx, ISA_MIPS32R2); | 4232 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4231 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf3)); | 4233 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf3)); |
| 4232 | rn = "SRSConf3"; | 4234 | rn = "SRSConf3"; |
| 4233 | break; | 4235 | break; |
| 4234 | case 5: | 4236 | case 5: |
| 4235 | check_insn(env, ctx, ISA_MIPS32R2); | 4237 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4236 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSConf4)); | 4238 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSConf4)); |
| 4237 | rn = "SRSConf4"; | 4239 | rn = "SRSConf4"; |
| 4238 | break; | 4240 | break; |
| 4239 | default: | 4241 | default: |
| @@ -4244,7 +4246,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4244,7 +4246,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4244 | switch (sel) { | 4246 | switch (sel) { |
| 4245 | case 0: | 4247 | case 0: |
| 4246 | check_insn(env, ctx, ISA_MIPS32R2); | 4248 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4247 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_HWREna)); | 4249 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_HWREna)); |
| 4248 | rn = "HWREna"; | 4250 | rn = "HWREna"; |
| 4249 | break; | 4251 | break; |
| 4250 | default: | 4252 | default: |
| @@ -4254,7 +4256,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4254,7 +4256,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4254 | case 8: | 4256 | case 8: |
| 4255 | switch (sel) { | 4257 | switch (sel) { |
| 4256 | case 0: | 4258 | case 0: |
| 4257 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_BadVAddr)); | 4259 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_BadVAddr)); |
| 4258 | rn = "BadVAddr"; | 4260 | rn = "BadVAddr"; |
| 4259 | break; | 4261 | break; |
| 4260 | default: | 4262 | default: |
| @@ -4267,7 +4269,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4267,7 +4269,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4267 | /* Mark as an IO operation because we read the time. */ | 4269 | /* Mark as an IO operation because we read the time. */ |
| 4268 | if (use_icount) | 4270 | if (use_icount) |
| 4269 | gen_io_start(); | 4271 | gen_io_start(); |
| 4270 | - gen_helper_mfc0_count(t0); | 4272 | + gen_helper_mfc0_count(arg); |
| 4271 | if (use_icount) { | 4273 | if (use_icount) { |
| 4272 | gen_io_end(); | 4274 | gen_io_end(); |
| 4273 | ctx->bstate = BS_STOP; | 4275 | ctx->bstate = BS_STOP; |
| @@ -4282,7 +4284,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4282,7 +4284,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4282 | case 10: | 4284 | case 10: |
| 4283 | switch (sel) { | 4285 | switch (sel) { |
| 4284 | case 0: | 4286 | case 0: |
| 4285 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EntryHi)); | 4287 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EntryHi)); |
| 4286 | rn = "EntryHi"; | 4288 | rn = "EntryHi"; |
| 4287 | break; | 4289 | break; |
| 4288 | default: | 4290 | default: |
| @@ -4292,7 +4294,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4292,7 +4294,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4292 | case 11: | 4294 | case 11: |
| 4293 | switch (sel) { | 4295 | switch (sel) { |
| 4294 | case 0: | 4296 | case 0: |
| 4295 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Compare)); | 4297 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Compare)); |
| 4296 | rn = "Compare"; | 4298 | rn = "Compare"; |
| 4297 | break; | 4299 | break; |
| 4298 | /* 6,7 are implementation dependent */ | 4300 | /* 6,7 are implementation dependent */ |
| @@ -4303,22 +4305,22 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4303,22 +4305,22 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4303 | case 12: | 4305 | case 12: |
| 4304 | switch (sel) { | 4306 | switch (sel) { |
| 4305 | case 0: | 4307 | case 0: |
| 4306 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Status)); | 4308 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Status)); |
| 4307 | rn = "Status"; | 4309 | rn = "Status"; |
| 4308 | break; | 4310 | break; |
| 4309 | case 1: | 4311 | case 1: |
| 4310 | check_insn(env, ctx, ISA_MIPS32R2); | 4312 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4311 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_IntCtl)); | 4313 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_IntCtl)); |
| 4312 | rn = "IntCtl"; | 4314 | rn = "IntCtl"; |
| 4313 | break; | 4315 | break; |
| 4314 | case 2: | 4316 | case 2: |
| 4315 | check_insn(env, ctx, ISA_MIPS32R2); | 4317 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4316 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSCtl)); | 4318 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSCtl)); |
| 4317 | rn = "SRSCtl"; | 4319 | rn = "SRSCtl"; |
| 4318 | break; | 4320 | break; |
| 4319 | case 3: | 4321 | case 3: |
| 4320 | check_insn(env, ctx, ISA_MIPS32R2); | 4322 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4321 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_SRSMap)); | 4323 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_SRSMap)); |
| 4322 | rn = "SRSMap"; | 4324 | rn = "SRSMap"; |
| 4323 | break; | 4325 | break; |
| 4324 | default: | 4326 | default: |
| @@ -4328,7 +4330,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4328,7 +4330,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4328 | case 13: | 4330 | case 13: |
| 4329 | switch (sel) { | 4331 | switch (sel) { |
| 4330 | case 0: | 4332 | case 0: |
| 4331 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Cause)); | 4333 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Cause)); |
| 4332 | rn = "Cause"; | 4334 | rn = "Cause"; |
| 4333 | break; | 4335 | break; |
| 4334 | default: | 4336 | default: |
| @@ -4338,7 +4340,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4338,7 +4340,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4338 | case 14: | 4340 | case 14: |
| 4339 | switch (sel) { | 4341 | switch (sel) { |
| 4340 | case 0: | 4342 | case 0: |
| 4341 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_EPC)); | 4343 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_EPC)); |
| 4342 | rn = "EPC"; | 4344 | rn = "EPC"; |
| 4343 | break; | 4345 | break; |
| 4344 | default: | 4346 | default: |
| @@ -4348,12 +4350,12 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4348,12 +4350,12 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4348 | case 15: | 4350 | case 15: |
| 4349 | switch (sel) { | 4351 | switch (sel) { |
| 4350 | case 0: | 4352 | case 0: |
| 4351 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_PRid)); | 4353 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_PRid)); |
| 4352 | rn = "PRid"; | 4354 | rn = "PRid"; |
| 4353 | break; | 4355 | break; |
| 4354 | case 1: | 4356 | case 1: |
| 4355 | check_insn(env, ctx, ISA_MIPS32R2); | 4357 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4356 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_EBase)); | 4358 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_EBase)); |
| 4357 | rn = "EBase"; | 4359 | rn = "EBase"; |
| 4358 | break; | 4360 | break; |
| 4359 | default: | 4361 | default: |
| @@ -4363,28 +4365,28 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4363,28 +4365,28 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4363 | case 16: | 4365 | case 16: |
| 4364 | switch (sel) { | 4366 | switch (sel) { |
| 4365 | case 0: | 4367 | case 0: |
| 4366 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config0)); | 4368 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config0)); |
| 4367 | rn = "Config"; | 4369 | rn = "Config"; |
| 4368 | break; | 4370 | break; |
| 4369 | case 1: | 4371 | case 1: |
| 4370 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config1)); | 4372 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config1)); |
| 4371 | rn = "Config1"; | 4373 | rn = "Config1"; |
| 4372 | break; | 4374 | break; |
| 4373 | case 2: | 4375 | case 2: |
| 4374 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config2)); | 4376 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config2)); |
| 4375 | rn = "Config2"; | 4377 | rn = "Config2"; |
| 4376 | break; | 4378 | break; |
| 4377 | case 3: | 4379 | case 3: |
| 4378 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config3)); | 4380 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config3)); |
| 4379 | rn = "Config3"; | 4381 | rn = "Config3"; |
| 4380 | break; | 4382 | break; |
| 4381 | /* 6,7 are implementation dependent */ | 4383 | /* 6,7 are implementation dependent */ |
| 4382 | case 6: | 4384 | case 6: |
| 4383 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config6)); | 4385 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config6)); |
| 4384 | rn = "Config6"; | 4386 | rn = "Config6"; |
| 4385 | break; | 4387 | break; |
| 4386 | case 7: | 4388 | case 7: |
| 4387 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Config7)); | 4389 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Config7)); |
| 4388 | rn = "Config7"; | 4390 | rn = "Config7"; |
| 4389 | break; | 4391 | break; |
| 4390 | default: | 4392 | default: |
| @@ -4394,7 +4396,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4394,7 +4396,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4394 | case 17: | 4396 | case 17: |
| 4395 | switch (sel) { | 4397 | switch (sel) { |
| 4396 | case 0: | 4398 | case 0: |
| 4397 | - gen_helper_dmfc0_lladdr(t0); | 4399 | + gen_helper_dmfc0_lladdr(arg); |
| 4398 | rn = "LLAddr"; | 4400 | rn = "LLAddr"; |
| 4399 | break; | 4401 | break; |
| 4400 | default: | 4402 | default: |
| @@ -4404,7 +4406,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4404,7 +4406,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4404 | case 18: | 4406 | case 18: |
| 4405 | switch (sel) { | 4407 | switch (sel) { |
| 4406 | case 0 ... 7: | 4408 | case 0 ... 7: |
| 4407 | - gen_helper_1i(dmfc0_watchlo, t0, sel); | 4409 | + gen_helper_1i(dmfc0_watchlo, arg, sel); |
| 4408 | rn = "WatchLo"; | 4410 | rn = "WatchLo"; |
| 4409 | break; | 4411 | break; |
| 4410 | default: | 4412 | default: |
| @@ -4414,7 +4416,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4414,7 +4416,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4414 | case 19: | 4416 | case 19: |
| 4415 | switch (sel) { | 4417 | switch (sel) { |
| 4416 | case 0 ... 7: | 4418 | case 0 ... 7: |
| 4417 | - gen_helper_1i(mfc0_watchhi, t0, sel); | 4419 | + gen_helper_1i(mfc0_watchhi, arg, sel); |
| 4418 | rn = "WatchHi"; | 4420 | rn = "WatchHi"; |
| 4419 | break; | 4421 | break; |
| 4420 | default: | 4422 | default: |
| @@ -4425,7 +4427,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4425,7 +4427,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4425 | switch (sel) { | 4427 | switch (sel) { |
| 4426 | case 0: | 4428 | case 0: |
| 4427 | check_insn(env, ctx, ISA_MIPS3); | 4429 | check_insn(env, ctx, ISA_MIPS3); |
| 4428 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_XContext)); | 4430 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_XContext)); |
| 4429 | rn = "XContext"; | 4431 | rn = "XContext"; |
| 4430 | break; | 4432 | break; |
| 4431 | default: | 4433 | default: |
| @@ -4436,7 +4438,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4436,7 +4438,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4436 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ | 4438 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ |
| 4437 | switch (sel) { | 4439 | switch (sel) { |
| 4438 | case 0: | 4440 | case 0: |
| 4439 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Framemask)); | 4441 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Framemask)); |
| 4440 | rn = "Framemask"; | 4442 | rn = "Framemask"; |
| 4441 | break; | 4443 | break; |
| 4442 | default: | 4444 | default: |
| @@ -4444,29 +4446,29 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4444,29 +4446,29 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4444 | } | 4446 | } |
| 4445 | break; | 4447 | break; |
| 4446 | case 22: | 4448 | case 22: |
| 4447 | - tcg_gen_movi_tl(t0, 0); /* unimplemented */ | 4449 | + tcg_gen_movi_tl(arg, 0); /* unimplemented */ |
| 4448 | rn = "'Diagnostic"; /* implementation dependent */ | 4450 | rn = "'Diagnostic"; /* implementation dependent */ |
| 4449 | break; | 4451 | break; |
| 4450 | case 23: | 4452 | case 23: |
| 4451 | switch (sel) { | 4453 | switch (sel) { |
| 4452 | case 0: | 4454 | case 0: |
| 4453 | - gen_helper_mfc0_debug(t0); /* EJTAG support */ | 4455 | + gen_helper_mfc0_debug(arg); /* EJTAG support */ |
| 4454 | rn = "Debug"; | 4456 | rn = "Debug"; |
| 4455 | break; | 4457 | break; |
| 4456 | case 1: | 4458 | case 1: |
| 4457 | -// gen_helper_dmfc0_tracecontrol(t0); /* PDtrace support */ | 4459 | +// gen_helper_dmfc0_tracecontrol(arg); /* PDtrace support */ |
| 4458 | rn = "TraceControl"; | 4460 | rn = "TraceControl"; |
| 4459 | // break; | 4461 | // break; |
| 4460 | case 2: | 4462 | case 2: |
| 4461 | -// gen_helper_dmfc0_tracecontrol2(t0); /* PDtrace support */ | 4463 | +// gen_helper_dmfc0_tracecontrol2(arg); /* PDtrace support */ |
| 4462 | rn = "TraceControl2"; | 4464 | rn = "TraceControl2"; |
| 4463 | // break; | 4465 | // break; |
| 4464 | case 3: | 4466 | case 3: |
| 4465 | -// gen_helper_dmfc0_usertracedata(t0); /* PDtrace support */ | 4467 | +// gen_helper_dmfc0_usertracedata(arg); /* PDtrace support */ |
| 4466 | rn = "UserTraceData"; | 4468 | rn = "UserTraceData"; |
| 4467 | // break; | 4469 | // break; |
| 4468 | case 4: | 4470 | case 4: |
| 4469 | -// gen_helper_dmfc0_tracebpc(t0); /* PDtrace support */ | 4471 | +// gen_helper_dmfc0_tracebpc(arg); /* PDtrace support */ |
| 4470 | rn = "TraceBPC"; | 4472 | rn = "TraceBPC"; |
| 4471 | // break; | 4473 | // break; |
| 4472 | default: | 4474 | default: |
| @@ -4477,7 +4479,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4477,7 +4479,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4477 | switch (sel) { | 4479 | switch (sel) { |
| 4478 | case 0: | 4480 | case 0: |
| 4479 | /* EJTAG support */ | 4481 | /* EJTAG support */ |
| 4480 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_DEPC)); | 4482 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_DEPC)); |
| 4481 | rn = "DEPC"; | 4483 | rn = "DEPC"; |
| 4482 | break; | 4484 | break; |
| 4483 | default: | 4485 | default: |
| @@ -4487,35 +4489,35 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4487,35 +4489,35 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4487 | case 25: | 4489 | case 25: |
| 4488 | switch (sel) { | 4490 | switch (sel) { |
| 4489 | case 0: | 4491 | case 0: |
| 4490 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_Performance0)); | 4492 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_Performance0)); |
| 4491 | rn = "Performance0"; | 4493 | rn = "Performance0"; |
| 4492 | break; | 4494 | break; |
| 4493 | case 1: | 4495 | case 1: |
| 4494 | -// gen_helper_dmfc0_performance1(t0); | 4496 | +// gen_helper_dmfc0_performance1(arg); |
| 4495 | rn = "Performance1"; | 4497 | rn = "Performance1"; |
| 4496 | // break; | 4498 | // break; |
| 4497 | case 2: | 4499 | case 2: |
| 4498 | -// gen_helper_dmfc0_performance2(t0); | 4500 | +// gen_helper_dmfc0_performance2(arg); |
| 4499 | rn = "Performance2"; | 4501 | rn = "Performance2"; |
| 4500 | // break; | 4502 | // break; |
| 4501 | case 3: | 4503 | case 3: |
| 4502 | -// gen_helper_dmfc0_performance3(t0); | 4504 | +// gen_helper_dmfc0_performance3(arg); |
| 4503 | rn = "Performance3"; | 4505 | rn = "Performance3"; |
| 4504 | // break; | 4506 | // break; |
| 4505 | case 4: | 4507 | case 4: |
| 4506 | -// gen_helper_dmfc0_performance4(t0); | 4508 | +// gen_helper_dmfc0_performance4(arg); |
| 4507 | rn = "Performance4"; | 4509 | rn = "Performance4"; |
| 4508 | // break; | 4510 | // break; |
| 4509 | case 5: | 4511 | case 5: |
| 4510 | -// gen_helper_dmfc0_performance5(t0); | 4512 | +// gen_helper_dmfc0_performance5(arg); |
| 4511 | rn = "Performance5"; | 4513 | rn = "Performance5"; |
| 4512 | // break; | 4514 | // break; |
| 4513 | case 6: | 4515 | case 6: |
| 4514 | -// gen_helper_dmfc0_performance6(t0); | 4516 | +// gen_helper_dmfc0_performance6(arg); |
| 4515 | rn = "Performance6"; | 4517 | rn = "Performance6"; |
| 4516 | // break; | 4518 | // break; |
| 4517 | case 7: | 4519 | case 7: |
| 4518 | -// gen_helper_dmfc0_performance7(t0); | 4520 | +// gen_helper_dmfc0_performance7(arg); |
| 4519 | rn = "Performance7"; | 4521 | rn = "Performance7"; |
| 4520 | // break; | 4522 | // break; |
| 4521 | default: | 4523 | default: |
| @@ -4523,14 +4525,14 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4523,14 +4525,14 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4523 | } | 4525 | } |
| 4524 | break; | 4526 | break; |
| 4525 | case 26: | 4527 | case 26: |
| 4526 | - tcg_gen_movi_tl(t0, 0); /* unimplemented */ | 4528 | + tcg_gen_movi_tl(arg, 0); /* unimplemented */ |
| 4527 | rn = "ECC"; | 4529 | rn = "ECC"; |
| 4528 | break; | 4530 | break; |
| 4529 | case 27: | 4531 | case 27: |
| 4530 | switch (sel) { | 4532 | switch (sel) { |
| 4531 | /* ignored */ | 4533 | /* ignored */ |
| 4532 | case 0 ... 3: | 4534 | case 0 ... 3: |
| 4533 | - tcg_gen_movi_tl(t0, 0); /* unimplemented */ | 4535 | + tcg_gen_movi_tl(arg, 0); /* unimplemented */ |
| 4534 | rn = "CacheErr"; | 4536 | rn = "CacheErr"; |
| 4535 | break; | 4537 | break; |
| 4536 | default: | 4538 | default: |
| @@ -4543,14 +4545,14 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4543,14 +4545,14 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4543 | case 2: | 4545 | case 2: |
| 4544 | case 4: | 4546 | case 4: |
| 4545 | case 6: | 4547 | case 6: |
| 4546 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_TagLo)); | 4548 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_TagLo)); |
| 4547 | rn = "TagLo"; | 4549 | rn = "TagLo"; |
| 4548 | break; | 4550 | break; |
| 4549 | case 1: | 4551 | case 1: |
| 4550 | case 3: | 4552 | case 3: |
| 4551 | case 5: | 4553 | case 5: |
| 4552 | case 7: | 4554 | case 7: |
| 4553 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_DataLo)); | 4555 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_DataLo)); |
| 4554 | rn = "DataLo"; | 4556 | rn = "DataLo"; |
| 4555 | break; | 4557 | break; |
| 4556 | default: | 4558 | default: |
| @@ -4563,14 +4565,14 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4563,14 +4565,14 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4563 | case 2: | 4565 | case 2: |
| 4564 | case 4: | 4566 | case 4: |
| 4565 | case 6: | 4567 | case 6: |
| 4566 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_TagHi)); | 4568 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_TagHi)); |
| 4567 | rn = "TagHi"; | 4569 | rn = "TagHi"; |
| 4568 | break; | 4570 | break; |
| 4569 | case 1: | 4571 | case 1: |
| 4570 | case 3: | 4572 | case 3: |
| 4571 | case 5: | 4573 | case 5: |
| 4572 | case 7: | 4574 | case 7: |
| 4573 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_DataHi)); | 4575 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_DataHi)); |
| 4574 | rn = "DataHi"; | 4576 | rn = "DataHi"; |
| 4575 | break; | 4577 | break; |
| 4576 | default: | 4578 | default: |
| @@ -4580,7 +4582,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4580,7 +4582,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4580 | case 30: | 4582 | case 30: |
| 4581 | switch (sel) { | 4583 | switch (sel) { |
| 4582 | case 0: | 4584 | case 0: |
| 4583 | - tcg_gen_ld_tl(t0, cpu_env, offsetof(CPUState, CP0_ErrorEPC)); | 4585 | + tcg_gen_ld_tl(arg, cpu_env, offsetof(CPUState, CP0_ErrorEPC)); |
| 4584 | rn = "ErrorEPC"; | 4586 | rn = "ErrorEPC"; |
| 4585 | break; | 4587 | break; |
| 4586 | default: | 4588 | default: |
| @@ -4591,7 +4593,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4591,7 +4593,7 @@ static void gen_dmfc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4591 | switch (sel) { | 4593 | switch (sel) { |
| 4592 | case 0: | 4594 | case 0: |
| 4593 | /* EJTAG support */ | 4595 | /* EJTAG support */ |
| 4594 | - gen_mfc0_load32(t0, offsetof(CPUState, CP0_DESAVE)); | 4596 | + gen_mfc0_load32(arg, offsetof(CPUState, CP0_DESAVE)); |
| 4595 | rn = "DESAVE"; | 4597 | rn = "DESAVE"; |
| 4596 | break; | 4598 | break; |
| 4597 | default: | 4599 | default: |
| @@ -4609,7 +4611,7 @@ die: | @@ -4609,7 +4611,7 @@ die: | ||
| 4609 | generate_exception(ctx, EXCP_RI); | 4611 | generate_exception(ctx, EXCP_RI); |
| 4610 | } | 4612 | } |
| 4611 | 4613 | ||
| 4612 | -static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int sel) | 4614 | +static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv arg, int reg, int sel) |
| 4613 | { | 4615 | { |
| 4614 | const char *rn = "invalid"; | 4616 | const char *rn = "invalid"; |
| 4615 | 4617 | ||
| @@ -4623,12 +4625,12 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4623,12 +4625,12 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4623 | case 0: | 4625 | case 0: |
| 4624 | switch (sel) { | 4626 | switch (sel) { |
| 4625 | case 0: | 4627 | case 0: |
| 4626 | - gen_helper_mtc0_index(t0); | 4628 | + gen_helper_mtc0_index(arg); |
| 4627 | rn = "Index"; | 4629 | rn = "Index"; |
| 4628 | break; | 4630 | break; |
| 4629 | case 1: | 4631 | case 1: |
| 4630 | check_insn(env, ctx, ASE_MT); | 4632 | check_insn(env, ctx, ASE_MT); |
| 4631 | - gen_helper_mtc0_mvpcontrol(t0); | 4633 | + gen_helper_mtc0_mvpcontrol(arg); |
| 4632 | rn = "MVPControl"; | 4634 | rn = "MVPControl"; |
| 4633 | break; | 4635 | break; |
| 4634 | case 2: | 4636 | case 2: |
| @@ -4653,37 +4655,37 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4653,37 +4655,37 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4653 | break; | 4655 | break; |
| 4654 | case 1: | 4656 | case 1: |
| 4655 | check_insn(env, ctx, ASE_MT); | 4657 | check_insn(env, ctx, ASE_MT); |
| 4656 | - gen_helper_mtc0_vpecontrol(t0); | 4658 | + gen_helper_mtc0_vpecontrol(arg); |
| 4657 | rn = "VPEControl"; | 4659 | rn = "VPEControl"; |
| 4658 | break; | 4660 | break; |
| 4659 | case 2: | 4661 | case 2: |
| 4660 | check_insn(env, ctx, ASE_MT); | 4662 | check_insn(env, ctx, ASE_MT); |
| 4661 | - gen_helper_mtc0_vpeconf0(t0); | 4663 | + gen_helper_mtc0_vpeconf0(arg); |
| 4662 | rn = "VPEConf0"; | 4664 | rn = "VPEConf0"; |
| 4663 | break; | 4665 | break; |
| 4664 | case 3: | 4666 | case 3: |
| 4665 | check_insn(env, ctx, ASE_MT); | 4667 | check_insn(env, ctx, ASE_MT); |
| 4666 | - gen_helper_mtc0_vpeconf1(t0); | 4668 | + gen_helper_mtc0_vpeconf1(arg); |
| 4667 | rn = "VPEConf1"; | 4669 | rn = "VPEConf1"; |
| 4668 | break; | 4670 | break; |
| 4669 | case 4: | 4671 | case 4: |
| 4670 | check_insn(env, ctx, ASE_MT); | 4672 | check_insn(env, ctx, ASE_MT); |
| 4671 | - gen_helper_mtc0_yqmask(t0); | 4673 | + gen_helper_mtc0_yqmask(arg); |
| 4672 | rn = "YQMask"; | 4674 | rn = "YQMask"; |
| 4673 | break; | 4675 | break; |
| 4674 | case 5: | 4676 | case 5: |
| 4675 | check_insn(env, ctx, ASE_MT); | 4677 | check_insn(env, ctx, ASE_MT); |
| 4676 | - tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, CP0_VPESchedule)); | 4678 | + tcg_gen_st_tl(arg, cpu_env, offsetof(CPUState, CP0_VPESchedule)); |
| 4677 | rn = "VPESchedule"; | 4679 | rn = "VPESchedule"; |
| 4678 | break; | 4680 | break; |
| 4679 | case 6: | 4681 | case 6: |
| 4680 | check_insn(env, ctx, ASE_MT); | 4682 | check_insn(env, ctx, ASE_MT); |
| 4681 | - tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, CP0_VPEScheFBack)); | 4683 | + tcg_gen_st_tl(arg, cpu_env, offsetof(CPUState, CP0_VPEScheFBack)); |
| 4682 | rn = "VPEScheFBack"; | 4684 | rn = "VPEScheFBack"; |
| 4683 | break; | 4685 | break; |
| 4684 | case 7: | 4686 | case 7: |
| 4685 | check_insn(env, ctx, ASE_MT); | 4687 | check_insn(env, ctx, ASE_MT); |
| 4686 | - gen_helper_mtc0_vpeopt(t0); | 4688 | + gen_helper_mtc0_vpeopt(arg); |
| 4687 | rn = "VPEOpt"; | 4689 | rn = "VPEOpt"; |
| 4688 | break; | 4690 | break; |
| 4689 | default: | 4691 | default: |
| @@ -4693,42 +4695,42 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4693,42 +4695,42 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4693 | case 2: | 4695 | case 2: |
| 4694 | switch (sel) { | 4696 | switch (sel) { |
| 4695 | case 0: | 4697 | case 0: |
| 4696 | - gen_helper_mtc0_entrylo0(t0); | 4698 | + gen_helper_mtc0_entrylo0(arg); |
| 4697 | rn = "EntryLo0"; | 4699 | rn = "EntryLo0"; |
| 4698 | break; | 4700 | break; |
| 4699 | case 1: | 4701 | case 1: |
| 4700 | check_insn(env, ctx, ASE_MT); | 4702 | check_insn(env, ctx, ASE_MT); |
| 4701 | - gen_helper_mtc0_tcstatus(t0); | 4703 | + gen_helper_mtc0_tcstatus(arg); |
| 4702 | rn = "TCStatus"; | 4704 | rn = "TCStatus"; |
| 4703 | break; | 4705 | break; |
| 4704 | case 2: | 4706 | case 2: |
| 4705 | check_insn(env, ctx, ASE_MT); | 4707 | check_insn(env, ctx, ASE_MT); |
| 4706 | - gen_helper_mtc0_tcbind(t0); | 4708 | + gen_helper_mtc0_tcbind(arg); |
| 4707 | rn = "TCBind"; | 4709 | rn = "TCBind"; |
| 4708 | break; | 4710 | break; |
| 4709 | case 3: | 4711 | case 3: |
| 4710 | check_insn(env, ctx, ASE_MT); | 4712 | check_insn(env, ctx, ASE_MT); |
| 4711 | - gen_helper_mtc0_tcrestart(t0); | 4713 | + gen_helper_mtc0_tcrestart(arg); |
| 4712 | rn = "TCRestart"; | 4714 | rn = "TCRestart"; |
| 4713 | break; | 4715 | break; |
| 4714 | case 4: | 4716 | case 4: |
| 4715 | check_insn(env, ctx, ASE_MT); | 4717 | check_insn(env, ctx, ASE_MT); |
| 4716 | - gen_helper_mtc0_tchalt(t0); | 4718 | + gen_helper_mtc0_tchalt(arg); |
| 4717 | rn = "TCHalt"; | 4719 | rn = "TCHalt"; |
| 4718 | break; | 4720 | break; |
| 4719 | case 5: | 4721 | case 5: |
| 4720 | check_insn(env, ctx, ASE_MT); | 4722 | check_insn(env, ctx, ASE_MT); |
| 4721 | - gen_helper_mtc0_tccontext(t0); | 4723 | + gen_helper_mtc0_tccontext(arg); |
| 4722 | rn = "TCContext"; | 4724 | rn = "TCContext"; |
| 4723 | break; | 4725 | break; |
| 4724 | case 6: | 4726 | case 6: |
| 4725 | check_insn(env, ctx, ASE_MT); | 4727 | check_insn(env, ctx, ASE_MT); |
| 4726 | - gen_helper_mtc0_tcschedule(t0); | 4728 | + gen_helper_mtc0_tcschedule(arg); |
| 4727 | rn = "TCSchedule"; | 4729 | rn = "TCSchedule"; |
| 4728 | break; | 4730 | break; |
| 4729 | case 7: | 4731 | case 7: |
| 4730 | check_insn(env, ctx, ASE_MT); | 4732 | check_insn(env, ctx, ASE_MT); |
| 4731 | - gen_helper_mtc0_tcschefback(t0); | 4733 | + gen_helper_mtc0_tcschefback(arg); |
| 4732 | rn = "TCScheFBack"; | 4734 | rn = "TCScheFBack"; |
| 4733 | break; | 4735 | break; |
| 4734 | default: | 4736 | default: |
| @@ -4738,7 +4740,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4738,7 +4740,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4738 | case 3: | 4740 | case 3: |
| 4739 | switch (sel) { | 4741 | switch (sel) { |
| 4740 | case 0: | 4742 | case 0: |
| 4741 | - gen_helper_mtc0_entrylo1(t0); | 4743 | + gen_helper_mtc0_entrylo1(arg); |
| 4742 | rn = "EntryLo1"; | 4744 | rn = "EntryLo1"; |
| 4743 | break; | 4745 | break; |
| 4744 | default: | 4746 | default: |
| @@ -4748,11 +4750,11 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4748,11 +4750,11 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4748 | case 4: | 4750 | case 4: |
| 4749 | switch (sel) { | 4751 | switch (sel) { |
| 4750 | case 0: | 4752 | case 0: |
| 4751 | - gen_helper_mtc0_context(t0); | 4753 | + gen_helper_mtc0_context(arg); |
| 4752 | rn = "Context"; | 4754 | rn = "Context"; |
| 4753 | break; | 4755 | break; |
| 4754 | case 1: | 4756 | case 1: |
| 4755 | -// gen_helper_mtc0_contextconfig(t0); /* SmartMIPS ASE */ | 4757 | +// gen_helper_mtc0_contextconfig(arg); /* SmartMIPS ASE */ |
| 4756 | rn = "ContextConfig"; | 4758 | rn = "ContextConfig"; |
| 4757 | // break; | 4759 | // break; |
| 4758 | default: | 4760 | default: |
| @@ -4762,12 +4764,12 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4762,12 +4764,12 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4762 | case 5: | 4764 | case 5: |
| 4763 | switch (sel) { | 4765 | switch (sel) { |
| 4764 | case 0: | 4766 | case 0: |
| 4765 | - gen_helper_mtc0_pagemask(t0); | 4767 | + gen_helper_mtc0_pagemask(arg); |
| 4766 | rn = "PageMask"; | 4768 | rn = "PageMask"; |
| 4767 | break; | 4769 | break; |
| 4768 | case 1: | 4770 | case 1: |
| 4769 | check_insn(env, ctx, ISA_MIPS32R2); | 4771 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4770 | - gen_helper_mtc0_pagegrain(t0); | 4772 | + gen_helper_mtc0_pagegrain(arg); |
| 4771 | rn = "PageGrain"; | 4773 | rn = "PageGrain"; |
| 4772 | break; | 4774 | break; |
| 4773 | default: | 4775 | default: |
| @@ -4777,32 +4779,32 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4777,32 +4779,32 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4777 | case 6: | 4779 | case 6: |
| 4778 | switch (sel) { | 4780 | switch (sel) { |
| 4779 | case 0: | 4781 | case 0: |
| 4780 | - gen_helper_mtc0_wired(t0); | 4782 | + gen_helper_mtc0_wired(arg); |
| 4781 | rn = "Wired"; | 4783 | rn = "Wired"; |
| 4782 | break; | 4784 | break; |
| 4783 | case 1: | 4785 | case 1: |
| 4784 | check_insn(env, ctx, ISA_MIPS32R2); | 4786 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4785 | - gen_helper_mtc0_srsconf0(t0); | 4787 | + gen_helper_mtc0_srsconf0(arg); |
| 4786 | rn = "SRSConf0"; | 4788 | rn = "SRSConf0"; |
| 4787 | break; | 4789 | break; |
| 4788 | case 2: | 4790 | case 2: |
| 4789 | check_insn(env, ctx, ISA_MIPS32R2); | 4791 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4790 | - gen_helper_mtc0_srsconf1(t0); | 4792 | + gen_helper_mtc0_srsconf1(arg); |
| 4791 | rn = "SRSConf1"; | 4793 | rn = "SRSConf1"; |
| 4792 | break; | 4794 | break; |
| 4793 | case 3: | 4795 | case 3: |
| 4794 | check_insn(env, ctx, ISA_MIPS32R2); | 4796 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4795 | - gen_helper_mtc0_srsconf2(t0); | 4797 | + gen_helper_mtc0_srsconf2(arg); |
| 4796 | rn = "SRSConf2"; | 4798 | rn = "SRSConf2"; |
| 4797 | break; | 4799 | break; |
| 4798 | case 4: | 4800 | case 4: |
| 4799 | check_insn(env, ctx, ISA_MIPS32R2); | 4801 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4800 | - gen_helper_mtc0_srsconf3(t0); | 4802 | + gen_helper_mtc0_srsconf3(arg); |
| 4801 | rn = "SRSConf3"; | 4803 | rn = "SRSConf3"; |
| 4802 | break; | 4804 | break; |
| 4803 | case 5: | 4805 | case 5: |
| 4804 | check_insn(env, ctx, ISA_MIPS32R2); | 4806 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4805 | - gen_helper_mtc0_srsconf4(t0); | 4807 | + gen_helper_mtc0_srsconf4(arg); |
| 4806 | rn = "SRSConf4"; | 4808 | rn = "SRSConf4"; |
| 4807 | break; | 4809 | break; |
| 4808 | default: | 4810 | default: |
| @@ -4813,7 +4815,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4813,7 +4815,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4813 | switch (sel) { | 4815 | switch (sel) { |
| 4814 | case 0: | 4816 | case 0: |
| 4815 | check_insn(env, ctx, ISA_MIPS32R2); | 4817 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4816 | - gen_helper_mtc0_hwrena(t0); | 4818 | + gen_helper_mtc0_hwrena(arg); |
| 4817 | rn = "HWREna"; | 4819 | rn = "HWREna"; |
| 4818 | break; | 4820 | break; |
| 4819 | default: | 4821 | default: |
| @@ -4827,7 +4829,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4827,7 +4829,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4827 | case 9: | 4829 | case 9: |
| 4828 | switch (sel) { | 4830 | switch (sel) { |
| 4829 | case 0: | 4831 | case 0: |
| 4830 | - gen_helper_mtc0_count(t0); | 4832 | + gen_helper_mtc0_count(arg); |
| 4831 | rn = "Count"; | 4833 | rn = "Count"; |
| 4832 | break; | 4834 | break; |
| 4833 | /* 6,7 are implementation dependent */ | 4835 | /* 6,7 are implementation dependent */ |
| @@ -4840,7 +4842,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4840,7 +4842,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4840 | case 10: | 4842 | case 10: |
| 4841 | switch (sel) { | 4843 | switch (sel) { |
| 4842 | case 0: | 4844 | case 0: |
| 4843 | - gen_helper_mtc0_entryhi(t0); | 4845 | + gen_helper_mtc0_entryhi(arg); |
| 4844 | rn = "EntryHi"; | 4846 | rn = "EntryHi"; |
| 4845 | break; | 4847 | break; |
| 4846 | default: | 4848 | default: |
| @@ -4850,7 +4852,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4850,7 +4852,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4850 | case 11: | 4852 | case 11: |
| 4851 | switch (sel) { | 4853 | switch (sel) { |
| 4852 | case 0: | 4854 | case 0: |
| 4853 | - gen_helper_mtc0_compare(t0); | 4855 | + gen_helper_mtc0_compare(arg); |
| 4854 | rn = "Compare"; | 4856 | rn = "Compare"; |
| 4855 | break; | 4857 | break; |
| 4856 | /* 6,7 are implementation dependent */ | 4858 | /* 6,7 are implementation dependent */ |
| @@ -4864,7 +4866,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4864,7 +4866,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4864 | switch (sel) { | 4866 | switch (sel) { |
| 4865 | case 0: | 4867 | case 0: |
| 4866 | save_cpu_state(ctx, 1); | 4868 | save_cpu_state(ctx, 1); |
| 4867 | - gen_helper_mtc0_status(t0); | 4869 | + gen_helper_mtc0_status(arg); |
| 4868 | /* BS_STOP isn't good enough here, hflags may have changed. */ | 4870 | /* BS_STOP isn't good enough here, hflags may have changed. */ |
| 4869 | gen_save_pc(ctx->pc + 4); | 4871 | gen_save_pc(ctx->pc + 4); |
| 4870 | ctx->bstate = BS_EXCP; | 4872 | ctx->bstate = BS_EXCP; |
| @@ -4872,21 +4874,21 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4872,21 +4874,21 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4872 | break; | 4874 | break; |
| 4873 | case 1: | 4875 | case 1: |
| 4874 | check_insn(env, ctx, ISA_MIPS32R2); | 4876 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4875 | - gen_helper_mtc0_intctl(t0); | 4877 | + gen_helper_mtc0_intctl(arg); |
| 4876 | /* Stop translation as we may have switched the execution mode */ | 4878 | /* Stop translation as we may have switched the execution mode */ |
| 4877 | ctx->bstate = BS_STOP; | 4879 | ctx->bstate = BS_STOP; |
| 4878 | rn = "IntCtl"; | 4880 | rn = "IntCtl"; |
| 4879 | break; | 4881 | break; |
| 4880 | case 2: | 4882 | case 2: |
| 4881 | check_insn(env, ctx, ISA_MIPS32R2); | 4883 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4882 | - gen_helper_mtc0_srsctl(t0); | 4884 | + gen_helper_mtc0_srsctl(arg); |
| 4883 | /* Stop translation as we may have switched the execution mode */ | 4885 | /* Stop translation as we may have switched the execution mode */ |
| 4884 | ctx->bstate = BS_STOP; | 4886 | ctx->bstate = BS_STOP; |
| 4885 | rn = "SRSCtl"; | 4887 | rn = "SRSCtl"; |
| 4886 | break; | 4888 | break; |
| 4887 | case 3: | 4889 | case 3: |
| 4888 | check_insn(env, ctx, ISA_MIPS32R2); | 4890 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4889 | - gen_mtc0_store32(t0, offsetof(CPUState, CP0_SRSMap)); | 4891 | + gen_mtc0_store32(arg, offsetof(CPUState, CP0_SRSMap)); |
| 4890 | /* Stop translation as we may have switched the execution mode */ | 4892 | /* Stop translation as we may have switched the execution mode */ |
| 4891 | ctx->bstate = BS_STOP; | 4893 | ctx->bstate = BS_STOP; |
| 4892 | rn = "SRSMap"; | 4894 | rn = "SRSMap"; |
| @@ -4899,7 +4901,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4899,7 +4901,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4899 | switch (sel) { | 4901 | switch (sel) { |
| 4900 | case 0: | 4902 | case 0: |
| 4901 | save_cpu_state(ctx, 1); | 4903 | save_cpu_state(ctx, 1); |
| 4902 | - gen_helper_mtc0_cause(t0); | 4904 | + gen_helper_mtc0_cause(arg); |
| 4903 | rn = "Cause"; | 4905 | rn = "Cause"; |
| 4904 | break; | 4906 | break; |
| 4905 | default: | 4907 | default: |
| @@ -4909,7 +4911,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4909,7 +4911,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4909 | case 14: | 4911 | case 14: |
| 4910 | switch (sel) { | 4912 | switch (sel) { |
| 4911 | case 0: | 4913 | case 0: |
| 4912 | - tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, CP0_EPC)); | 4914 | + tcg_gen_st_tl(arg, cpu_env, offsetof(CPUState, CP0_EPC)); |
| 4913 | rn = "EPC"; | 4915 | rn = "EPC"; |
| 4914 | break; | 4916 | break; |
| 4915 | default: | 4917 | default: |
| @@ -4924,7 +4926,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4924,7 +4926,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4924 | break; | 4926 | break; |
| 4925 | case 1: | 4927 | case 1: |
| 4926 | check_insn(env, ctx, ISA_MIPS32R2); | 4928 | check_insn(env, ctx, ISA_MIPS32R2); |
| 4927 | - gen_helper_mtc0_ebase(t0); | 4929 | + gen_helper_mtc0_ebase(arg); |
| 4928 | rn = "EBase"; | 4930 | rn = "EBase"; |
| 4929 | break; | 4931 | break; |
| 4930 | default: | 4932 | default: |
| @@ -4934,7 +4936,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4934,7 +4936,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4934 | case 16: | 4936 | case 16: |
| 4935 | switch (sel) { | 4937 | switch (sel) { |
| 4936 | case 0: | 4938 | case 0: |
| 4937 | - gen_helper_mtc0_config0(t0); | 4939 | + gen_helper_mtc0_config0(arg); |
| 4938 | rn = "Config"; | 4940 | rn = "Config"; |
| 4939 | /* Stop translation as we may have switched the execution mode */ | 4941 | /* Stop translation as we may have switched the execution mode */ |
| 4940 | ctx->bstate = BS_STOP; | 4942 | ctx->bstate = BS_STOP; |
| @@ -4944,7 +4946,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4944,7 +4946,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4944 | rn = "Config1"; | 4946 | rn = "Config1"; |
| 4945 | break; | 4947 | break; |
| 4946 | case 2: | 4948 | case 2: |
| 4947 | - gen_helper_mtc0_config2(t0); | 4949 | + gen_helper_mtc0_config2(arg); |
| 4948 | rn = "Config2"; | 4950 | rn = "Config2"; |
| 4949 | /* Stop translation as we may have switched the execution mode */ | 4951 | /* Stop translation as we may have switched the execution mode */ |
| 4950 | ctx->bstate = BS_STOP; | 4952 | ctx->bstate = BS_STOP; |
| @@ -4972,7 +4974,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4972,7 +4974,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4972 | case 18: | 4974 | case 18: |
| 4973 | switch (sel) { | 4975 | switch (sel) { |
| 4974 | case 0 ... 7: | 4976 | case 0 ... 7: |
| 4975 | - gen_helper_1i(mtc0_watchlo, t0, sel); | 4977 | + gen_helper_1i(mtc0_watchlo, arg, sel); |
| 4976 | rn = "WatchLo"; | 4978 | rn = "WatchLo"; |
| 4977 | break; | 4979 | break; |
| 4978 | default: | 4980 | default: |
| @@ -4982,7 +4984,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4982,7 +4984,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4982 | case 19: | 4984 | case 19: |
| 4983 | switch (sel) { | 4985 | switch (sel) { |
| 4984 | case 0 ... 7: | 4986 | case 0 ... 7: |
| 4985 | - gen_helper_1i(mtc0_watchhi, t0, sel); | 4987 | + gen_helper_1i(mtc0_watchhi, arg, sel); |
| 4986 | rn = "WatchHi"; | 4988 | rn = "WatchHi"; |
| 4987 | break; | 4989 | break; |
| 4988 | default: | 4990 | default: |
| @@ -4993,7 +4995,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -4993,7 +4995,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 4993 | switch (sel) { | 4995 | switch (sel) { |
| 4994 | case 0: | 4996 | case 0: |
| 4995 | check_insn(env, ctx, ISA_MIPS3); | 4997 | check_insn(env, ctx, ISA_MIPS3); |
| 4996 | - gen_helper_mtc0_xcontext(t0); | 4998 | + gen_helper_mtc0_xcontext(arg); |
| 4997 | rn = "XContext"; | 4999 | rn = "XContext"; |
| 4998 | break; | 5000 | break; |
| 4999 | default: | 5001 | default: |
| @@ -5004,7 +5006,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5004,7 +5006,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5004 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ | 5006 | /* Officially reserved, but sel 0 is used for R1x000 framemask */ |
| 5005 | switch (sel) { | 5007 | switch (sel) { |
| 5006 | case 0: | 5008 | case 0: |
| 5007 | - gen_helper_mtc0_framemask(t0); | 5009 | + gen_helper_mtc0_framemask(arg); |
| 5008 | rn = "Framemask"; | 5010 | rn = "Framemask"; |
| 5009 | break; | 5011 | break; |
| 5010 | default: | 5012 | default: |
| @@ -5018,32 +5020,32 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5018,32 +5020,32 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5018 | case 23: | 5020 | case 23: |
| 5019 | switch (sel) { | 5021 | switch (sel) { |
| 5020 | case 0: | 5022 | case 0: |
| 5021 | - gen_helper_mtc0_debug(t0); /* EJTAG support */ | 5023 | + gen_helper_mtc0_debug(arg); /* EJTAG support */ |
| 5022 | /* BS_STOP isn't good enough here, hflags may have changed. */ | 5024 | /* BS_STOP isn't good enough here, hflags may have changed. */ |
| 5023 | gen_save_pc(ctx->pc + 4); | 5025 | gen_save_pc(ctx->pc + 4); |
| 5024 | ctx->bstate = BS_EXCP; | 5026 | ctx->bstate = BS_EXCP; |
| 5025 | rn = "Debug"; | 5027 | rn = "Debug"; |
| 5026 | break; | 5028 | break; |
| 5027 | case 1: | 5029 | case 1: |
| 5028 | -// gen_helper_mtc0_tracecontrol(t0); /* PDtrace support */ | 5030 | +// gen_helper_mtc0_tracecontrol(arg); /* PDtrace support */ |
| 5029 | /* Stop translation as we may have switched the execution mode */ | 5031 | /* Stop translation as we may have switched the execution mode */ |
| 5030 | ctx->bstate = BS_STOP; | 5032 | ctx->bstate = BS_STOP; |
| 5031 | rn = "TraceControl"; | 5033 | rn = "TraceControl"; |
| 5032 | // break; | 5034 | // break; |
| 5033 | case 2: | 5035 | case 2: |
| 5034 | -// gen_helper_mtc0_tracecontrol2(t0); /* PDtrace support */ | 5036 | +// gen_helper_mtc0_tracecontrol2(arg); /* PDtrace support */ |
| 5035 | /* Stop translation as we may have switched the execution mode */ | 5037 | /* Stop translation as we may have switched the execution mode */ |
| 5036 | ctx->bstate = BS_STOP; | 5038 | ctx->bstate = BS_STOP; |
| 5037 | rn = "TraceControl2"; | 5039 | rn = "TraceControl2"; |
| 5038 | // break; | 5040 | // break; |
| 5039 | case 3: | 5041 | case 3: |
| 5040 | -// gen_helper_mtc0_usertracedata(t0); /* PDtrace support */ | 5042 | +// gen_helper_mtc0_usertracedata(arg); /* PDtrace support */ |
| 5041 | /* Stop translation as we may have switched the execution mode */ | 5043 | /* Stop translation as we may have switched the execution mode */ |
| 5042 | ctx->bstate = BS_STOP; | 5044 | ctx->bstate = BS_STOP; |
| 5043 | rn = "UserTraceData"; | 5045 | rn = "UserTraceData"; |
| 5044 | // break; | 5046 | // break; |
| 5045 | case 4: | 5047 | case 4: |
| 5046 | -// gen_helper_mtc0_tracebpc(t0); /* PDtrace support */ | 5048 | +// gen_helper_mtc0_tracebpc(arg); /* PDtrace support */ |
| 5047 | /* Stop translation as we may have switched the execution mode */ | 5049 | /* Stop translation as we may have switched the execution mode */ |
| 5048 | ctx->bstate = BS_STOP; | 5050 | ctx->bstate = BS_STOP; |
| 5049 | rn = "TraceBPC"; | 5051 | rn = "TraceBPC"; |
| @@ -5056,7 +5058,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5056,7 +5058,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5056 | switch (sel) { | 5058 | switch (sel) { |
| 5057 | case 0: | 5059 | case 0: |
| 5058 | /* EJTAG support */ | 5060 | /* EJTAG support */ |
| 5059 | - tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, CP0_DEPC)); | 5061 | + tcg_gen_st_tl(arg, cpu_env, offsetof(CPUState, CP0_DEPC)); |
| 5060 | rn = "DEPC"; | 5062 | rn = "DEPC"; |
| 5061 | break; | 5063 | break; |
| 5062 | default: | 5064 | default: |
| @@ -5066,35 +5068,35 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5066,35 +5068,35 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5066 | case 25: | 5068 | case 25: |
| 5067 | switch (sel) { | 5069 | switch (sel) { |
| 5068 | case 0: | 5070 | case 0: |
| 5069 | - gen_helper_mtc0_performance0(t0); | 5071 | + gen_helper_mtc0_performance0(arg); |
| 5070 | rn = "Performance0"; | 5072 | rn = "Performance0"; |
| 5071 | break; | 5073 | break; |
| 5072 | case 1: | 5074 | case 1: |
| 5073 | -// gen_helper_mtc0_performance1(t0); | 5075 | +// gen_helper_mtc0_performance1(arg); |
| 5074 | rn = "Performance1"; | 5076 | rn = "Performance1"; |
| 5075 | // break; | 5077 | // break; |
| 5076 | case 2: | 5078 | case 2: |
| 5077 | -// gen_helper_mtc0_performance2(t0); | 5079 | +// gen_helper_mtc0_performance2(arg); |
| 5078 | rn = "Performance2"; | 5080 | rn = "Performance2"; |
| 5079 | // break; | 5081 | // break; |
| 5080 | case 3: | 5082 | case 3: |
| 5081 | -// gen_helper_mtc0_performance3(t0); | 5083 | +// gen_helper_mtc0_performance3(arg); |
| 5082 | rn = "Performance3"; | 5084 | rn = "Performance3"; |
| 5083 | // break; | 5085 | // break; |
| 5084 | case 4: | 5086 | case 4: |
| 5085 | -// gen_helper_mtc0_performance4(t0); | 5087 | +// gen_helper_mtc0_performance4(arg); |
| 5086 | rn = "Performance4"; | 5088 | rn = "Performance4"; |
| 5087 | // break; | 5089 | // break; |
| 5088 | case 5: | 5090 | case 5: |
| 5089 | -// gen_helper_mtc0_performance5(t0); | 5091 | +// gen_helper_mtc0_performance5(arg); |
| 5090 | rn = "Performance5"; | 5092 | rn = "Performance5"; |
| 5091 | // break; | 5093 | // break; |
| 5092 | case 6: | 5094 | case 6: |
| 5093 | -// gen_helper_mtc0_performance6(t0); | 5095 | +// gen_helper_mtc0_performance6(arg); |
| 5094 | rn = "Performance6"; | 5096 | rn = "Performance6"; |
| 5095 | // break; | 5097 | // break; |
| 5096 | case 7: | 5098 | case 7: |
| 5097 | -// gen_helper_mtc0_performance7(t0); | 5099 | +// gen_helper_mtc0_performance7(arg); |
| 5098 | rn = "Performance7"; | 5100 | rn = "Performance7"; |
| 5099 | // break; | 5101 | // break; |
| 5100 | default: | 5102 | default: |
| @@ -5121,14 +5123,14 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5121,14 +5123,14 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5121 | case 2: | 5123 | case 2: |
| 5122 | case 4: | 5124 | case 4: |
| 5123 | case 6: | 5125 | case 6: |
| 5124 | - gen_helper_mtc0_taglo(t0); | 5126 | + gen_helper_mtc0_taglo(arg); |
| 5125 | rn = "TagLo"; | 5127 | rn = "TagLo"; |
| 5126 | break; | 5128 | break; |
| 5127 | case 1: | 5129 | case 1: |
| 5128 | case 3: | 5130 | case 3: |
| 5129 | case 5: | 5131 | case 5: |
| 5130 | case 7: | 5132 | case 7: |
| 5131 | - gen_helper_mtc0_datalo(t0); | 5133 | + gen_helper_mtc0_datalo(arg); |
| 5132 | rn = "DataLo"; | 5134 | rn = "DataLo"; |
| 5133 | break; | 5135 | break; |
| 5134 | default: | 5136 | default: |
| @@ -5141,14 +5143,14 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5141,14 +5143,14 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5141 | case 2: | 5143 | case 2: |
| 5142 | case 4: | 5144 | case 4: |
| 5143 | case 6: | 5145 | case 6: |
| 5144 | - gen_helper_mtc0_taghi(t0); | 5146 | + gen_helper_mtc0_taghi(arg); |
| 5145 | rn = "TagHi"; | 5147 | rn = "TagHi"; |
| 5146 | break; | 5148 | break; |
| 5147 | case 1: | 5149 | case 1: |
| 5148 | case 3: | 5150 | case 3: |
| 5149 | case 5: | 5151 | case 5: |
| 5150 | case 7: | 5152 | case 7: |
| 5151 | - gen_helper_mtc0_datahi(t0); | 5153 | + gen_helper_mtc0_datahi(arg); |
| 5152 | rn = "DataHi"; | 5154 | rn = "DataHi"; |
| 5153 | break; | 5155 | break; |
| 5154 | default: | 5156 | default: |
| @@ -5159,7 +5161,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5159,7 +5161,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5159 | case 30: | 5161 | case 30: |
| 5160 | switch (sel) { | 5162 | switch (sel) { |
| 5161 | case 0: | 5163 | case 0: |
| 5162 | - tcg_gen_st_tl(t0, cpu_env, offsetof(CPUState, CP0_ErrorEPC)); | 5164 | + tcg_gen_st_tl(arg, cpu_env, offsetof(CPUState, CP0_ErrorEPC)); |
| 5163 | rn = "ErrorEPC"; | 5165 | rn = "ErrorEPC"; |
| 5164 | break; | 5166 | break; |
| 5165 | default: | 5167 | default: |
| @@ -5170,7 +5172,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | @@ -5170,7 +5172,7 @@ static void gen_dmtc0 (CPUState *env, DisasContext *ctx, TCGv t0, int reg, int s | ||
| 5170 | switch (sel) { | 5172 | switch (sel) { |
| 5171 | case 0: | 5173 | case 0: |
| 5172 | /* EJTAG support */ | 5174 | /* EJTAG support */ |
| 5173 | - gen_mtc0_store32(t0, offsetof(CPUState, CP0_DESAVE)); | 5175 | + gen_mtc0_store32(arg, offsetof(CPUState, CP0_DESAVE)); |
| 5174 | rn = "DESAVE"; | 5176 | rn = "DESAVE"; |
| 5175 | break; | 5177 | break; |
| 5176 | default: | 5178 | default: |