mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-24 12:35:55 +08:00
* Makefile.in: Last change was bad. Define NL_TARGET
so that targ-vals.h will be used instead of syscall.h. * simops.c: Use targ-vals.h instead of syscall.h. (OP_F020): Disable unsupported system calls.
This commit is contained in:
parent
845a591785
commit
a9faef120e
@ -1,3 +1,10 @@
|
||||
Mon Feb 23 20:23:19 1998 Mark Alexander <marka@cygnus.com>
|
||||
|
||||
* Makefile.in: Last change was bad. Define NL_TARGET
|
||||
so that targ-vals.h will be used instead of syscall.h.
|
||||
* simops.c: Use targ-vals.h instead of syscall.h.
|
||||
(OP_F020): Disable unsupported system calls.
|
||||
|
||||
Mon Feb 23 09:44:38 1998 Mark Alexander <marka@cygnus.com>
|
||||
|
||||
* Makefile.in: Get header files from libgloss/mn10300/sys.
|
||||
|
@ -19,9 +19,11 @@
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_OBJS = interp.o table.o simops.o sim-load.o
|
||||
SIM_EXTRA_CFLAGS = -I$(srcdir)/../../libgloss/mn10300/sys
|
||||
SIM_EXTRA_CLEAN = clean-extra
|
||||
|
||||
# This selects the m32r newlib/libgloss syscall definitions.
|
||||
NL_TARGET = -DNL_TARGET_mn10300
|
||||
|
||||
INCLUDE = mn10300_sim.h $(srcdir)/../../include/callback.h
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "mn10300_sim.h"
|
||||
#include "simops.h"
|
||||
#include "sim-types.h"
|
||||
#include "sys/syscall.h"
|
||||
#include "targ-vals.h"
|
||||
#include "bfd.h"
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
@ -2899,38 +2899,42 @@ void OP_F020 (insn, extension)
|
||||
switch (FUNC)
|
||||
{
|
||||
#if !defined(__GO32__) && !defined(_WIN32)
|
||||
case SYS_fork:
|
||||
#ifdef TARGET_SYS_fork
|
||||
case TARGET_SYS_fork:
|
||||
RETVAL = fork ();
|
||||
break;
|
||||
case SYS_execve:
|
||||
#endif
|
||||
#ifdef TARGET_SYS_execve
|
||||
case TARGET_SYS_execve:
|
||||
RETVAL = execve (MEMPTR (PARM1), (char **) MEMPTR (PARM2),
|
||||
(char **)MEMPTR (PARM3));
|
||||
break;
|
||||
#ifdef SYS_execv
|
||||
case SYS_execv:
|
||||
#endif
|
||||
#ifdef TARGET_SYS_execv
|
||||
case TARGET_SYS_execv:
|
||||
RETVAL = execve (MEMPTR (PARM1), (char **) MEMPTR (PARM2), NULL);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#endif /* ! GO32 and ! WIN32 */
|
||||
|
||||
case SYS_read:
|
||||
case TARGET_SYS_read:
|
||||
RETVAL = mn10300_callback->read (mn10300_callback, PARM1,
|
||||
MEMPTR (PARM2), PARM3);
|
||||
break;
|
||||
case SYS_write:
|
||||
case TARGET_SYS_write:
|
||||
RETVAL = (int)mn10300_callback->write (mn10300_callback, PARM1,
|
||||
MEMPTR (PARM2), PARM3);
|
||||
break;
|
||||
case SYS_lseek:
|
||||
case TARGET_SYS_lseek:
|
||||
RETVAL = mn10300_callback->lseek (mn10300_callback, PARM1, PARM2, PARM3);
|
||||
break;
|
||||
case SYS_close:
|
||||
case TARGET_SYS_close:
|
||||
RETVAL = mn10300_callback->close (mn10300_callback, PARM1);
|
||||
break;
|
||||
case SYS_open:
|
||||
case TARGET_SYS_open:
|
||||
RETVAL = mn10300_callback->open (mn10300_callback, MEMPTR (PARM1), PARM2);
|
||||
break;
|
||||
case SYS_exit:
|
||||
case TARGET_SYS_exit:
|
||||
/* EXIT - caller can look in PARM1 to work out the
|
||||
reason */
|
||||
if (PARM1 == 0xdead)
|
||||
@ -2940,7 +2944,7 @@ void OP_F020 (insn, extension)
|
||||
State.exited = 1;
|
||||
break;
|
||||
|
||||
case SYS_stat: /* added at hmsi */
|
||||
case TARGET_SYS_stat: /* added at hmsi */
|
||||
/* stat system call */
|
||||
{
|
||||
struct stat host_stat;
|
||||
@ -2965,19 +2969,21 @@ void OP_F020 (insn, extension)
|
||||
}
|
||||
break;
|
||||
|
||||
case SYS_chown:
|
||||
#ifdef TARGET_SYS_chown
|
||||
case TARGET_SYS_chown:
|
||||
RETVAL = chown (MEMPTR (PARM1), PARM2, PARM3);
|
||||
break;
|
||||
case SYS_chmod:
|
||||
#endif
|
||||
case TARGET_SYS_chmod:
|
||||
RETVAL = chmod (MEMPTR (PARM1), PARM2);
|
||||
break;
|
||||
#ifdef SYS_time
|
||||
case SYS_time:
|
||||
#ifdef TARGET_SYS_time
|
||||
case TARGET_SYS_time:
|
||||
RETVAL = time ((void*) MEMPTR (PARM1));
|
||||
break;
|
||||
#endif
|
||||
#ifdef SYS_times
|
||||
case SYS_times:
|
||||
#ifdef TARGET_SYS_times
|
||||
case TARGET_SYS_times:
|
||||
{
|
||||
struct tms tms;
|
||||
RETVAL = times (&tms);
|
||||
@ -2988,7 +2994,8 @@ void OP_F020 (insn, extension)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case SYS_gettimeofday:
|
||||
#ifdef TARGET_SYS_gettimeofday
|
||||
case TARGET_SYS_gettimeofday:
|
||||
{
|
||||
struct timeval t;
|
||||
struct timezone tz;
|
||||
@ -2999,8 +3006,9 @@ void OP_F020 (insn, extension)
|
||||
store_word (PARM2 + 4, tz.tz_dsttime);
|
||||
break;
|
||||
}
|
||||
#ifdef SYS_utime
|
||||
case SYS_utime:
|
||||
#endif
|
||||
#ifdef TARGET_SYS_utime
|
||||
case TARGET_SYS_utime:
|
||||
/* Cast the second argument to void *, to avoid type mismatch
|
||||
if a prototype is present. */
|
||||
RETVAL = utime (MEMPTR (PARM1), (void *) MEMPTR (PARM2));
|
||||
|
Loading…
Reference in New Issue
Block a user