aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c/syscall.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2006-03-14 03:34:28 +0000
committerDJ Delorie <dj@redhat.com>2006-03-14 03:34:28 +0000
commit727b6b4b411c55d0d6719556bcf6a5da5c54adb6 (patch)
treef356cad6da3037f2447b33a9a826b98f4d25c0c7 /sim/m32c/syscall.h
parent1f810f7808a9364811ec4e9494eb5fc8daafe232 (diff)
downloadgdb-727b6b4b411c55d0d6719556bcf6a5da5c54adb6.zip
gdb-727b6b4b411c55d0d6719556bcf6a5da5c54adb6.tar.gz
gdb-727b6b4b411c55d0d6719556bcf6a5da5c54adb6.tar.bz2
* mem.c (mem_put_byte): Hook simulated UART to stdout.
(mem_put_hi): Hook in simulated trace port. (mem_get_byte): Hook in simulated uart control port. * opc2c: Be more picky about matching special comments. * r8c.opc (shift_op): Limit shift counts to -16..16. (BMcnd): Map conditional codes. * reg.c (condition_true): Mask condition code to 4 bits. * syscalls.c: Include local syscall.h. * syscall.h: New, copied from libgloss.
Diffstat (limited to 'sim/m32c/syscall.h')
-rw-r--r--sim/m32c/syscall.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/sim/m32c/syscall.h b/sim/m32c/syscall.h
new file mode 100644
index 0000000..0194e03
--- /dev/null
+++ b/sim/m32c/syscall.h
@@ -0,0 +1,50 @@
+/* Copied from libgloss */
+/* General use syscall.h file.
+ The more ports that use this file, the simpler sim/common/nltvals.def
+ remains. */
+
+#ifndef LIBGLOSS_SYSCALL_H
+#define LIBGLOSS_SYSCALL_H
+
+/* Note: This file may be included by assembler source. */
+
+/* These should be as small as possible to allow a port to use a trap type
+ instruction, which the system call # as the trap (the d10v for instance
+ supports traps 0..31). An alternative would be to define one trap for doing
+ system calls, and put the system call number in a register that is not used
+ for the normal calling sequence (so that you don't have to shift down the
+ arguments to add the system call number). Obviously, if these system call
+ numbers are ever changed, all of the simulators and potentially user code
+ will need to be updated. */
+
+/* There is no current need for the following: SYS_execv, SYS_creat, SYS_wait,
+ etc. etc. Don't add them. */
+
+/* These are required by the ANSI C part of newlib (excluding system() of
+ course). */
+#define SYS_exit 1
+#define SYS_open 2
+#define SYS_close 3
+#define SYS_read 4
+#define SYS_write 5
+#define SYS_lseek 6
+#define SYS_unlink 7
+#define SYS_getpid 8
+#define SYS_kill 9
+#define SYS_fstat 10
+/*#define SYS_sbrk 11 - not currently a system call, but reserved. */
+
+/* ARGV support. */
+#define SYS_argvlen 12
+#define SYS_argv 13
+
+/* These are extras added for one reason or another. */
+#define SYS_chdir 14
+#define SYS_stat 15
+#define SYS_chmod 16
+#define SYS_utime 17
+#define SYS_time 18
+#define SYS_gettimeofday 19
+#define SYS_times 20
+#define SYS_link 21
+#endif