[SH] Fix simulator on 64 bit hosts

Oleg Endo oleg.endo@t-online.de
Sat Apr 9 19:25:00 GMT 2016


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sh_sim_64bit_2.patch
Type: text/x-patch
Size: 2159 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20160409/6b0109e2/attachment.bin>


More information about the Gdb-patches mailing list