offset parameter as sign-extended.
+2010-10-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * traps.c (cris_break_13_handler): Pass lseek
+ offset parameter as sign-extended.
+
2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
* dv-rv.c (hw_rv_init_socket): Check error return from socket() call
s.arg2 = arg2;
s.arg3 = arg3;
+ /* The type of s.arg2 is long, so for hosts with 64-bit longs, we need
+ to sign-extend the lseek offset to be passed as a signed number,
+ else we'll truncate it to something > 2GB on hosts where sizeof
+ long > sizeof USI. We avoid doing it for all syscalls, as arg2 is
+ e.g. an address for some syscalls. */
+ if (callnum == TARGET_SYS_lseek)
+ s.arg2 = (SI) arg2;
+
if (callnum == TARGET_SYS_exit_group
|| (callnum == TARGET_SYS_exit && current_cpu->m1threads == 0))
{