diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-25 13:34:18 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-25 13:34:18 +0000 |
commit | 8b33b6afc736d7c64e4ff7881a685cd72587bb7a (patch) | |
tree | 586510523b44d261f1b35345ac3b39e9604dc162 /c/src/lib/libbsp/h8300 | |
parent | newlib-1.16.0-rtems4.10-20080925.diff. (diff) | |
download | rtems-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')
-rw-r--r-- | c/src/lib/libbsp/h8300/h8sim/ChangeLog | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/h8300/h8sim/console/console-io.c | 10 | ||||
-rw-r--r-- | c/src/lib/libbsp/h8300/h8sim/console/syscalls.S | 48 |
3 files changed, 54 insertions, 9 deletions
diff --git a/c/src/lib/libbsp/h8300/h8sim/ChangeLog b/c/src/lib/libbsp/h8300/h8sim/ChangeLog index 736aa251fc..d75d10a463 100644 --- a/c/src/lib/libbsp/h8300/h8sim/ChangeLog +++ b/c/src/lib/libbsp/h8300/h8sim/ChangeLog @@ -1,3 +1,8 @@ +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. + 2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com> * startup/linkcmds: Simulator now appears to have 16M RAM support by diff --git a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c index ded271920c..2cc6058435 100644 --- a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c +++ b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c @@ -2,7 +2,7 @@ * This file contains the hardware specific portions of the TTY driver * for the serial ports on the erc32. * - * COPYRIGHT (c) 1989-1997. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -41,14 +41,6 @@ void console_outbyte_polled( ) { _sys_write( 1, &ch, 1 ); -/* - typedef void (*_write_p_t)(int, char *, int); - _write_p_t _write_p = (_write_p_t)0xc7; - _write_p( 1, &ch, 1 ); - - asm volatile( "mov.b #1,r1l ; mov.b %0l,r2l ; mov.b #1,r3l; jsr @@0xc7" - : : "r" (&ch) : "r1", "r2"); -*/ } /* 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 |