diff options
Diffstat (limited to 'sim/sh/interp.c')
-rw-r--r-- | sim/sh/interp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 91899f4..711df1e 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -1153,6 +1153,17 @@ trap (i, regs, insn_ptr, memory, maskl, maskw, endianw) case SYS_time: regs[0] = get_now (); break; + case SYS_ftruncate: + regs[0] = callback->ftruncate (callback, regs[5], regs[6]); + break; + case SYS_truncate: + { + int len = strswaplen (regs[5]); + strnswap (regs[5], len); + regs[0] = callback->truncate (callback, ptr (regs[5]), regs[6]); + strnswap (regs[5], len); + break; + } default: regs[0] = -1; break; |