summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/h8300/h8sim/console/syscalls.S
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-25 13:34:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-25 13:34:18 +0000
commit8b33b6afc736d7c64e4ff7881a685cd72587bb7a (patch)
tree586510523b44d261f1b35345ac3b39e9604dc162 /c/src/lib/libbsp/h8300/h8sim/console/syscalls.S
parentnewlib-1.16.0-rtems4.10-20080925.diff. (diff)
downloadrtems-8b33b6afc736d7c64e4ff7881a685cd72587bb7a.tar.bz2
2008-09-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* console/console-io.c: Add missing file and remove junk code. * console/syscalls.S: New file.
Diffstat (limited to 'c/src/lib/libbsp/h8300/h8sim/console/syscalls.S')
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/console/syscalls.S48
1 files changed, 48 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/h8300/h8sim/console/syscalls.S b/c/src/lib/libbsp/h8300/h8sim/console/syscalls.S
new file mode 100644
index 0000000000..6623896e9e
--- /dev/null
+++ b/c/src/lib/libbsp/h8300/h8sim/console/syscalls.S
@@ -0,0 +1,48 @@
+/*
+ * System call support for simulator in gdb.
+ * Copied from newlib 1.16.0.
+ *
+ * $Id$
+ */
+
+;;;; libc/machine/h8300/setarch.h
+#ifdef __H8300H__
+#ifdef __NORMAL_MODE__
+ .h8300hn
+#else
+ .h8300h
+#endif
+#endif
+#ifdef __H8300S__
+#ifdef __NORMAL_MODE__
+ .h8300sn
+#else
+ .h8300s
+#endif
+#endif
+#ifdef __H8300SX__
+#ifdef __NORMAL_MODE__
+ .h8300sxn
+#else
+ .h8300sx
+#endif
+#endif
+
+;;;; libc/sys/h8300/write.S
+;ssize_t _sys_write(int fd, const void *buf, size_t count);
+;Integer arguments have to be zero extended.
+
+; #include "setarch.h"
+
+ .section .text
+ .align 2
+ .global __sys_write
+__sys_write:
+#if defined(__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
+#if __INT_MAX__ == 32767
+ extu.l er0
+#endif
+#endif
+ jsr @@0xc7
+ rts
+ .end