Hi, The attached patch fixes the SH simulator when ran on 64 bit hosts. It seems there are quite a few adventurous or at least confusing integer type casts, but the main problem was the widening 32 x 32 -> 64 bit multiplication. Tested by running the GCC testsuite and checking that 32 bit sim and 64 bit sim produce the same test results. Cheers, Oleg sim/sh/ChangeLog: * interp.c (dmul): Split into dmul_s and dmul_u. Use explicit integer width types and simplify implementation. * gencode.c (dmuls.l, dmulu.l): Use new functions dmul_s and dmul_u.