4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-12 20:19:14 +08:00

* libc/sys/mmixware/*: Correct spacing in all source files.

* libc/sys/mmixware/syscall.h: Move misplaced file...
	* libc/sys/mmixware/sys/syscall.h: ...here.
This commit is contained in:
Hans-Peter Nilsson 2001-11-13 02:49:12 +00:00
parent f513298e18
commit 4cede8c4ce
31 changed files with 203 additions and 226 deletions

View File

@ -1,3 +1,9 @@
2001-11-13 Hans-Peter Nilsson <hp@bitrange.com>
* libc/sys/mmixware/*: Correct spacing in all source files.
* libc/sys/mmixware/syscall.h: Move misplaced file...
* libc/sys/mmixware/sys/syscall.h: ...here.
2001-11-12 Hans-Peter Nilsson <hp@bitrange.com> 2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
* libc/include/machine/ieeefp.h: Add support for mmix target. * libc/include/machine/ieeefp.h: Add support for mmix target.

View File

@ -1,7 +1,6 @@
/* _exit for MMIXware. /* _exit for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* access for MMIXware. /* access for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* chmod stub for MMIXware. /* chmod stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* chown stub for MMIXware. /* chown stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* close for MMIXware. /* close for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* creat for MMIXware. /* creat for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* crt0 stub for MMIXware. /* crt0 stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* execv stub for MMIXware. /* execv stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* execve stub for MMIXware. /* execve stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* fork stub for MMIXware. /* fork stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* fstat for MMIXware. /* fstat for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* getpid stub for MMIXware. /* getpid stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* gettime stub for MMIXware. /* gettime stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* isatty for MMIXware. /* isatty for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* kill for MMIXware. /* kill for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* lseek for MMIXware. /* lseek for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* open for MMIXware. /* open for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* pipe stub for MMIXware. /* pipe stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* read for MMIXware. /* read for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* sbrk for MMIXware. /* sbrk for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* Setjmp and longjmp for mmix. /* Setjmp and longjmp for mmix.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* stat stub for MMIXware. /* stat stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -0,0 +1,137 @@
/* syscall defines for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. */
/* These are the mmixware simulator calls that are of use in newlib. */
#define SYS_halt 0
#define SYS_Fopen 1
#define SYS_Fclose 2
#define SYS_Fread 3
#define SYS_Fwrite 6
#define SYS_Fseek 9
#define SYS_Ftell 10
enum MMIX_filemode
{
TextRead = 0,
TextWrite = 1,
BinaryRead = 2,
BinaryWrite = 3,
BinaryReadWrite = 4
};
#define N_MMIX_FILEHANDLES 32
/* We store a bitmap of allocated filehandles
_MMIX_allocated_filehandle[fileno] in an array. There are 32 of them.
Indexes 0, 1 and 2 are allocated from start. The reason we keep track
of them is that *we* have to allocate a filehandle when opening a file.
Had we got a filehandle from the simulator, we wouldn't have to keep
track of it. A value of 0 denotes a free handle. */
extern unsigned char _MMIX_allocated_filehandle[N_MMIX_FILEHANDLES];
/* We use this file-handle number as a temporary; not used by usual file
I/O. */
#define TMPFNO 127
/* Simulator call with one argument. Also used for zero-argument calls;
pass a zero as ARG1. */
#define TRAP1i(FUN, ARG1) \
({ long ret_; \
__asm__ ("TRAP 0,%1,%2\n\tSET %0,$255" \
: "=r" (ret_) : "i" (FUN), "i" (ARG1) \
: "memory"); \
ret_; \
})
/* Helper macros to cope with the file-handle parameter to the simulator
being *constant*. We support up to 32 simultaneously open files. */
#define I3f(FUN, ARG1, N, ARGS) \
if (ARG1 == N) \
__asm__ ("SET $255,%3\n\tTRAP 0,%1,%2\n\tSET %0,$255" \
: "=r" (ret_) : "i" (FUN), "i" (N), "r" (ARGS) \
: "memory")
/* Using if:s rather than switches to help GCC optimize the rest away. */
#define DO32(FUN, ARG1, ARGS) \
I3f (FUN, ARG1, 0, ARGS); \
else I3f (FUN, ARG1, 1, ARGS); \
else I3f (FUN, ARG1, 2, ARGS); \
else I3f (FUN, ARG1, 3, ARGS); \
else I3f (FUN, ARG1, 4, ARGS); \
else I3f (FUN, ARG1, 5, ARGS); \
else I3f (FUN, ARG1, 6, ARGS); \
else I3f (FUN, ARG1, 7, ARGS); \
else I3f (FUN, ARG1, 8, ARGS); \
else I3f (FUN, ARG1, 9, ARGS); \
else I3f (FUN, ARG1, 10, ARGS); \
else I3f (FUN, ARG1, 11, ARGS); \
else I3f (FUN, ARG1, 12, ARGS); \
else I3f (FUN, ARG1, 13, ARGS); \
else I3f (FUN, ARG1, 14, ARGS); \
else I3f (FUN, ARG1, 15, ARGS); \
else I3f (FUN, ARG1, 16, ARGS); \
else I3f (FUN, ARG1, 17, ARGS); \
else I3f (FUN, ARG1, 18, ARGS); \
else I3f (FUN, ARG1, 19, ARGS); \
else I3f (FUN, ARG1, 20, ARGS); \
else I3f (FUN, ARG1, 21, ARGS); \
else I3f (FUN, ARG1, 22, ARGS); \
else I3f (FUN, ARG1, 23, ARGS); \
else I3f (FUN, ARG1, 24, ARGS); \
else I3f (FUN, ARG1, 25, ARGS); \
else I3f (FUN, ARG1, 26, ARGS); \
else I3f (FUN, ARG1, 27, ARGS); \
else I3f (FUN, ARG1, 28, ARGS); \
else I3f (FUN, ARG1, 29, ARGS); \
else I3f (FUN, ARG1, 30, ARGS); \
else I3f (FUN, ARG1, 31, ARGS); \
else \
{ \
errno = EBADF; \
return -1; \
}
#define TRAP1f(FUN, ARG1) \
({ long ret_; \
DO32 (FUN, ARG1, 0); \
ret_; \
})
#define TRAP2f(FUN, ARG1, ARG2) \
({ long ret_; \
DO32 (FUN, ARG1, ARG2); \
ret_; \
})
#define TRAP3f(FUN, ARG1, ARG2, ARG3) \
({ long ret_; \
unsigned long args_[] \
= { (unsigned long) (ARG2), (unsigned long) (ARG3) }; \
DO32 (FUN, ARG1, args_); \
ret_; \
})
#ifndef __GNUC__
/* Probably will not happen. Nevertheless... */
# define UNIMPLEMENTED(MSG)
#else
# define UNIMPLEMENTED(MSG) UNIMPLEMENTEDi MSG
# define UNIMPLEMENTEDi(MSG, ARGS...) \
do { \
char buf[2000]; \
sprintf (buf, "UNIMPLEMENTED %s in %s\n", __FUNCTION__, __FILE__); \
write (2, buf, strlen (buf)); \
sprintf (buf, MSG , ##ARGS); \
write (2, buf, strlen (buf)); \
write (2, "\n", 1); \
} while (0)
#endif

View File

@ -1,138 +0,0 @@
/* syscall defines for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. */
/* These are the mmixware simulator calls that are of use in newlib. */
#define SYS_halt 0
#define SYS_Fopen 1
#define SYS_Fclose 2
#define SYS_Fread 3
#define SYS_Fwrite 6
#define SYS_Fseek 9
#define SYS_Ftell 10
enum MMIX_filemode
{
TextRead = 0,
TextWrite = 1,
BinaryRead = 2,
BinaryWrite = 3,
BinaryReadWrite = 4
};
#define N_MMIX_FILEHANDLES 32
/* We store a bitmap of allocated filehandles
_MMIX_allocated_filehandle[fileno] in an array. There are 32 of them.
Indexes 0, 1 and 2 are allocated from start. The reason we keep track
of them is that *we* have to allocate a filehandle when opening a file.
Had we got a filehandle from the simulator, we wouldn't have to keep
track of it. A value of 0 denotes a free handle. */
extern unsigned char _MMIX_allocated_filehandle[N_MMIX_FILEHANDLES];
/* We use this file-handle number as a temporary; not used by usual file
I/O. */
#define TMPFNO 127
/* Simulator call with one argument. Also used for zero-argument calls;
pass a zero as ARG1. */
#define TRAP1i(FUN, ARG1) \
({ long ret_; \
__asm__ ("TRAP 0,%1,%2\n\tSET %0,$255" \
: "=r" (ret_) : "i" (FUN), "i" (ARG1) \
: "memory"); \
ret_; \
})
/* Helper macros to cope with the file-handle parameter to the simulator
being *constant*. We support up to 32 simultaneously open files. */
#define I3f(FUN, ARG1, N, ARGS) \
if (ARG1 == N) \
__asm__ ("SET $255,%3\n\tTRAP 0,%1,%2\n\tSET %0,$255" \
: "=r" (ret_) : "i" (FUN), "i" (N), "r" (ARGS) \
: "memory")
/* Using if:s rather than switches to help GCC optimize the rest away. */
#define DO32(FUN, ARG1, ARGS) \
I3f (FUN, ARG1, 0, ARGS); \
else I3f (FUN, ARG1, 1, ARGS); \
else I3f (FUN, ARG1, 2, ARGS); \
else I3f (FUN, ARG1, 3, ARGS); \
else I3f (FUN, ARG1, 4, ARGS); \
else I3f (FUN, ARG1, 5, ARGS); \
else I3f (FUN, ARG1, 6, ARGS); \
else I3f (FUN, ARG1, 7, ARGS); \
else I3f (FUN, ARG1, 8, ARGS); \
else I3f (FUN, ARG1, 9, ARGS); \
else I3f (FUN, ARG1, 10, ARGS); \
else I3f (FUN, ARG1, 11, ARGS); \
else I3f (FUN, ARG1, 12, ARGS); \
else I3f (FUN, ARG1, 13, ARGS); \
else I3f (FUN, ARG1, 14, ARGS); \
else I3f (FUN, ARG1, 15, ARGS); \
else I3f (FUN, ARG1, 16, ARGS); \
else I3f (FUN, ARG1, 17, ARGS); \
else I3f (FUN, ARG1, 18, ARGS); \
else I3f (FUN, ARG1, 19, ARGS); \
else I3f (FUN, ARG1, 20, ARGS); \
else I3f (FUN, ARG1, 21, ARGS); \
else I3f (FUN, ARG1, 22, ARGS); \
else I3f (FUN, ARG1, 23, ARGS); \
else I3f (FUN, ARG1, 24, ARGS); \
else I3f (FUN, ARG1, 25, ARGS); \
else I3f (FUN, ARG1, 26, ARGS); \
else I3f (FUN, ARG1, 27, ARGS); \
else I3f (FUN, ARG1, 28, ARGS); \
else I3f (FUN, ARG1, 29, ARGS); \
else I3f (FUN, ARG1, 30, ARGS); \
else I3f (FUN, ARG1, 31, ARGS); \
else \
{ \
errno = EBADF; \
return -1; \
}
#define TRAP1f(FUN, ARG1) \
({ long ret_; \
DO32 (FUN, ARG1, 0); \
ret_; \
})
#define TRAP2f(FUN, ARG1, ARG2) \
({ long ret_; \
DO32 (FUN, ARG1, ARG2); \
ret_; \
})
#define TRAP3f(FUN, ARG1, ARG2, ARG3) \
({ long ret_; \
unsigned long args_[] \
= { (unsigned long) (ARG2), (unsigned long) (ARG3) }; \
DO32 (FUN, ARG1, args_); \
ret_; \
})
#ifndef __GNUC__
/* Probably will not happen. Nevertheless... */
# define UNIMPLEMENTED(MSG)
#else
# define UNIMPLEMENTED(MSG) UNIMPLEMENTEDi MSG
# define UNIMPLEMENTEDi(MSG, ARGS...) \
do { \
char buf[2000]; \
sprintf (buf, "UNIMPLEMENTED %s in %s\n", __FUNCTION__, __FILE__); \
write (2, buf, strlen (buf)); \
sprintf (buf, MSG , ##ARGS); \
write (2, buf, strlen (buf)); \
write (2, "\n", 1); \
} while (0)
#endif

View File

@ -1,7 +1,6 @@
/* time stub for MMIXware. /* time stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* times stub for MMIXware. /* times stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* unlink stub for MMIXware. /* unlink stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* utime stub for MMIXware. /* utime stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* wait stub for MMIXware. /* wait stub for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR

View File

@ -1,7 +1,6 @@
/* write for MMIXware. /* write for MMIXware.
Copyright (C) 2001 Hans-Peter Nilsson. Copyright (C) 2001 Hans-Peter Nilsson.
Permission to use, copy, modify, and distribute this software is freely Permission to use, copy, modify, and distribute this software is freely
granted, provided that this notice is preserved with no changes. granted, provided that this notice is preserved with no changes.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR