Commit 12a4b2aa1d1aa9626990748544a30fed5af35f54

Authored by ths
1 parent c811cf2c

Fix ddivu for 32bit hosts, by Aurelien Jarno.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2890 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 4 deletions
target-mips/op_helper.c
... ... @@ -237,16 +237,16 @@ void do_ddiv (void)
237 237 }
238 238 }
239 239  
  240 +#if TARGET_LONG_BITS > HOST_LONG_BITS
240 241 void do_ddivu (void)
241 242 {
242 243 if (T1 != 0) {
243   - /* XXX: lldivu? */
244   - lldiv_t res = lldiv(T0, T1);
245   - env->LO = (uint64_t)res.quot;
246   - env->HI = (uint64_t)res.rem;
  244 + env->LO = T0 / T1;
  245 + env->HI = T0 % T1;
247 246 }
248 247 }
249 248 #endif
  249 +#endif /* TARGET_MIPS64 */
250 250  
251 251 #if defined(CONFIG_USER_ONLY)
252 252 void do_mfc0_random (void)
... ...