[patch, libgloss, mips] Add unlink, lseek, stat functions.
Jeff Johnston
jjohnstn@redhat.com
Wed Jul 24 22:02:00 GMT 2013
Ok to check in.
-- Jeff J.
On 07/24/2013 01:56 PM, Steve Ellcey wrote:
> Ping. This is a very small mips specific patch that will allow me to
> add more functionality to the GNU simulator.
>
> Steve Ellcey
> sellcey@mips.com
>
>
> On Tue, 2013-07-09 at 16:13 -0700, Steve Ellcey wrote:
>> A while back I sent some email about adding ftruncate and chsize to libgloss
>> in order to fix some Fortran test failures I was getting when running the
>> GCC Fortran testsuite under the MIPS GNU simulator. I have since realized that
>> while I may need those functions my more immediate problem was that some of
>> the system calls already defined in libgloss/syscall.h were not implemented
>> in the MIPS GNU simulator. Specifically many tests failed due to a lack of
>> unlink, lseek, and stat. This patch adds specially defined function
>> definitions for these entry points to the MIPS libgloss so that they can be
>> intercepted by the GNU simulator. I have a second patch that I will submit
>> to gdb that actually implements the functionality in the simulator. This
>> patch just makes sure that they are seen by the simulator so that it can
>> intercept and implement them. Note that the numbers used in the definitions
>> do not match syscall.h and do not need to, they just need to match the
>> case statement in the GNU simulator that implements each of the calls.
>>
>> OK for checkin?
>>
>> Steve Ellcey
>> sellcey@mips.com
>>
>>
>> 2013-07-09 Steve Ellcey <sellcey@mips.com>
>>
>> * mips/idtmon.S (unlink, lseek, stat): Add new functions.
>>
>>
>> diff --git a/libgloss/mips/idtmon.S b/libgloss/mips/idtmon.S
>> index bb15388..304aaa4 100644
>> --- a/libgloss/mips/idtmon.S
>> +++ b/libgloss/mips/idtmon.S
>> @@ -39,6 +39,9 @@ INDIRECT(write,8)
>> INDIRECT(close,10)
>> INDIRECT(inbyte,11)
>> INDIRECT(outbyte,12)
>> +INDIRECT(unlink,13)
>> +INDIRECT(lseek,14)
>> +INDIRECT(stat,15)
>> INDIRECT(mon_printf,16)
>> INDIRECT(_flush_cache,28)
>> INDIRECT(get_mem_info,55) /* expects pointer to three word vector */
>>
>
>
>
>
More information about the Newlib
mailing list